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
TGAC/KAT
e8870331de2b4bb0a1b3b91c6afb8fb9d59e9216
deps/boost/tools/build/src/build/engine.py
python
Engine.set_update_action
(self, action_name, targets, sources, properties=None)
Binds a target to the corresponding update action. If target needs to be updated, the action registered with action_name will be used. The 'action_name' must be previously registered by either 'register_action' or 'register_bjam_action' method.
Binds a target to the corresponding update action. If target needs to be updated, the action registered with action_name will be used. The 'action_name' must be previously registered by either 'register_action' or 'register_bjam_action' method.
[ "Binds", "a", "target", "to", "the", "corresponding", "update", "action", ".", "If", "target", "needs", "to", "be", "updated", "the", "action", "registered", "with", "action_name", "will", "be", "used", ".", "The", "action_name", "must", "be", "previously", ...
def set_update_action (self, action_name, targets, sources, properties=None): """ Binds a target to the corresponding update action. If target needs to be updated, the action registered with action_name will be used. The 'action_name' must be previously registered by ...
[ "def", "set_update_action", "(", "self", ",", "action_name", ",", "targets", ",", "sources", ",", "properties", "=", "None", ")", ":", "if", "isinstance", "(", "targets", ",", "str", ")", ":", "targets", "=", "[", "targets", "]", "if", "isinstance", "(",...
https://github.com/TGAC/KAT/blob/e8870331de2b4bb0a1b3b91c6afb8fb9d59e9216/deps/boost/tools/build/src/build/engine.py#L145-L164
hanpfei/chromium-net
392cc1fa3a8f92f42e4071ab6e674d8e0482f83f
third_party/catapult/devil/devil/utils/find_usb_devices.py
python
GetHubsOnBus
(bus, hub_types)
Scans for all hubs on a bus of given hub types. Args: bus: [USBNode] Bus object. hub_types: [iterable(usb_hubs.HubType)] Possible types of hubs. Yields: Sequence of tuples representing (hub, type of hub)
Scans for all hubs on a bus of given hub types.
[ "Scans", "for", "all", "hubs", "on", "a", "bus", "of", "given", "hub", "types", "." ]
def GetHubsOnBus(bus, hub_types): """Scans for all hubs on a bus of given hub types. Args: bus: [USBNode] Bus object. hub_types: [iterable(usb_hubs.HubType)] Possible types of hubs. Yields: Sequence of tuples representing (hub, type of hub) """ for device in bus.AllNodes(): for hub_type in h...
[ "def", "GetHubsOnBus", "(", "bus", ",", "hub_types", ")", ":", "for", "device", "in", "bus", ".", "AllNodes", "(", ")", ":", "for", "hub_type", "in", "hub_types", ":", "if", "hub_type", ".", "IsType", "(", "device", ")", ":", "yield", "(", "device", ...
https://github.com/hanpfei/chromium-net/blob/392cc1fa3a8f92f42e4071ab6e674d8e0482f83f/third_party/catapult/devil/devil/utils/find_usb_devices.py#L306-L319
kamyu104/LeetCode-Solutions
77605708a927ea3b85aee5a479db733938c7c211
Python/best-team-with-no-conflicts.py
python
Solution6.bestTeamScore
(self, scores, ages)
return result
:type scores: List[int] :type ages: List[int] :rtype: int
:type scores: List[int] :type ages: List[int] :rtype: int
[ ":", "type", "scores", ":", "List", "[", "int", "]", ":", "type", "ages", ":", "List", "[", "int", "]", ":", "rtype", ":", "int" ]
def bestTeamScore(self, scores, ages): """ :type scores: List[int] :type ages: List[int] :rtype: int """ players = sorted(zip(ages, scores)) dp = [0]*len(players) result = 0 for i in xrange(len(players)): dp[i] = players[i][1] ...
[ "def", "bestTeamScore", "(", "self", ",", "scores", ",", "ages", ")", ":", "players", "=", "sorted", "(", "zip", "(", "ages", ",", "scores", ")", ")", "dp", "=", "[", "0", "]", "*", "len", "(", "players", ")", "result", "=", "0", "for", "i", "i...
https://github.com/kamyu104/LeetCode-Solutions/blob/77605708a927ea3b85aee5a479db733938c7c211/Python/best-team-with-no-conflicts.py#L192-L207
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/site-packages/pip/_vendor/pyparsing.py
python
ParseResults.append
(self, item)
Add single element to end of ParseResults list of elements. Example:: print(OneOrMore(Word(nums)).parseString("0 123 321")) # -> ['0', '123', '321'] # use a parse action to compute the sum of the parsed integers, and add it to the end def append_sum(tokens): ...
Add single element to end of ParseResults list of elements.
[ "Add", "single", "element", "to", "end", "of", "ParseResults", "list", "of", "elements", "." ]
def append(self, item): """ Add single element to end of ParseResults list of elements. Example:: print(OneOrMore(Word(nums)).parseString("0 123 321")) # -> ['0', '123', '321'] # use a parse action to compute the sum of the parsed integers, and add it to the end ...
[ "def", "append", "(", "self", ",", "item", ")", ":", "self", ".", "__toklist", ".", "append", "(", "item", ")" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/site-packages/pip/_vendor/pyparsing.py#L800-L813
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/osx_cocoa/_core.py
python
InputStream.read
(*args, **kwargs)
return _core_.InputStream_read(*args, **kwargs)
read(self, int size=-1) -> PyObject
read(self, int size=-1) -> PyObject
[ "read", "(", "self", "int", "size", "=", "-", "1", ")", "-", ">", "PyObject" ]
def read(*args, **kwargs): """read(self, int size=-1) -> PyObject""" return _core_.InputStream_read(*args, **kwargs)
[ "def", "read", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_core_", ".", "InputStream_read", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_cocoa/_core.py#L2170-L2172
Floydlang/floyd
b7070c73d58d3caf15bbcedf3d4f882db893917b
compiler/libs/benchmark/tools/gbench/util.py
python
find_benchmark_flag
(prefix, benchmark_flags)
return result
Search the specified list of flags for a flag matching `<prefix><arg>` and if it is found return the arg it specifies. If specified more than once the last value is returned. If the flag is not found None is returned.
Search the specified list of flags for a flag matching `<prefix><arg>` and if it is found return the arg it specifies. If specified more than once the last value is returned. If the flag is not found None is returned.
[ "Search", "the", "specified", "list", "of", "flags", "for", "a", "flag", "matching", "<prefix", ">", "<arg", ">", "and", "if", "it", "is", "found", "return", "the", "arg", "it", "specifies", ".", "If", "specified", "more", "than", "once", "the", "last", ...
def find_benchmark_flag(prefix, benchmark_flags): """ Search the specified list of flags for a flag matching `<prefix><arg>` and if it is found return the arg it specifies. If specified more than once the last value is returned. If the flag is not found None is returned. """ assert prefix.starts...
[ "def", "find_benchmark_flag", "(", "prefix", ",", "benchmark_flags", ")", ":", "assert", "prefix", ".", "startswith", "(", "'--'", ")", "and", "prefix", ".", "endswith", "(", "'='", ")", "result", "=", "None", "for", "f", "in", "benchmark_flags", ":", "if"...
https://github.com/Floydlang/floyd/blob/b7070c73d58d3caf15bbcedf3d4f882db893917b/compiler/libs/benchmark/tools/gbench/util.py#L90-L101
deepmind/open_spiel
4ca53bea32bb2875c7385d215424048ae92f78c8
open_spiel/python/jax/deep_cfr.py
python
DeepCFRSolver._reinitialize_policy_network
(self)
Reinitalize policy network and optimizer for training.
Reinitalize policy network and optimizer for training.
[ "Reinitalize", "policy", "network", "and", "optimizer", "for", "training", "." ]
def _reinitialize_policy_network(self): """Reinitalize policy network and optimizer for training.""" x, mask = (jnp.ones([1, self._embedding_size]), jnp.ones([1, self._num_actions])) self._params_policy_network = self._hk_policy_network.init( self._next_rng_key(), x, mask) self._o...
[ "def", "_reinitialize_policy_network", "(", "self", ")", ":", "x", ",", "mask", "=", "(", "jnp", ".", "ones", "(", "[", "1", ",", "self", ".", "_embedding_size", "]", ")", ",", "jnp", ".", "ones", "(", "[", "1", ",", "self", ".", "_num_actions", "]...
https://github.com/deepmind/open_spiel/blob/4ca53bea32bb2875c7385d215424048ae92f78c8/open_spiel/python/jax/deep_cfr.py#L290-L296
natanielruiz/android-yolo
1ebb54f96a67a20ff83ddfc823ed83a13dc3a47f
jni-build/jni/include/tensorflow/contrib/distributions/python/ops/bernoulli.py
python
Bernoulli.prob
(self, event, name="prob")
return super(Bernoulli, self).prob(event, name)
Probability mass function. Args: event: `int32` or `int64` binary Tensor; must be broadcastable with `p`. name: A name for this operation. Returns: The probabilities of the events.
Probability mass function.
[ "Probability", "mass", "function", "." ]
def prob(self, event, name="prob"): """Probability mass function. Args: event: `int32` or `int64` binary Tensor; must be broadcastable with `p`. name: A name for this operation. Returns: The probabilities of the events. """ return super(Bernoulli, self).prob(event, name)
[ "def", "prob", "(", "self", ",", "event", ",", "name", "=", "\"prob\"", ")", ":", "return", "super", "(", "Bernoulli", ",", "self", ")", ".", "prob", "(", "event", ",", "name", ")" ]
https://github.com/natanielruiz/android-yolo/blob/1ebb54f96a67a20ff83ddfc823ed83a13dc3a47f/jni-build/jni/include/tensorflow/contrib/distributions/python/ops/bernoulli.py#L133-L143
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/distutils/dist.py
python
Distribution.finalize_options
(self)
Set final values for all the options on the Distribution instance, analogous to the .finalize_options() method of Command objects.
Set final values for all the options on the Distribution instance, analogous to the .finalize_options() method of Command objects.
[ "Set", "final", "values", "for", "all", "the", "options", "on", "the", "Distribution", "instance", "analogous", "to", "the", ".", "finalize_options", "()", "method", "of", "Command", "objects", "." ]
def finalize_options(self): """Set final values for all the options on the Distribution instance, analogous to the .finalize_options() method of Command objects. """ for attr in ('keywords', 'platforms'): value = getattr(self.metadata, attr) if value is No...
[ "def", "finalize_options", "(", "self", ")", ":", "for", "attr", "in", "(", "'keywords'", ",", "'platforms'", ")", ":", "value", "=", "getattr", "(", "self", ".", "metadata", ",", "attr", ")", "if", "value", "is", "None", ":", "continue", "if", "isinst...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/distutils/dist.py#L608-L619
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Gems/CloudGemMetric/v1/AWS/common-code/Lib/numpy/polynomial/laguerre.py
python
lagpow
(c, pow, maxpower=16)
return pu._pow(lagmul, c, pow, maxpower)
Raise a Laguerre series to a power. Returns the Laguerre series `c` raised to the power `pow`. The argument `c` is a sequence of coefficients ordered from low to high. i.e., [1,2,3] is the series ``P_0 + 2*P_1 + 3*P_2.`` Parameters ---------- c : array_like 1-D array of Laguerre serie...
Raise a Laguerre series to a power.
[ "Raise", "a", "Laguerre", "series", "to", "a", "power", "." ]
def lagpow(c, pow, maxpower=16): """Raise a Laguerre series to a power. Returns the Laguerre series `c` raised to the power `pow`. The argument `c` is a sequence of coefficients ordered from low to high. i.e., [1,2,3] is the series ``P_0 + 2*P_1 + 3*P_2.`` Parameters ---------- c : array_...
[ "def", "lagpow", "(", "c", ",", "pow", ",", "maxpower", "=", "16", ")", ":", "return", "pu", ".", "_pow", "(", "lagmul", ",", "c", ",", "pow", ",", "maxpower", ")" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Gems/CloudGemMetric/v1/AWS/common-code/Lib/numpy/polynomial/laguerre.py#L535-L569
pmq20/node-packer
12c46c6e44fbc14d9ee645ebd17d5296b324f7e0
lts/tools/gyp/pylib/gyp/input.py
python
DependencyGraphNode._LinkDependenciesInternal
(self, targets, include_shared_libraries, dependencies=None, initial=True)
return dependencies
Returns an OrderedSet of dependency targets that are linked into this target. This function has a split personality, depending on the setting of |initial|. Outside callers should always leave |initial| at its default setting. When adding a target to the list of dependencies, this function will ...
Returns an OrderedSet of dependency targets that are linked into this target.
[ "Returns", "an", "OrderedSet", "of", "dependency", "targets", "that", "are", "linked", "into", "this", "target", "." ]
def _LinkDependenciesInternal(self, targets, include_shared_libraries, dependencies=None, initial=True): """Returns an OrderedSet of dependency targets that are linked into this target. This function has a split personality, depending on the setting of |initial|. Outsid...
[ "def", "_LinkDependenciesInternal", "(", "self", ",", "targets", ",", "include_shared_libraries", ",", "dependencies", "=", "None", ",", "initial", "=", "True", ")", ":", "if", "dependencies", "is", "None", ":", "# Using a list to get ordered output and a set to do fast...
https://github.com/pmq20/node-packer/blob/12c46c6e44fbc14d9ee645ebd17d5296b324f7e0/lts/tools/gyp/pylib/gyp/input.py#L1695-L1780
benoitsteiner/tensorflow-opencl
cb7cb40a57fde5cfd4731bc551e82a1e2fef43a5
tensorflow/python/keras/_impl/keras/wrappers/scikit_learn.py
python
KerasClassifier.fit
(self, x, y, **kwargs)
return super(KerasClassifier, self).fit(x, y, **kwargs)
Constructs a new model with `build_fn` & fit the model to `(x, y)`. Arguments: x : array-like, shape `(n_samples, n_features)` Training samples where n_samples in the number of samples and n_features is the number of features. y : array-like, shape `(n_samples,)` or `(n_samp...
Constructs a new model with `build_fn` & fit the model to `(x, y)`.
[ "Constructs", "a", "new", "model", "with", "build_fn", "&", "fit", "the", "model", "to", "(", "x", "y", ")", "." ]
def fit(self, x, y, **kwargs): """Constructs a new model with `build_fn` & fit the model to `(x, y)`. Arguments: x : array-like, shape `(n_samples, n_features)` Training samples where n_samples in the number of samples and n_features is the number of features. y : array-...
[ "def", "fit", "(", "self", ",", "x", ",", "y", ",", "*", "*", "kwargs", ")", ":", "y", "=", "np", ".", "array", "(", "y", ")", "if", "len", "(", "y", ".", "shape", ")", "==", "2", "and", "y", ".", "shape", "[", "1", "]", ">", "1", ":", ...
https://github.com/benoitsteiner/tensorflow-opencl/blob/cb7cb40a57fde5cfd4731bc551e82a1e2fef43a5/tensorflow/python/keras/_impl/keras/wrappers/scikit_learn.py#L197-L225
toggl-open-source/toggldesktop
91865205885531cc8fd9e8d613dad49d625d56e7
third_party/cpplint/cpplint.py
python
IsDerivedFunction
(clean_lines, linenum)
return False
Check if current line contains an inherited function. Args: clean_lines: A CleansedLines instance containing the file. linenum: The number of the line to check. Returns: True if current line contains a function with "override" virt-specifier.
Check if current line contains an inherited function.
[ "Check", "if", "current", "line", "contains", "an", "inherited", "function", "." ]
def IsDerivedFunction(clean_lines, linenum): """Check if current line contains an inherited function. Args: clean_lines: A CleansedLines instance containing the file. linenum: The number of the line to check. Returns: True if current line contains a function with "override" virt-specifier. """ ...
[ "def", "IsDerivedFunction", "(", "clean_lines", ",", "linenum", ")", ":", "# Scan back a few lines for start of current function", "for", "i", "in", "xrange", "(", "linenum", ",", "max", "(", "-", "1", ",", "linenum", "-", "10", ")", ",", "-", "1", ")", ":",...
https://github.com/toggl-open-source/toggldesktop/blob/91865205885531cc8fd9e8d613dad49d625d56e7/third_party/cpplint/cpplint.py#L5000-L5019
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/site-packages/botocore/loaders.py
python
Loader.list_available_services
(self, type_name)
return sorted(services)
List all known services. This will traverse the search path and look for all known services. :type type_name: str :param type_name: The type of the service (service-2, paginators-1, waiters-2, etc). This is needed because the list of available services depends ...
List all known services.
[ "List", "all", "known", "services", "." ]
def list_available_services(self, type_name): """List all known services. This will traverse the search path and look for all known services. :type type_name: str :param type_name: The type of the service (service-2, paginators-1, waiters-2, etc). This is needed be...
[ "def", "list_available_services", "(", "self", ",", "type_name", ")", ":", "services", "=", "set", "(", ")", "for", "possible_path", "in", "self", ".", "_potential_locations", "(", ")", ":", "# Any directory in the search path is potentially a service.", "# We'll collec...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/site-packages/botocore/loaders.py#L249-L287
apache/impala
8ddac48f3428c86f2cbd037ced89cfb903298b12
bin/diagnostics/collect_diagnostics.py
python
ImpalaDiagnosticsHandler.create_output_dir_structure
(self)
Creates the skeleton directory structure for the diagnostics output collection.
Creates the skeleton directory structure for the diagnostics output collection.
[ "Creates", "the", "skeleton", "directory", "structure", "for", "the", "diagnostics", "output", "collection", "." ]
def create_output_dir_structure(self): """Creates the skeleton directory structure for the diagnostics output collection.""" self.collection_root_dir = tempfile.mkdtemp(prefix="impala-diagnostics-%s" % datetime.datetime.now().strftime("%Y-%m-%d-%H-%M-%S-"), dir=os.path.abspath(self.args.output_d...
[ "def", "create_output_dir_structure", "(", "self", ")", ":", "self", ".", "collection_root_dir", "=", "tempfile", ".", "mkdtemp", "(", "prefix", "=", "\"impala-diagnostics-%s\"", "%", "datetime", ".", "datetime", ".", "now", "(", ")", ".", "strftime", "(", "\"...
https://github.com/apache/impala/blob/8ddac48f3428c86f2cbd037ced89cfb903298b12/bin/diagnostics/collect_diagnostics.py#L143-L149
dartsim/dart
495c82120c836005f2d136d4a50c8cc997fb879b
tools/cpplint.py
python
Match
(pattern, s)
return _regexp_compile_cache[pattern].match(s)
Matches the string with the pattern, caching the compiled regexp.
Matches the string with the pattern, caching the compiled regexp.
[ "Matches", "the", "string", "with", "the", "pattern", "caching", "the", "compiled", "regexp", "." ]
def Match(pattern, s): """Matches the string with the pattern, caching the compiled regexp.""" # The regexp compilation caching is inlined in both Match and Search for # performance reasons; factoring it out into a separate function turns out # to be noticeably expensive. if pattern not in _regexp_compile_cac...
[ "def", "Match", "(", "pattern", ",", "s", ")", ":", "# The regexp compilation caching is inlined in both Match and Search for", "# performance reasons; factoring it out into a separate function turns out", "# to be noticeably expensive.", "if", "pattern", "not", "in", "_regexp_compile_...
https://github.com/dartsim/dart/blob/495c82120c836005f2d136d4a50c8cc997fb879b/tools/cpplint.py#L492-L499
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/osx_cocoa/_misc.py
python
Trap
(*args)
return _misc_.Trap(*args)
Trap()
Trap()
[ "Trap", "()" ]
def Trap(*args): """Trap()""" return _misc_.Trap(*args)
[ "def", "Trap", "(", "*", "args", ")", ":", "return", "_misc_", ".", "Trap", "(", "*", "args", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_cocoa/_misc.py#L417-L419
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/tools/python3/src/Lib/asyncio/base_events.py
python
BaseEventLoop._timer_handle_cancelled
(self, handle)
Notification that a TimerHandle has been cancelled.
Notification that a TimerHandle has been cancelled.
[ "Notification", "that", "a", "TimerHandle", "has", "been", "cancelled", "." ]
def _timer_handle_cancelled(self, handle): """Notification that a TimerHandle has been cancelled.""" if handle._scheduled: self._timer_cancelled_count += 1
[ "def", "_timer_handle_cancelled", "(", "self", ",", "handle", ")", ":", "if", "handle", ".", "_scheduled", ":", "self", ".", "_timer_cancelled_count", "+=", "1" ]
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/tools/python3/src/Lib/asyncio/base_events.py#L1810-L1813
giuspen/cherrytree
84712f206478fcf9acf30174009ad28c648c6344
pygtk2/modules/clipboard.py
python
ClipboardHandler.to_table
(self, clipboard, selectiondata, table_model_n_iter)
From Clipboard to Table
From Clipboard to Table
[ "From", "Clipboard", "to", "Table" ]
def to_table(self, clipboard, selectiondata, table_model_n_iter): """From Clipboard to Table""" xml_text = selectiondata.get_text() if not xml_text: print "? no clipboard xml text" return dom = xml.dom.minidom.parseString(xml_text) dom_node = dom.firstChil...
[ "def", "to_table", "(", "self", ",", "clipboard", ",", "selectiondata", ",", "table_model_n_iter", ")", ":", "xml_text", "=", "selectiondata", ".", "get_text", "(", ")", "if", "not", "xml_text", ":", "print", "\"? no clipboard xml text\"", "return", "dom", "=", ...
https://github.com/giuspen/cherrytree/blob/84712f206478fcf9acf30174009ad28c648c6344/pygtk2/modules/clipboard.py#L486-L498
zerollzeng/tiny-tensorrt
e7bdb8f82934342a0f22ce68dfefdb8e15eb72b2
third_party/pybind11/tools/clang/cindex.py
python
Cursor.get_field_offsetof
(self)
return conf.lib.clang_Cursor_getOffsetOfField(self)
Returns the offsetof the FIELD_DECL pointed by this Cursor.
Returns the offsetof the FIELD_DECL pointed by this Cursor.
[ "Returns", "the", "offsetof", "the", "FIELD_DECL", "pointed", "by", "this", "Cursor", "." ]
def get_field_offsetof(self): """Returns the offsetof the FIELD_DECL pointed by this Cursor.""" return conf.lib.clang_Cursor_getOffsetOfField(self)
[ "def", "get_field_offsetof", "(", "self", ")", ":", "return", "conf", ".", "lib", ".", "clang_Cursor_getOffsetOfField", "(", "self", ")" ]
https://github.com/zerollzeng/tiny-tensorrt/blob/e7bdb8f82934342a0f22ce68dfefdb8e15eb72b2/third_party/pybind11/tools/clang/cindex.py#L1679-L1681
mantidproject/mantid
03deeb89254ec4289edb8771e0188c2090a02f32
scripts/Engineering/EnggUtils.py
python
get_detector_ids_for_bank
(bank)
return detector_ids
DEPRECATED: not used in UI, only in get_ws_indices_for_bank which is used in deprecated functions EnggVanadiumCorrections Find the detector IDs for an instrument bank. Note this is at this point specific to the ENGINX instrument. @param bank :: name/number as a string. @returns list of detector I...
DEPRECATED: not used in UI, only in get_ws_indices_for_bank which is used in deprecated functions EnggVanadiumCorrections
[ "DEPRECATED", ":", "not", "used", "in", "UI", "only", "in", "get_ws_indices_for_bank", "which", "is", "used", "in", "deprecated", "functions", "EnggVanadiumCorrections" ]
def get_detector_ids_for_bank(bank): """ DEPRECATED: not used in UI, only in get_ws_indices_for_bank which is used in deprecated functions EnggVanadiumCorrections Find the detector IDs for an instrument bank. Note this is at this point specific to the ENGINX instrument. @param bank :: name/num...
[ "def", "get_detector_ids_for_bank", "(", "bank", ")", ":", "import", "os", "grouping_file_path", "=", "os", ".", "path", ".", "join", "(", "mantid", ".", "config", ".", "getInstrumentDirectory", "(", ")", ",", "'Grouping'", ",", "'ENGINX_Grouping.xml'", ")", "...
https://github.com/mantidproject/mantid/blob/03deeb89254ec4289edb8771e0188c2090a02f32/scripts/Engineering/EnggUtils.py#L709-L761
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/idlelib/autoexpand.py
python
AutoExpand.getwords
(self)
return words
Return a list of words that match the prefix before the cursor.
Return a list of words that match the prefix before the cursor.
[ "Return", "a", "list", "of", "words", "that", "match", "the", "prefix", "before", "the", "cursor", "." ]
def getwords(self): "Return a list of words that match the prefix before the cursor." word = self.getprevword() if not word: return [] before = self.text.get("1.0", "insert wordstart") wbefore = re.findall(r"\b" + word + r"\w+\b", before) del before af...
[ "def", "getwords", "(", "self", ")", ":", "word", "=", "self", ".", "getprevword", "(", ")", "if", "not", "word", ":", "return", "[", "]", "before", "=", "self", ".", "text", ".", "get", "(", "\"1.0\"", ",", "\"insert wordstart\"", ")", "wbefore", "=...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/idlelib/autoexpand.py#L54-L83
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
wx/tools/Editra/src/extern/flatnotebook.py
python
FNBRendererVC8.DrawTab
(self, pageContainer, dc, posx, tabIdx, tabWidth, tabHeight, btnStatus)
Draws a tab using VC8 style.
Draws a tab using VC8 style.
[ "Draws", "a", "tab", "using", "VC8", "style", "." ]
def DrawTab(self, pageContainer, dc, posx, tabIdx, tabWidth, tabHeight, btnStatus): """ Draws a tab using VC8 style. """ pc = pageContainer borderPen = wx.Pen(pc._pParent.GetBorderColour()) tabPoints = [wx.Point() for ii in xrange(8)] # If we draw the first tab or the active ta...
[ "def", "DrawTab", "(", "self", ",", "pageContainer", ",", "dc", ",", "posx", ",", "tabIdx", ",", "tabWidth", ",", "tabHeight", ",", "btnStatus", ")", ":", "pc", "=", "pageContainer", "borderPen", "=", "wx", ".", "Pen", "(", "pc", ".", "_pParent", ".", ...
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/wx/tools/Editra/src/extern/flatnotebook.py#L2605-L2735
facebook/mysql-5.6
65a650660ec7b4d627d1b738f397252ff4706207
arcanist/lint/cpp_linter/cpplint.py
python
_CppLintState.SetFilters
(self, filters)
Sets the error-message filters. These filters are applied when deciding whether to emit a given error message. Args: filters: A string of comma-separated filters (eg "+whitespace/indent"). Each filter should start with + or -; else we die. Raises: ValueError: The comma-sepa...
Sets the error-message filters.
[ "Sets", "the", "error", "-", "message", "filters", "." ]
def SetFilters(self, filters): """Sets the error-message filters. These filters are applied when deciding whether to emit a given error message. Args: filters: A string of comma-separated filters (eg "+whitespace/indent"). Each filter should start with + or -; else we die. Ra...
[ "def", "SetFilters", "(", "self", ",", "filters", ")", ":", "# Default filters always have less priority than the flag ones.", "self", ".", "filters", "=", "_DEFAULT_FILTERS", "[", ":", "]", "for", "filt", "in", "filters", ".", "split", "(", "','", ")", ":", "cl...
https://github.com/facebook/mysql-5.6/blob/65a650660ec7b4d627d1b738f397252ff4706207/arcanist/lint/cpp_linter/cpplint.py#L711-L734
tfwu/FaceDetection-ConvNet-3D
f9251c48eb40c5aec8fba7455115c355466555be
python/build/lib.linux-x86_64-2.7/mxnet/model.py
python
load_checkpoint
(prefix, epoch)
return (symbol, arg_params, aux_params)
Load model checkpoint from file. Parameters ---------- prefix : str Prefix of model name. epoch : int Epoch number of model we would like to load. Returns ------- symbol : Symbol The symbol configuration of computation network. arg_params : dict of str to NDArray ...
Load model checkpoint from file. Parameters ---------- prefix : str Prefix of model name. epoch : int Epoch number of model we would like to load. Returns ------- symbol : Symbol The symbol configuration of computation network. arg_params : dict of str to NDArray ...
[ "Load", "model", "checkpoint", "from", "file", ".", "Parameters", "----------", "prefix", ":", "str", "Prefix", "of", "model", "name", ".", "epoch", ":", "int", "Epoch", "number", "of", "model", "we", "would", "like", "to", "load", ".", "Returns", "-------...
def load_checkpoint(prefix, epoch): """Load model checkpoint from file. Parameters ---------- prefix : str Prefix of model name. epoch : int Epoch number of model we would like to load. Returns ------- symbol : Symbol The symbol configuration of computation networ...
[ "def", "load_checkpoint", "(", "prefix", ",", "epoch", ")", ":", "symbol", "=", "sym", ".", "load", "(", "'%s-symbol.json'", "%", "prefix", ")", "save_dict", "=", "nd", ".", "load", "(", "'%s-%04d.params'", "%", "(", "prefix", ",", "epoch", ")", ")", "...
https://github.com/tfwu/FaceDetection-ConvNet-3D/blob/f9251c48eb40c5aec8fba7455115c355466555be/python/build/lib.linux-x86_64-2.7/mxnet/model.py#L341-L372
google/llvm-propeller
45c226984fe8377ebfb2ad7713c680d652ba678d
lldb/third_party/Python/module/pexpect-4.6/pexpect/run.py
python
run
(command, timeout=30, withexitstatus=False, events=None, extra_args=None, logfile=None, cwd=None, env=None, **kwargs)
This function runs the given command; waits for it to finish; then returns all output as a string. STDERR is included in output. If the full path to the command is not given then the path is searched. Note that lines are terminated by CR/LF (\\r\\n) combination even on UNIX-like systems because this is...
This function runs the given command; waits for it to finish; then returns all output as a string. STDERR is included in output. If the full path to the command is not given then the path is searched.
[ "This", "function", "runs", "the", "given", "command", ";", "waits", "for", "it", "to", "finish", ";", "then", "returns", "all", "output", "as", "a", "string", ".", "STDERR", "is", "included", "in", "output", ".", "If", "the", "full", "path", "to", "th...
def run(command, timeout=30, withexitstatus=False, events=None, extra_args=None, logfile=None, cwd=None, env=None, **kwargs): ''' This function runs the given command; waits for it to finish; then returns all output as a string. STDERR is included in output. If the full path to the command is n...
[ "def", "run", "(", "command", ",", "timeout", "=", "30", ",", "withexitstatus", "=", "False", ",", "events", "=", "None", ",", "extra_args", "=", "None", ",", "logfile", "=", "None", ",", "cwd", "=", "None", ",", "env", "=", "None", ",", "*", "*", ...
https://github.com/google/llvm-propeller/blob/45c226984fe8377ebfb2ad7713c680d652ba678d/lldb/third_party/Python/module/pexpect-4.6/pexpect/run.py#L7-L148
benoitsteiner/tensorflow-opencl
cb7cb40a57fde5cfd4731bc551e82a1e2fef43a5
tensorflow/python/eager/function.py
python
_GraphModeFunction.__call__
(self, *args)
return self._build_call_outputs(self._returns, result)
Executes the passed function in eager mode.
Executes the passed function in eager mode.
[ "Executes", "the", "passed", "function", "in", "eager", "mode", "." ]
def __call__(self, *args): """Executes the passed function in eager mode.""" tensor_inputs = [ x for x in nest.flatten(args) if isinstance(x, ops.Tensor) ] if tape.should_record(tensor_inputs) or tape.should_record( self._extra_inputs): if not self._has_backprop: se...
[ "def", "__call__", "(", "self", ",", "*", "args", ")", ":", "tensor_inputs", "=", "[", "x", "for", "x", "in", "nest", ".", "flatten", "(", "args", ")", "if", "isinstance", "(", "x", ",", "ops", ".", "Tensor", ")", "]", "if", "tape", ".", "should_...
https://github.com/benoitsteiner/tensorflow-opencl/blob/cb7cb40a57fde5cfd4731bc551e82a1e2fef43a5/tensorflow/python/eager/function.py#L333-L374
grpc/grpc
27bc6fe7797e43298dc931b96dc57322d0852a9f
src/python/grpcio/grpc/__init__.py
python
Future.cancel
(self)
Attempts to cancel the computation. This method does not block. Returns: bool: Returns True if the computation was canceled. Returns False under all other circumstances, for example: 1. computation has begun and could not be canceled. 2. co...
Attempts to cancel the computation.
[ "Attempts", "to", "cancel", "the", "computation", "." ]
def cancel(self): """Attempts to cancel the computation. This method does not block. Returns: bool: Returns True if the computation was canceled. Returns False under all other circumstances, for example: 1. computation has begun and could not b...
[ "def", "cancel", "(", "self", ")", ":", "raise", "NotImplementedError", "(", ")" ]
https://github.com/grpc/grpc/blob/27bc6fe7797e43298dc931b96dc57322d0852a9f/src/python/grpcio/grpc/__init__.py#L56-L72
ChromiumWebApps/chromium
c7361d39be8abd1574e6ce8957c8dbddd4c6ccf7
tools/idl_parser/idl_parser.py
python
IDLParser.p_Ellipsis
(self, p)
Ellipsis : ELLIPSIS |
Ellipsis : ELLIPSIS |
[ "Ellipsis", ":", "ELLIPSIS", "|" ]
def p_Ellipsis(self, p): """Ellipsis : ELLIPSIS |""" if len(p) > 1: p[0] = self.BuildNamed('Argument', p, 1) p[0].AddChildren(self.BuildTrue('ELLIPSIS'))
[ "def", "p_Ellipsis", "(", "self", ",", "p", ")", ":", "if", "len", "(", "p", ")", ">", "1", ":", "p", "[", "0", "]", "=", "self", ".", "BuildNamed", "(", "'Argument'", ",", "p", ",", "1", ")", "p", "[", "0", "]", ".", "AddChildren", "(", "s...
https://github.com/ChromiumWebApps/chromium/blob/c7361d39be8abd1574e6ce8957c8dbddd4c6ccf7/tools/idl_parser/idl_parser.py#L565-L570
wlanjie/AndroidFFmpeg
7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf
tools/fdk-aac-build/x86/toolchain/lib/python2.7/lib-tk/Tkinter.py
python
Variable.set
(self, value)
return self._tk.globalsetvar(self._name, value)
Set the variable to VALUE.
Set the variable to VALUE.
[ "Set", "the", "variable", "to", "VALUE", "." ]
def set(self, value): """Set the variable to VALUE.""" return self._tk.globalsetvar(self._name, value)
[ "def", "set", "(", "self", ",", "value", ")", ":", "return", "self", ".", "_tk", ".", "globalsetvar", "(", "self", ".", "_name", ",", "value", ")" ]
https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/x86/toolchain/lib/python2.7/lib-tk/Tkinter.py#L234-L236
9miao/CrossApp
1f5375e061bf69841eb19728598f5ae3f508d620
tools/bindings-generator/clang/cindex.py
python
TranslationUnit.__init__
(self, ptr, index)
Create a TranslationUnit instance. TranslationUnits should be created using one of the from_* @classmethod functions above. __init__ is only called internally.
Create a TranslationUnit instance.
[ "Create", "a", "TranslationUnit", "instance", "." ]
def __init__(self, ptr, index): """Create a TranslationUnit instance. TranslationUnits should be created using one of the from_* @classmethod functions above. __init__ is only called internally. """ assert isinstance(index, Index) ClangObject.__init__(self, ptr)
[ "def", "__init__", "(", "self", ",", "ptr", ",", "index", ")", ":", "assert", "isinstance", "(", "index", ",", "Index", ")", "ClangObject", ".", "__init__", "(", "self", ",", "ptr", ")" ]
https://github.com/9miao/CrossApp/blob/1f5375e061bf69841eb19728598f5ae3f508d620/tools/bindings-generator/clang/cindex.py#L2251-L2259
oracle/graaljs
36a56e8e993d45fc40939a3a4d9c0c24990720f1
graal-nodejs/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/xcodeproj_file.py
python
XCBuildPhase._AddBuildFileToDicts
(self, pbxbuildfile, path=None)
Maintains the _files_by_path and _files_by_xcfilelikeelement dicts. If path is specified, then it is the path that is being added to the phase, and pbxbuildfile must contain either a PBXFileReference directly referencing that path, or it must contain a PBXVariantGroup that itself contains a PBXFileRefe...
Maintains the _files_by_path and _files_by_xcfilelikeelement dicts.
[ "Maintains", "the", "_files_by_path", "and", "_files_by_xcfilelikeelement", "dicts", "." ]
def _AddBuildFileToDicts(self, pbxbuildfile, path=None): """Maintains the _files_by_path and _files_by_xcfilelikeelement dicts. If path is specified, then it is the path that is being added to the phase, and pbxbuildfile must contain either a PBXFileReference directly referencing that path, or it m...
[ "def", "_AddBuildFileToDicts", "(", "self", ",", "pbxbuildfile", ",", "path", "=", "None", ")", ":", "xcfilelikeelement", "=", "pbxbuildfile", ".", "_properties", "[", "\"fileRef\"", "]", "paths", "=", "[", "]", "if", "path", "is", "not", "None", ":", "# I...
https://github.com/oracle/graaljs/blob/36a56e8e993d45fc40939a3a4d9c0c24990720f1/graal-nodejs/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/xcodeproj_file.py#L1894-L1951
wlanjie/AndroidFFmpeg
7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf
tools/fdk-aac-build/armeabi-v7a/toolchain/lib/python2.7/lib-tk/Tkinter.py
python
Misc.winfo_vrootheight
(self)
return getint( self.tk.call('winfo', 'vrootheight', self._w))
Return the height of the virtual root window associated with this widget in pixels. If there is no virtual root window return the height of the screen.
Return the height of the virtual root window associated with this widget in pixels. If there is no virtual root window return the height of the screen.
[ "Return", "the", "height", "of", "the", "virtual", "root", "window", "associated", "with", "this", "widget", "in", "pixels", ".", "If", "there", "is", "no", "virtual", "root", "window", "return", "the", "height", "of", "the", "screen", "." ]
def winfo_vrootheight(self): """Return the height of the virtual root window associated with this widget in pixels. If there is no virtual root window return the height of the screen.""" return getint( self.tk.call('winfo', 'vrootheight', self._w))
[ "def", "winfo_vrootheight", "(", "self", ")", ":", "return", "getint", "(", "self", ".", "tk", ".", "call", "(", "'winfo'", ",", "'vrootheight'", ",", "self", ".", "_w", ")", ")" ]
https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/armeabi-v7a/toolchain/lib/python2.7/lib-tk/Tkinter.py#L924-L929
apache/incubator-mxnet
f03fb23f1d103fec9541b5ae59ee06b1734a51d9
python/mxnet/onnx/mx2onnx/_op_translations/_op_translations_opset12.py
python
convert_broadcast_greater_equal
(node, **kwargs)
return nodes
Map MXNet's broadcast_greater_equal operator
Map MXNet's broadcast_greater_equal operator
[ "Map", "MXNet", "s", "broadcast_greater_equal", "operator" ]
def convert_broadcast_greater_equal(node, **kwargs): """Map MXNet's broadcast_greater_equal operator """ from onnx.helper import make_node name, input_nodes, _ = get_inputs(node, kwargs) input_dtypes = get_input_dtypes(node, kwargs) dtype = input_dtypes[0] dtype_t = onnx.mapping.NP_TYPE_TO_...
[ "def", "convert_broadcast_greater_equal", "(", "node", ",", "*", "*", "kwargs", ")", ":", "from", "onnx", ".", "helper", "import", "make_node", "name", ",", "input_nodes", ",", "_", "=", "get_inputs", "(", "node", ",", "kwargs", ")", "input_dtypes", "=", "...
https://github.com/apache/incubator-mxnet/blob/f03fb23f1d103fec9541b5ae59ee06b1734a51d9/python/mxnet/onnx/mx2onnx/_op_translations/_op_translations_opset12.py#L2330-L2345
hughperkins/tf-coriander
970d3df6c11400ad68405f22b0c42a52374e94ca
tensorflow/contrib/metrics/python/ops/set_ops.py
python
_set_operation
(a, b, set_operation, validate_indices=True)
return ops.SparseTensor(indices, values, shape)
Compute set operation of elements in last dimension of `a` and `b`. All but the last dimension of `a` and `b` must match. Args: a: `Tensor` or `SparseTensor` of the same type as `b`. If sparse, indices must be sorted in row-major order. b: `Tensor` or `SparseTensor` of the same type as `a`. Must b...
Compute set operation of elements in last dimension of `a` and `b`.
[ "Compute", "set", "operation", "of", "elements", "in", "last", "dimension", "of", "a", "and", "b", "." ]
def _set_operation(a, b, set_operation, validate_indices=True): """Compute set operation of elements in last dimension of `a` and `b`. All but the last dimension of `a` and `b` must match. Args: a: `Tensor` or `SparseTensor` of the same type as `b`. If sparse, indices must be sorted in row-major ord...
[ "def", "_set_operation", "(", "a", ",", "b", ",", "set_operation", ",", "validate_indices", "=", "True", ")", ":", "a", "=", "tensor_util", ".", "convert_to_tensor_or_sparse_tensor", "(", "a", ",", "name", "=", "\"a\"", ")", "if", "a", ".", "dtype", ".", ...
https://github.com/hughperkins/tf-coriander/blob/970d3df6c11400ad68405f22b0c42a52374e94ca/tensorflow/contrib/metrics/python/ops/set_ops.py#L79-L126
kamyu104/LeetCode-Solutions
77605708a927ea3b85aee5a479db733938c7c211
Python/maximum-height-by-stacking-cuboids.py
python
Solution.maxHeight
(self, cuboids)
return max(dp)
:type cuboids: List[List[int]] :rtype: int
:type cuboids: List[List[int]] :rtype: int
[ ":", "type", "cuboids", ":", "List", "[", "List", "[", "int", "]]", ":", "rtype", ":", "int" ]
def maxHeight(self, cuboids): """ :type cuboids: List[List[int]] :rtype: int """ for cuboid in cuboids: cuboid.sort() cuboids.append([0, 0, 0]) cuboids.sort() dp = [0]*len(cuboids) for i in xrange(1, len(cuboids)): for j in ...
[ "def", "maxHeight", "(", "self", ",", "cuboids", ")", ":", "for", "cuboid", "in", "cuboids", ":", "cuboid", ".", "sort", "(", ")", "cuboids", ".", "append", "(", "[", "0", ",", "0", ",", "0", "]", ")", "cuboids", ".", "sort", "(", ")", "dp", "=...
https://github.com/kamyu104/LeetCode-Solutions/blob/77605708a927ea3b85aee5a479db733938c7c211/Python/maximum-height-by-stacking-cuboids.py#L5-L19
hanpfei/chromium-net
392cc1fa3a8f92f42e4071ab6e674d8e0482f83f
third_party/catapult/third_party/pyfakefs/pyfakefs/fake_filesystem.py
python
FakeFilesystem.CloseOpenFile
(self, file_obj)
Removes file_obj from the list of open files on the filesystem. Sets the entry in open_files to None. Args: file_obj: file object to be removed to open files list.
Removes file_obj from the list of open files on the filesystem.
[ "Removes", "file_obj", "from", "the", "list", "of", "open", "files", "on", "the", "filesystem", "." ]
def CloseOpenFile(self, file_obj): """Removes file_obj from the list of open files on the filesystem. Sets the entry in open_files to None. Args: file_obj: file object to be removed to open files list. """ self.open_files[file_obj.filedes] = None heapq.heappush(self.free_fd_heap, file_o...
[ "def", "CloseOpenFile", "(", "self", ",", "file_obj", ")", ":", "self", ".", "open_files", "[", "file_obj", ".", "filedes", "]", "=", "None", "heapq", ".", "heappush", "(", "self", ".", "free_fd_heap", ",", "file_obj", ".", "filedes", ")" ]
https://github.com/hanpfei/chromium-net/blob/392cc1fa3a8f92f42e4071ab6e674d8e0482f83f/third_party/catapult/third_party/pyfakefs/pyfakefs/fake_filesystem.py#L406-L415
hanpfei/chromium-net
392cc1fa3a8f92f42e4071ab6e674d8e0482f83f
third_party/catapult/third_party/python_gflags/gflags.py
python
FlagValues.__delattr__
(self, flag_name)
Deletes a previously-defined flag from a flag object. This method makes sure we can delete a flag by using del flag_values_object.<flag_name> E.g., gflags.DEFINE_integer('foo', 1, 'Integer flag.') del gflags.FLAGS.foo Args: flag_name: A string, the name of the flag to be deleted...
Deletes a previously-defined flag from a flag object.
[ "Deletes", "a", "previously", "-", "defined", "flag", "from", "a", "flag", "object", "." ]
def __delattr__(self, flag_name): """Deletes a previously-defined flag from a flag object. This method makes sure we can delete a flag by using del flag_values_object.<flag_name> E.g., gflags.DEFINE_integer('foo', 1, 'Integer flag.') del gflags.FLAGS.foo Args: flag_name: A s...
[ "def", "__delattr__", "(", "self", ",", "flag_name", ")", ":", "fl", "=", "self", ".", "FlagDict", "(", ")", "if", "flag_name", "not", "in", "fl", ":", "raise", "AttributeError", "(", "flag_name", ")", "flag_obj", "=", "fl", "[", "flag_name", "]", "del...
https://github.com/hanpfei/chromium-net/blob/392cc1fa3a8f92f42e4071ab6e674d8e0482f83f/third_party/catapult/third_party/python_gflags/gflags.py#L1124-L1156
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/tools/python3/src/Lib/traceback.py
python
StackSummary.from_list
(klass, a_list)
return result
Create a StackSummary object from a supplied list of FrameSummary objects or old-style list of tuples.
Create a StackSummary object from a supplied list of FrameSummary objects or old-style list of tuples.
[ "Create", "a", "StackSummary", "object", "from", "a", "supplied", "list", "of", "FrameSummary", "objects", "or", "old", "-", "style", "list", "of", "tuples", "." ]
def from_list(klass, a_list): """ Create a StackSummary object from a supplied list of FrameSummary objects or old-style list of tuples. """ # While doing a fast-path check for isinstance(a_list, StackSummary) is # appealing, idlelib.run.cleanup_traceback and other simila...
[ "def", "from_list", "(", "klass", ",", "a_list", ")", ":", "# While doing a fast-path check for isinstance(a_list, StackSummary) is", "# appealing, idlelib.run.cleanup_traceback and other similar code may", "# break this by making arbitrary frames plain tuples, so we need to", "# check on a fr...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/tools/python3/src/Lib/traceback.py#L370-L386
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/windows/Lib/site-packages/pip/_internal/utils/misc.py
python
split_auth_from_netloc
(netloc)
return netloc, user_pass
Parse out and remove the auth information from a netloc. Returns: (netloc, (username, password)).
Parse out and remove the auth information from a netloc.
[ "Parse", "out", "and", "remove", "the", "auth", "information", "from", "a", "netloc", "." ]
def split_auth_from_netloc(netloc): """ Parse out and remove the auth information from a netloc. Returns: (netloc, (username, password)). """ if '@' not in netloc: return netloc, (None, None) # Split from the right because that's how urllib.parse.urlsplit() # behaves if more than o...
[ "def", "split_auth_from_netloc", "(", "netloc", ")", ":", "if", "'@'", "not", "in", "netloc", ":", "return", "netloc", ",", "(", "None", ",", "None", ")", "# Split from the right because that's how urllib.parse.urlsplit()", "# behaves if more than one @ is present (which ca...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/windows/Lib/site-packages/pip/_internal/utils/misc.py#L696-L721
ApolloAuto/apollo-platform
86d9dc6743b496ead18d597748ebabd34a513289
ros/third_party/lib_x86_64/python2.7/dist-packages/numpy/lib/_datasource.py
python
Repository.__init__
(self, baseurl, destpath=os.curdir)
Create a Repository with a shared url or directory of baseurl.
Create a Repository with a shared url or directory of baseurl.
[ "Create", "a", "Repository", "with", "a", "shared", "url", "or", "directory", "of", "baseurl", "." ]
def __init__(self, baseurl, destpath=os.curdir): """Create a Repository with a shared url or directory of baseurl.""" DataSource.__init__(self, destpath=destpath) self._baseurl = baseurl
[ "def", "__init__", "(", "self", ",", "baseurl", ",", "destpath", "=", "os", ".", "curdir", ")", ":", "DataSource", ".", "__init__", "(", "self", ",", "destpath", "=", "destpath", ")", "self", ".", "_baseurl", "=", "baseurl" ]
https://github.com/ApolloAuto/apollo-platform/blob/86d9dc6743b496ead18d597748ebabd34a513289/ros/third_party/lib_x86_64/python2.7/dist-packages/numpy/lib/_datasource.py#L537-L540
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/fsspec/implementations/cached.py
python
CachingFileSystem.save_cache
(self)
Save set of stored blocks from file
Save set of stored blocks from file
[ "Save", "set", "of", "stored", "blocks", "from", "file" ]
def save_cache(self): """Save set of stored blocks from file""" fn = os.path.join(self.storage[-1], "cache") # TODO: a file lock could be used to ensure file does not change # between re-read and write; but occasional duplicated reads ok. cache = self.cached_files[-1] if...
[ "def", "save_cache", "(", "self", ")", ":", "fn", "=", "os", ".", "path", ".", "join", "(", "self", ".", "storage", "[", "-", "1", "]", ",", "\"cache\"", ")", "# TODO: a file lock could be used to ensure file does not change", "# between re-read and write; but occa...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/fsspec/implementations/cached.py#L120-L149
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/osx_cocoa/_core.py
python
MenuItem.SetMenu
(*args, **kwargs)
return _core_.MenuItem_SetMenu(*args, **kwargs)
SetMenu(self, Menu menu)
SetMenu(self, Menu menu)
[ "SetMenu", "(", "self", "Menu", "menu", ")" ]
def SetMenu(*args, **kwargs): """SetMenu(self, Menu menu)""" return _core_.MenuItem_SetMenu(*args, **kwargs)
[ "def", "SetMenu", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_core_", ".", "MenuItem_SetMenu", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_cocoa/_core.py#L12447-L12449
tensorflow/io
92b44e180674a8af0e12e405530f7343e3e693e4
tensorflow_io/python/ops/parquet_dataset_ops.py
python
ParquetIODataset.__init__
(self, filename, columns=None, internal=True)
ParquetIODataset.
ParquetIODataset.
[ "ParquetIODataset", "." ]
def __init__(self, filename, columns=None, internal=True): """ParquetIODataset.""" assert internal with tf.name_scope("ParquetIODataset"): components, shapes, dtypes = core_ops.io_parquet_readable_info( filename, shared=filename, container="ParquetIODataset" ...
[ "def", "__init__", "(", "self", ",", "filename", ",", "columns", "=", "None", ",", "internal", "=", "True", ")", ":", "assert", "internal", "with", "tf", ".", "name_scope", "(", "\"ParquetIODataset\"", ")", ":", "components", ",", "shapes", ",", "dtypes", ...
https://github.com/tensorflow/io/blob/92b44e180674a8af0e12e405530f7343e3e693e4/tensorflow_io/python/ops/parquet_dataset_ops.py#L26-L127
SoarGroup/Soar
a1c5e249499137a27da60533c72969eef3b8ab6b
scons/scons-local-4.1.0/SCons/Tool/javac.py
python
classname
(path)
return os.path.normpath(path).replace(os.sep, '.')
Turn a string (path name) into a Java class name.
Turn a string (path name) into a Java class name.
[ "Turn", "a", "string", "(", "path", "name", ")", "into", "a", "Java", "class", "name", "." ]
def classname(path): """Turn a string (path name) into a Java class name.""" return os.path.normpath(path).replace(os.sep, '.')
[ "def", "classname", "(", "path", ")", ":", "return", "os", ".", "path", ".", "normpath", "(", "path", ")", ".", "replace", "(", "os", ".", "sep", ",", "'.'", ")" ]
https://github.com/SoarGroup/Soar/blob/a1c5e249499137a27da60533c72969eef3b8ab6b/scons/scons-local-4.1.0/SCons/Tool/javac.py#L45-L47
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/code.py
python
InteractiveConsole.__init__
(self, locals=None, filename="<console>")
Constructor. The optional locals argument will be passed to the InteractiveInterpreter base class. The optional filename argument should specify the (file)name of the input stream; it will show up in tracebacks.
Constructor.
[ "Constructor", "." ]
def __init__(self, locals=None, filename="<console>"): """Constructor. The optional locals argument will be passed to the InteractiveInterpreter base class. The optional filename argument should specify the (file)name of the input stream; it will show up in tracebacks. ...
[ "def", "__init__", "(", "self", ",", "locals", "=", "None", ",", "filename", "=", "\"<console>\"", ")", ":", "InteractiveInterpreter", ".", "__init__", "(", "self", ",", "locals", ")", "self", ".", "filename", "=", "filename", "self", ".", "resetbuffer", "...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/code.py#L170-L182
ChromiumWebApps/chromium
c7361d39be8abd1574e6ce8957c8dbddd4c6ccf7
ppapi/generators/idl_parser.py
python
IDLParser.p_arrays
(self, p)
arrays : '[' ']' arrays | '[' integer ']' arrays |
arrays : '[' ']' arrays | '[' integer ']' arrays |
[ "arrays", ":", "[", "]", "arrays", "|", "[", "integer", "]", "arrays", "|" ]
def p_arrays(self, p): """arrays : '[' ']' arrays | '[' integer ']' arrays | """ # If there are 3 tokens plus a return slot it is an unsized array if len(p) == 4: array = self.BuildProduction('Array', p, 1) p[0] = ListFromConcat(array, p[3]) # If there are 4 token...
[ "def", "p_arrays", "(", "self", ",", "p", ")", ":", "# If there are 3 tokens plus a return slot it is an unsized array", "if", "len", "(", "p", ")", "==", "4", ":", "array", "=", "self", ".", "BuildProduction", "(", "'Array'", ",", "p", ",", "1", ")", "p", ...
https://github.com/ChromiumWebApps/chromium/blob/c7361d39be8abd1574e6ce8957c8dbddd4c6ccf7/ppapi/generators/idl_parser.py#L556-L571
SpenceKonde/megaTinyCore
1c4a70b18a149fe6bcb551dfa6db11ca50b8997b
megaavr/tools/libs/pymcuprog/pymcuprog.py
python
main
()
return pymcuprog_main.pymcuprog(arguments)
Entrypoint for installable CLI Configures the CLI and parses the arguments
Entrypoint for installable CLI
[ "Entrypoint", "for", "installable", "CLI" ]
def main(): """ Entrypoint for installable CLI Configures the CLI and parses the arguments """ parser = argparse.ArgumentParser( formatter_class=argparse.RawDescriptionHelpFormatter, description=textwrap.dedent('''\ Generic programmer of selected AVR, PIC and SAM devices Ba...
[ "def", "main", "(", ")", ":", "parser", "=", "argparse", ".", "ArgumentParser", "(", "formatter_class", "=", "argparse", ".", "RawDescriptionHelpFormatter", ",", "description", "=", "textwrap", ".", "dedent", "(", "'''\\\n Generic programmer of selected AVR, PIC and ...
https://github.com/SpenceKonde/megaTinyCore/blob/1c4a70b18a149fe6bcb551dfa6db11ca50b8997b/megaavr/tools/libs/pymcuprog/pymcuprog.py#L100-L254
DaFuCoding/MTCNN_Caffe
09c30c3ff391bd9cb6b249c1910afaf147767ab3
examples/pycaffe/tools.py
python
SimpleTransformer.preprocess
(self, im)
return im
preprocess() emulate the pre-processing occuring in the vgg16 caffe prototxt.
preprocess() emulate the pre-processing occuring in the vgg16 caffe prototxt.
[ "preprocess", "()", "emulate", "the", "pre", "-", "processing", "occuring", "in", "the", "vgg16", "caffe", "prototxt", "." ]
def preprocess(self, im): """ preprocess() emulate the pre-processing occuring in the vgg16 caffe prototxt. """ im = np.float32(im) im = im[:, :, ::-1] # change to BGR im -= self.mean im *= self.scale im = im.transpose((2, 0, 1)) return ...
[ "def", "preprocess", "(", "self", ",", "im", ")", ":", "im", "=", "np", ".", "float32", "(", "im", ")", "im", "=", "im", "[", ":", ",", ":", ",", ":", ":", "-", "1", "]", "# change to BGR", "im", "-=", "self", ".", "mean", "im", "*=", "self",...
https://github.com/DaFuCoding/MTCNN_Caffe/blob/09c30c3ff391bd9cb6b249c1910afaf147767ab3/examples/pycaffe/tools.py#L27-L39
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/gtk/combo.py
python
ComboCtrl.PrepareBackground
(*args, **kwargs)
return _combo.ComboCtrl_PrepareBackground(*args, **kwargs)
PrepareBackground(self, DC dc, Rect rect, int flags) Prepare background of combo control or an item in a dropdown list in a way typical on platform. This includes painting the focus/disabled background and setting the clipping region. Unless you plan to paint your own focus indicator, ...
PrepareBackground(self, DC dc, Rect rect, int flags)
[ "PrepareBackground", "(", "self", "DC", "dc", "Rect", "rect", "int", "flags", ")" ]
def PrepareBackground(*args, **kwargs): """ PrepareBackground(self, DC dc, Rect rect, int flags) Prepare background of combo control or an item in a dropdown list in a way typical on platform. This includes painting the focus/disabled background and setting the clipping region. ...
[ "def", "PrepareBackground", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_combo", ".", "ComboCtrl_PrepareBackground", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/gtk/combo.py#L415-L436
hanpfei/chromium-net
392cc1fa3a8f92f42e4071ab6e674d8e0482f83f
third_party/catapult/third_party/apiclient/googleapiclient/http.py
python
MediaUpload.to_json
(self)
return self._to_json()
Create a JSON representation of an instance of MediaUpload. Returns: string, a JSON representation of this instance, suitable to pass to from_json().
Create a JSON representation of an instance of MediaUpload.
[ "Create", "a", "JSON", "representation", "of", "an", "instance", "of", "MediaUpload", "." ]
def to_json(self): """Create a JSON representation of an instance of MediaUpload. Returns: string, a JSON representation of this instance, suitable to pass to from_json(). """ return self._to_json()
[ "def", "to_json", "(", "self", ")", ":", "return", "self", ".", "_to_json", "(", ")" ]
https://github.com/hanpfei/chromium-net/blob/392cc1fa3a8f92f42e4071ab6e674d8e0482f83f/third_party/catapult/third_party/apiclient/googleapiclient/http.py#L230-L237
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/tools/python/src/Lib/decimal.py
python
Decimal._compare_check_nans
(self, other, context)
return 0
Version of _check_nans used for the signaling comparisons compare_signal, __le__, __lt__, __ge__, __gt__. Signal InvalidOperation if either self or other is a (quiet or signaling) NaN. Signaling NaNs take precedence over quiet NaNs. Return 0 if neither operand is a NaN.
Version of _check_nans used for the signaling comparisons compare_signal, __le__, __lt__, __ge__, __gt__.
[ "Version", "of", "_check_nans", "used", "for", "the", "signaling", "comparisons", "compare_signal", "__le__", "__lt__", "__ge__", "__gt__", "." ]
def _compare_check_nans(self, other, context): """Version of _check_nans used for the signaling comparisons compare_signal, __le__, __lt__, __ge__, __gt__. Signal InvalidOperation if either self or other is a (quiet or signaling) NaN. Signaling NaNs take precedence over quiet N...
[ "def", "_compare_check_nans", "(", "self", ",", "other", ",", "context", ")", ":", "if", "context", "is", "None", ":", "context", "=", "getcontext", "(", ")", "if", "self", ".", "_is_special", "or", "other", ".", "_is_special", ":", "if", "self", ".", ...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/tools/python/src/Lib/decimal.py#L759-L790
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/msw/_core.py
python
Rect.Contains
(*args, **kwargs)
return _core_.Rect_Contains(*args, **kwargs)
Contains(self, Point pt) -> bool Return True if the point is inside the rect.
Contains(self, Point pt) -> bool
[ "Contains", "(", "self", "Point", "pt", ")", "-", ">", "bool" ]
def Contains(*args, **kwargs): """ Contains(self, Point pt) -> bool Return True if the point is inside the rect. """ return _core_.Rect_Contains(*args, **kwargs)
[ "def", "Contains", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_core_", ".", "Rect_Contains", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/msw/_core.py#L1509-L1515
SpaceNetChallenge/BuildingDetectors
3def3c44b5847c744cd2f3356182892d92496579
qinhaifang/src/lib/pylayer/mnc_data_layer.py
python
MNCDataLayer._shuffle_roidb_inds
(self)
Randomly permute the training roidb.
Randomly permute the training roidb.
[ "Randomly", "permute", "the", "training", "roidb", "." ]
def _shuffle_roidb_inds(self): """Randomly permute the training roidb.""" if cfg.TRAIN.ASPECT_GROUPING: widths = np.array([r['width'] for r in self._roidb]) heights = np.array([r['height'] for r in self._roidb]) horz = (widths >= heights) vert = np.logical...
[ "def", "_shuffle_roidb_inds", "(", "self", ")", ":", "if", "cfg", ".", "TRAIN", ".", "ASPECT_GROUPING", ":", "widths", "=", "np", ".", "array", "(", "[", "r", "[", "'width'", "]", "for", "r", "in", "self", ".", "_roidb", "]", ")", "heights", "=", "...
https://github.com/SpaceNetChallenge/BuildingDetectors/blob/3def3c44b5847c744cd2f3356182892d92496579/qinhaifang/src/lib/pylayer/mnc_data_layer.py#L74-L92
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/scikit-learn/py3/sklearn/utils/linear_assignment_.py
python
_step5
(state)
return _step3
Construct a series of alternating primed and starred zeros as follows. Let Z0 represent the uncovered primed zero found in Step 4. Let Z1 denote the starred zero in the column of Z0 (if any). Let Z2 denote the primed zero in the row of Z1 (there will always be one). Continue until the series terminates ...
Construct a series of alternating primed and starred zeros as follows. Let Z0 represent the uncovered primed zero found in Step 4. Let Z1 denote the starred zero in the column of Z0 (if any). Let Z2 denote the primed zero in the row of Z1 (there will always be one). Continue until the series terminates ...
[ "Construct", "a", "series", "of", "alternating", "primed", "and", "starred", "zeros", "as", "follows", ".", "Let", "Z0", "represent", "the", "uncovered", "primed", "zero", "found", "in", "Step", "4", ".", "Let", "Z1", "denote", "the", "starred", "zero", "i...
def _step5(state): """ Construct a series of alternating primed and starred zeros as follows. Let Z0 represent the uncovered primed zero found in Step 4. Let Z1 denote the starred zero in the column of Z0 (if any). Let Z2 denote the primed zero in the row of Z1 (there will always be one). Contin...
[ "def", "_step5", "(", "state", ")", ":", "count", "=", "0", "path", "=", "state", ".", "path", "path", "[", "count", ",", "0", "]", "=", "state", ".", "Z0_r", "path", "[", "count", ",", "1", "]", "=", "state", ".", "Z0_c", "while", "True", ":",...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/scikit-learn/py3/sklearn/utils/linear_assignment_.py#L222-L269
hanpfei/chromium-net
392cc1fa3a8f92f42e4071ab6e674d8e0482f83f
tools/roll_webrtc.py
python
_WaitForTrybots
(issue, rietveld_server)
Wait until all trybots have passed or at least one have failed. Returns: An exit code of 0 if all trybots passed or non-zero otherwise.
Wait until all trybots have passed or at least one have failed.
[ "Wait", "until", "all", "trybots", "have", "passed", "or", "at", "least", "one", "have", "failed", "." ]
def _WaitForTrybots(issue, rietveld_server): """Wait until all trybots have passed or at least one have failed. Returns: An exit code of 0 if all trybots passed or non-zero otherwise. """ assert type(issue) is int print 'Trybot status for https://%s/%d:' % (rietveld_server, issue) remote = rietveld.Rie...
[ "def", "_WaitForTrybots", "(", "issue", ",", "rietveld_server", ")", ":", "assert", "type", "(", "issue", ")", "is", "int", "print", "'Trybot status for https://%s/%d:'", "%", "(", "rietveld_server", ",", "issue", ")", "remote", "=", "rietveld", ".", "Rietveld",...
https://github.com/hanpfei/chromium-net/blob/392cc1fa3a8f92f42e4071ab6e674d8e0482f83f/tools/roll_webrtc.py#L108-L143
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/site-packages/pip/_vendor/html5lib/treebuilders/base.py
python
TreeBuilder.insertElementTable
(self, token)
return element
Create an element and insert it into the tree
Create an element and insert it into the tree
[ "Create", "an", "element", "and", "insert", "it", "into", "the", "tree" ]
def insertElementTable(self, token): """Create an element and insert it into the tree""" element = self.createElement(token) if self.openElements[-1].name not in tableInsertModeElements: return self.insertElementNormal(token) else: # We should be in the InTa...
[ "def", "insertElementTable", "(", "self", ",", "token", ")", ":", "element", "=", "self", ".", "createElement", "(", "token", ")", "if", "self", ".", "openElements", "[", "-", "1", "]", ".", "name", "not", "in", "tableInsertModeElements", ":", "return", ...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/site-packages/pip/_vendor/html5lib/treebuilders/base.py#L665-L693
tangzhenyu/Scene-Text-Understanding
0f7ffc7aea5971a50cdc03d33d0a41075285948b
ctpn_crnn_ocr/CTPN/caffe/scripts/cpp_lint.py
python
_NestingState.InnermostClass
(self)
return None
Get class info on the top of the stack. Returns: A _ClassInfo object if we are inside a class, or None otherwise.
Get class info on the top of the stack.
[ "Get", "class", "info", "on", "the", "top", "of", "the", "stack", "." ]
def InnermostClass(self): """Get class info on the top of the stack. Returns: A _ClassInfo object if we are inside a class, or None otherwise. """ for i in range(len(self.stack), 0, -1): classinfo = self.stack[i - 1] if isinstance(classinfo, _ClassInfo): return classinfo r...
[ "def", "InnermostClass", "(", "self", ")", ":", "for", "i", "in", "range", "(", "len", "(", "self", ".", "stack", ")", ",", "0", ",", "-", "1", ")", ":", "classinfo", "=", "self", ".", "stack", "[", "i", "-", "1", "]", "if", "isinstance", "(", ...
https://github.com/tangzhenyu/Scene-Text-Understanding/blob/0f7ffc7aea5971a50cdc03d33d0a41075285948b/ctpn_crnn_ocr/CTPN/caffe/scripts/cpp_lint.py#L2160-L2170
mantidproject/mantid
03deeb89254ec4289edb8771e0188c2090a02f32
qt/python/mantidqt/mantidqt/widgets/samplelogs/view.py
python
SampleLogsView.create_ax_by_rows
(self, ax, ws, exp, rows)
Creates the plots for given rows onto axis ax
Creates the plots for given rows onto axis ax
[ "Creates", "the", "plots", "for", "given", "rows", "onto", "axis", "ax" ]
def create_ax_by_rows(self, ax, ws, exp, rows): """Creates the plots for given rows onto axis ax""" for row in rows: log_text = self.get_row_log_name(row) ax.plot(ws, LogName=log_text, label=log_text, FullTime=not self.f...
[ "def", "create_ax_by_rows", "(", "self", ",", "ax", ",", "ws", ",", "exp", ",", "rows", ")", ":", "for", "row", "in", "rows", ":", "log_text", "=", "self", ".", "get_row_log_name", "(", "row", ")", "ax", ".", "plot", "(", "ws", ",", "LogName", "=",...
https://github.com/mantidproject/mantid/blob/03deeb89254ec4289edb8771e0188c2090a02f32/qt/python/mantidqt/mantidqt/widgets/samplelogs/view.py#L185-L198
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/pandas/py2/pandas/core/frame.py
python
DataFrame.itertuples
(self, index=True, name="Pandas")
return zip(*arrays)
Iterate over DataFrame rows as namedtuples. Parameters ---------- index : bool, default True If True, return the index as the first element of the tuple. name : str or None, default "Pandas" The name of the returned namedtuples or None to return regular ...
Iterate over DataFrame rows as namedtuples.
[ "Iterate", "over", "DataFrame", "rows", "as", "namedtuples", "." ]
def itertuples(self, index=True, name="Pandas"): """ Iterate over DataFrame rows as namedtuples. Parameters ---------- index : bool, default True If True, return the index as the first element of the tuple. name : str or None, default "Pandas" The...
[ "def", "itertuples", "(", "self", ",", "index", "=", "True", ",", "name", "=", "\"Pandas\"", ")", ":", "arrays", "=", "[", "]", "fields", "=", "list", "(", "self", ".", "columns", ")", "if", "index", ":", "arrays", ".", "append", "(", "self", ".", ...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/pandas/py2/pandas/core/frame.py#L849-L933
wlanjie/AndroidFFmpeg
7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf
tools/fdk-aac-build/armeabi-v7a/toolchain/lib/python2.7/robotparser.py
python
RobotFileParser.modified
(self)
Sets the time the robots.txt file was last fetched to the current time.
Sets the time the robots.txt file was last fetched to the current time.
[ "Sets", "the", "time", "the", "robots", ".", "txt", "file", "was", "last", "fetched", "to", "the", "current", "time", "." ]
def modified(self): """Sets the time the robots.txt file was last fetched to the current time. """ import time self.last_checked = time.time()
[ "def", "modified", "(", "self", ")", ":", "import", "time", "self", ".", "last_checked", "=", "time", ".", "time", "(", ")" ]
https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/armeabi-v7a/toolchain/lib/python2.7/robotparser.py#L41-L47
lmb-freiburg/ogn
974f72ef4bf840d6f6693d22d1843a79223e77ce
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/lmb-freiburg/ogn/blob/974f72ef4bf840d6f6693d22d1843a79223e77ce/scripts/cpp_lint.py#L861-L863
Xilinx/Vitis-AI
fc74d404563d9951b57245443c73bef389f3657f
tools/Vitis-AI-Quantizer/vai_q_tensorflow1.x/tensorflow/contrib/linear_optimizer/python/ops/sparse_feature_column.py
python
SparseFeatureColumn.example_indices
(self)
return self._example_indices
The example indices represented as a dense tensor. Returns: A 1-D Tensor of int64 with shape `[N]`.
The example indices represented as a dense tensor.
[ "The", "example", "indices", "represented", "as", "a", "dense", "tensor", "." ]
def example_indices(self): """The example indices represented as a dense tensor. Returns: A 1-D Tensor of int64 with shape `[N]`. """ return self._example_indices
[ "def", "example_indices", "(", "self", ")", ":", "return", "self", ".", "_example_indices" ]
https://github.com/Xilinx/Vitis-AI/blob/fc74d404563d9951b57245443c73bef389f3657f/tools/Vitis-AI-Quantizer/vai_q_tensorflow1.x/tensorflow/contrib/linear_optimizer/python/ops/sparse_feature_column.py#L108-L114
Polidea/SiriusObfuscator
b0e590d8130e97856afe578869b83a209e2b19be
SymbolExtractorAndRenamer/lldb/scripts/Python/static-binding/lldb.py
python
SBDebugger.SetSelectedPlatform
(self, *args)
return _lldb.SBDebugger_SetSelectedPlatform(self, *args)
SetSelectedPlatform(self, SBPlatform platform)
SetSelectedPlatform(self, SBPlatform platform)
[ "SetSelectedPlatform", "(", "self", "SBPlatform", "platform", ")" ]
def SetSelectedPlatform(self, *args): """SetSelectedPlatform(self, SBPlatform platform)""" return _lldb.SBDebugger_SetSelectedPlatform(self, *args)
[ "def", "SetSelectedPlatform", "(", "self", ",", "*", "args", ")", ":", "return", "_lldb", ".", "SBDebugger_SetSelectedPlatform", "(", "self", ",", "*", "args", ")" ]
https://github.com/Polidea/SiriusObfuscator/blob/b0e590d8130e97856afe578869b83a209e2b19be/SymbolExtractorAndRenamer/lldb/scripts/Python/static-binding/lldb.py#L3326-L3328
y123456yz/reading-and-annotate-mongodb-3.6
93280293672ca7586dc24af18132aa61e4ed7fcf
mongo/buildscripts/buildlogger.py
python
wrap_global
(command)
return returncode
call the given command, intercept its stdout and stderr, and send results in batches of 100 lines or 10s to the buildlogger webapp. see :func:`append_global_logs` for the difference between "global" and "test" log output.
call the given command, intercept its stdout and stderr, and send results in batches of 100 lines or 10s to the buildlogger webapp. see :func:`append_global_logs` for the difference between "global" and "test" log output.
[ "call", "the", "given", "command", "intercept", "its", "stdout", "and", "stderr", "and", "send", "results", "in", "batches", "of", "100", "lines", "or", "10s", "to", "the", "buildlogger", "webapp", ".", "see", ":", "func", ":", "append_global_logs", "for", ...
def wrap_global(command): """ call the given command, intercept its stdout and stderr, and send results in batches of 100 lines or 10s to the buildlogger webapp. see :func:`append_global_logs` for the difference between "global" and "test" log output. """ # get builder name and build number...
[ "def", "wrap_global", "(", "command", ")", ":", "# get builder name and build number from environment", "builder", "=", "os", ".", "environ", ".", "get", "(", "'MONGO_BUILDER_NAME'", ")", "buildnum", "=", "os", ".", "environ", ".", "get", "(", "'MONGO_BUILD_NUMBER'"...
https://github.com/y123456yz/reading-and-annotate-mongodb-3.6/blob/93280293672ca7586dc24af18132aa61e4ed7fcf/mongo/buildscripts/buildlogger.py#L350-L393
cms-sw/cmssw
fd9de012d503d3405420bcbeec0ec879baa57cf2
Configuration/AlCa/python/GlobalTag.py
python
checkPrefix
(mainList, inputGTParams)
return -1
Compares two input GTs to see if they have the same prefix. Returns the index in the internal list of GTs of the match or -1 in case of no match.
Compares two input GTs to see if they have the same prefix. Returns the index in the internal list of GTs of the match or -1 in case of no match.
[ "Compares", "two", "input", "GTs", "to", "see", "if", "they", "have", "the", "same", "prefix", ".", "Returns", "the", "index", "in", "the", "internal", "list", "of", "GTs", "of", "the", "match", "or", "-", "1", "in", "case", "of", "no", "match", "." ...
def checkPrefix(mainList, inputGTParams): """ Compares two input GTs to see if they have the same prefix. Returns the index in the internal list of GTs of the match or -1 in case of no match. """ if inputGTParams.find("_") == -1: raise Exception("Invalid GT name. It does not contain an _, it cannot ...
[ "def", "checkPrefix", "(", "mainList", ",", "inputGTParams", ")", ":", "if", "inputGTParams", ".", "find", "(", "\"_\"", ")", "==", "-", "1", ":", "raise", "Exception", "(", "\"Invalid GT name. It does not contain an _, it cannot be used for replacements.\"", ")", "pr...
https://github.com/cms-sw/cmssw/blob/fd9de012d503d3405420bcbeec0ec879baa57cf2/Configuration/AlCa/python/GlobalTag.py#L4-L13
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/scipy/py3/scipy/sparse/csr.py
python
csr_matrix.getcol
(self, i)
return self._get_submatrix(slice(None), i)
Returns a copy of column i of the matrix, as a (m x 1) CSR matrix (column vector).
Returns a copy of column i of the matrix, as a (m x 1) CSR matrix (column vector).
[ "Returns", "a", "copy", "of", "column", "i", "of", "the", "matrix", "as", "a", "(", "m", "x", "1", ")", "CSR", "matrix", "(", "column", "vector", ")", "." ]
def getcol(self, i): """Returns a copy of column i of the matrix, as a (m x 1) CSR matrix (column vector). """ return self._get_submatrix(slice(None), i)
[ "def", "getcol", "(", "self", ",", "i", ")", ":", "return", "self", ".", "_get_submatrix", "(", "slice", "(", "None", ")", ",", "i", ")" ]
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/scipy/py3/scipy/sparse/csr.py#L384-L388
stack-of-tasks/pinocchio
593d4d43fded997bb9aa2421f4e55294dbd233c4
bindings/python/pinocchio/visualize/base_visualizer.py
python
BaseVisualizer.captureImage
(self)
Captures an image from the viewer and returns an RGB array.
Captures an image from the viewer and returns an RGB array.
[ "Captures", "an", "image", "from", "the", "viewer", "and", "returns", "an", "RGB", "array", "." ]
def captureImage(self): """Captures an image from the viewer and returns an RGB array.""" pass
[ "def", "captureImage", "(", "self", ")", ":", "pass" ]
https://github.com/stack-of-tasks/pinocchio/blob/593d4d43fded997bb9aa2421f4e55294dbd233c4/bindings/python/pinocchio/visualize/base_visualizer.py#L78-L80
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/tkinter/__init__.py
python
Misc.event_add
(self, virtual, *sequences)
Bind a virtual event VIRTUAL (of the form <<Name>>) to an event SEQUENCE such that the virtual event is triggered whenever SEQUENCE occurs.
Bind a virtual event VIRTUAL (of the form <<Name>>) to an event SEQUENCE such that the virtual event is triggered whenever SEQUENCE occurs.
[ "Bind", "a", "virtual", "event", "VIRTUAL", "(", "of", "the", "form", "<<Name", ">>", ")", "to", "an", "event", "SEQUENCE", "such", "that", "the", "virtual", "event", "is", "triggered", "whenever", "SEQUENCE", "occurs", "." ]
def event_add(self, virtual, *sequences): """Bind a virtual event VIRTUAL (of the form <<Name>>) to an event SEQUENCE such that the virtual event is triggered whenever SEQUENCE occurs.""" args = ('event', 'add', virtual) + sequences self.tk.call(args)
[ "def", "event_add", "(", "self", ",", "virtual", ",", "*", "sequences", ")", ":", "args", "=", "(", "'event'", ",", "'add'", ",", "virtual", ")", "+", "sequences", "self", ".", "tk", ".", "call", "(", "args", ")" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/tkinter/__init__.py#L1654-L1659
miyosuda/TensorFlowAndroidDemo
35903e0221aa5f109ea2dbef27f20b52e317f42d
jni-build/jni/include/tensorflow/python/ops/variable_scope.py
python
VariableScope.reuse_variables
(self)
Reuse variables in this scope.
Reuse variables in this scope.
[ "Reuse", "variables", "in", "this", "scope", "." ]
def reuse_variables(self): """Reuse variables in this scope.""" self._reuse = True
[ "def", "reuse_variables", "(", "self", ")", ":", "self", ".", "_reuse", "=", "True" ]
https://github.com/miyosuda/TensorFlowAndroidDemo/blob/35903e0221aa5f109ea2dbef27f20b52e317f42d/jni-build/jni/include/tensorflow/python/ops/variable_scope.py#L636-L638
apiaryio/drafter
4634ebd07f6c6f257cc656598ccd535492fdfb55
tools/gyp/pylib/gyp/xcode_emulation.py
python
XcodeSettings.GetInstallNameBase
(self)
return install_base
Return DYLIB_INSTALL_NAME_BASE for this target.
Return DYLIB_INSTALL_NAME_BASE for this target.
[ "Return", "DYLIB_INSTALL_NAME_BASE", "for", "this", "target", "." ]
def GetInstallNameBase(self): """Return DYLIB_INSTALL_NAME_BASE for this target.""" # Xcode sets this for shared_libraries, and for nonbundled loadable_modules. if (self.spec['type'] != 'shared_library' and (self.spec['type'] != 'loadable_module' or self._IsBundle())): return None install_...
[ "def", "GetInstallNameBase", "(", "self", ")", ":", "# Xcode sets this for shared_libraries, and for nonbundled loadable_modules.", "if", "(", "self", ".", "spec", "[", "'type'", "]", "!=", "'shared_library'", "and", "(", "self", ".", "spec", "[", "'type'", "]", "!=...
https://github.com/apiaryio/drafter/blob/4634ebd07f6c6f257cc656598ccd535492fdfb55/tools/gyp/pylib/gyp/xcode_emulation.py#L690-L699
ChromiumWebApps/chromium
c7361d39be8abd1574e6ce8957c8dbddd4c6ccf7
third_party/protobuf/python/mox.py
python
IsA.__init__
(self, class_name)
Initialize IsA Args: class_name: basic python type or a class
Initialize IsA
[ "Initialize", "IsA" ]
def __init__(self, class_name): """Initialize IsA Args: class_name: basic python type or a class """ self._class_name = class_name
[ "def", "__init__", "(", "self", ",", "class_name", ")", ":", "self", ".", "_class_name", "=", "class_name" ]
https://github.com/ChromiumWebApps/chromium/blob/c7361d39be8abd1574e6ce8957c8dbddd4c6ccf7/third_party/protobuf/python/mox.py#L798-L805
NicknineTheEagle/TF2-Base
20459c5a7fbc995b6bf54fa85c2f62a101e9fb64
src/thirdparty/protobuf-2.3.0/python/google/protobuf/reflection.py
python
_BytesForNonRepeatedElement
(value, field_number, field_type)
Returns the number of bytes needed to serialize a non-repeated element. The returned byte count includes space for tag information and any other additional space associated with serializing value. Args: value: Value we're serializing. field_number: Field number of this value. (Since the field number ...
Returns the number of bytes needed to serialize a non-repeated element. The returned byte count includes space for tag information and any other additional space associated with serializing value.
[ "Returns", "the", "number", "of", "bytes", "needed", "to", "serialize", "a", "non", "-", "repeated", "element", ".", "The", "returned", "byte", "count", "includes", "space", "for", "tag", "information", "and", "any", "other", "additional", "space", "associated...
def _BytesForNonRepeatedElement(value, field_number, field_type): """Returns the number of bytes needed to serialize a non-repeated element. The returned byte count includes space for tag information and any other additional space associated with serializing value. Args: value: Value we're serializing. ...
[ "def", "_BytesForNonRepeatedElement", "(", "value", ",", "field_number", ",", "field_type", ")", ":", "try", ":", "fn", "=", "type_checkers", ".", "TYPE_TO_BYTE_SIZE_FN", "[", "field_type", "]", "return", "fn", "(", "field_number", ",", "value", ")", "except", ...
https://github.com/NicknineTheEagle/TF2-Base/blob/20459c5a7fbc995b6bf54fa85c2f62a101e9fb64/src/thirdparty/protobuf-2.3.0/python/google/protobuf/reflection.py#L748-L765
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/multiprocessing/connection.py
python
_ConnectionBase.recv_bytes
(self, maxlength=None)
return buf.getvalue()
Receive bytes data as a bytes object.
Receive bytes data as a bytes object.
[ "Receive", "bytes", "data", "as", "a", "bytes", "object", "." ]
def recv_bytes(self, maxlength=None): """ Receive bytes data as a bytes object. """ self._check_closed() self._check_readable() if maxlength is not None and maxlength < 0: raise ValueError("negative maxlength") buf = self._recv_bytes(maxlength) ...
[ "def", "recv_bytes", "(", "self", ",", "maxlength", "=", "None", ")", ":", "self", ".", "_check_closed", "(", ")", "self", ".", "_check_readable", "(", ")", "if", "maxlength", "is", "not", "None", "and", "maxlength", "<", "0", ":", "raise", "ValueError",...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/multiprocessing/connection.py#L208-L219
BlzFans/wke
b0fa21158312e40c5fbd84682d643022b6c34a93
cygwin/lib/python2.6/distutils/sysconfig.py
python
get_config_vars
(*args)
With no arguments, return a dictionary of all configuration variables relevant for the current platform. Generally this includes everything needed to build extensions and install both pure modules and extensions. On Unix, this means every variable defined in Python's installed Makefile; on Windows and...
With no arguments, return a dictionary of all configuration variables relevant for the current platform. Generally this includes everything needed to build extensions and install both pure modules and extensions. On Unix, this means every variable defined in Python's installed Makefile; on Windows and...
[ "With", "no", "arguments", "return", "a", "dictionary", "of", "all", "configuration", "variables", "relevant", "for", "the", "current", "platform", ".", "Generally", "this", "includes", "everything", "needed", "to", "build", "extensions", "and", "install", "both",...
def get_config_vars(*args): """With no arguments, return a dictionary of all configuration variables relevant for the current platform. Generally this includes everything needed to build extensions and install both pure modules and extensions. On Unix, this means every variable defined in Python's ...
[ "def", "get_config_vars", "(", "*", "args", ")", ":", "global", "_config_vars", "if", "_config_vars", "is", "None", ":", "func", "=", "globals", "(", ")", ".", "get", "(", "\"_init_\"", "+", "os", ".", "name", ")", "if", "func", ":", "func", "(", ")"...
https://github.com/BlzFans/wke/blob/b0fa21158312e40c5fbd84682d643022b6c34a93/cygwin/lib/python2.6/distutils/sysconfig.py#L507-L598
windystrife/UnrealEngine_NVIDIAGameWorks
b50e6338a7c5b26374d66306ebc7807541ff815e
Engine/Extras/ThirdPartyNotUE/emsdk/Win64/python/2.7.5.3_64bit/Lib/hashlib.py
python
__hash_new
(name, string='')
new(name, string='') - Return a new hashing object using the named algorithm; optionally initialized with a string.
new(name, string='') - Return a new hashing object using the named algorithm; optionally initialized with a string.
[ "new", "(", "name", "string", "=", ")", "-", "Return", "a", "new", "hashing", "object", "using", "the", "named", "algorithm", ";", "optionally", "initialized", "with", "a", "string", "." ]
def __hash_new(name, string=''): """new(name, string='') - Return a new hashing object using the named algorithm; optionally initialized with a string. """ try: return _hashlib.new(name, string) except ValueError: # If the _hashlib module (OpenSSL) doesn't support the named #...
[ "def", "__hash_new", "(", "name", ",", "string", "=", "''", ")", ":", "try", ":", "return", "_hashlib", ".", "new", "(", "name", ",", "string", ")", "except", "ValueError", ":", "# If the _hashlib module (OpenSSL) doesn't support the named", "# hash, try using our b...
https://github.com/windystrife/UnrealEngine_NVIDIAGameWorks/blob/b50e6338a7c5b26374d66306ebc7807541ff815e/Engine/Extras/ThirdPartyNotUE/emsdk/Win64/python/2.7.5.3_64bit/Lib/hashlib.py#L113-L124
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/pandas/py2/pandas/core/arrays/sparse.py
python
SparseArray.fill_value
(self)
return self.dtype.fill_value
Elements in `data` that are `fill_value` are not stored. For memory savings, this should be the most common value in the array.
Elements in `data` that are `fill_value` are not stored.
[ "Elements", "in", "data", "that", "are", "fill_value", "are", "not", "stored", "." ]
def fill_value(self): """ Elements in `data` that are `fill_value` are not stored. For memory savings, this should be the most common value in the array. """ return self.dtype.fill_value
[ "def", "fill_value", "(", "self", ")", ":", "return", "self", ".", "dtype", ".", "fill_value" ]
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/pandas/py2/pandas/core/arrays/sparse.py#L750-L756
SequoiaDB/SequoiaDB
2894ed7e5bd6fe57330afc900cf76d0ff0df9f64
tools/server/php_linux/libxml2/lib/python2.4/site-packages/libxml2.py
python
parserCtxt.ctxtReadMemory
(self, buffer, size, URL, encoding, options)
return __tmp
parse an XML in-memory document and build a tree. This reuses the existing @ctxt parser context
parse an XML in-memory document and build a tree. This reuses the existing
[ "parse", "an", "XML", "in", "-", "memory", "document", "and", "build", "a", "tree", ".", "This", "reuses", "the", "existing" ]
def ctxtReadMemory(self, buffer, size, URL, encoding, options): """parse an XML in-memory document and build a tree. This reuses the existing @ctxt parser context """ ret = libxml2mod.xmlCtxtReadMemory(self._o, buffer, size, URL, encoding, options) if ret is None:raise treeError('xmlC...
[ "def", "ctxtReadMemory", "(", "self", ",", "buffer", ",", "size", ",", "URL", ",", "encoding", ",", "options", ")", ":", "ret", "=", "libxml2mod", ".", "xmlCtxtReadMemory", "(", "self", ".", "_o", ",", "buffer", ",", "size", ",", "URL", ",", "encoding"...
https://github.com/SequoiaDB/SequoiaDB/blob/2894ed7e5bd6fe57330afc900cf76d0ff0df9f64/tools/server/php_linux/libxml2/lib/python2.4/site-packages/libxml2.py#L5012-L5018
kamyu104/LeetCode-Solutions
77605708a927ea3b85aee5a479db733938c7c211
Python/pairs-of-songs-with-total-durations-divisible-by-60.py
python
Solution.numPairsDivisibleBy60
(self, time)
return result
:type time: List[int] :rtype: int
:type time: List[int] :rtype: int
[ ":", "type", "time", ":", "List", "[", "int", "]", ":", "rtype", ":", "int" ]
def numPairsDivisibleBy60(self, time): """ :type time: List[int] :rtype: int """ result = 0 count = collections.Counter() for t in time: result += count[-t%60] count[t%60] += 1 return result
[ "def", "numPairsDivisibleBy60", "(", "self", ",", "time", ")", ":", "result", "=", "0", "count", "=", "collections", ".", "Counter", "(", ")", "for", "t", "in", "time", ":", "result", "+=", "count", "[", "-", "t", "%", "60", "]", "count", "[", "t",...
https://github.com/kamyu104/LeetCode-Solutions/blob/77605708a927ea3b85aee5a479db733938c7c211/Python/pairs-of-songs-with-total-durations-divisible-by-60.py#L8-L18
larroy/clearskies_core
3574ddf0edc8555454c7044126e786a6c29444dc
tools/gyp/pylib/gyp/xcodeproj_file.py
python
XCConfigurationList.SetBuildSetting
(self, key, value)
Sets the build setting for key to value in all child XCBuildConfiguration objects.
Sets the build setting for key to value in all child XCBuildConfiguration objects.
[ "Sets", "the", "build", "setting", "for", "key", "to", "value", "in", "all", "child", "XCBuildConfiguration", "objects", "." ]
def SetBuildSetting(self, key, value): """Sets the build setting for key to value in all child XCBuildConfiguration objects. """ for configuration in self._properties['buildConfigurations']: configuration.SetBuildSetting(key, value)
[ "def", "SetBuildSetting", "(", "self", ",", "key", ",", "value", ")", ":", "for", "configuration", "in", "self", ".", "_properties", "[", "'buildConfigurations'", "]", ":", "configuration", ".", "SetBuildSetting", "(", "key", ",", "value", ")" ]
https://github.com/larroy/clearskies_core/blob/3574ddf0edc8555454c7044126e786a6c29444dc/tools/gyp/pylib/gyp/xcodeproj_file.py#L1670-L1676
okex/V3-Open-API-SDK
c5abb0db7e2287718e0055e17e57672ce0ec7fd9
okex-python-sdk-api/venv/Lib/site-packages/pip-19.0.3-py3.8.egg/pip/_vendor/distlib/_backport/tarfile.py
python
TarInfo.create_gnu_header
(self, info, encoding, errors)
return buf + self._create_header(info, GNU_FORMAT, encoding, errors)
Return the object as a GNU header block sequence.
Return the object as a GNU header block sequence.
[ "Return", "the", "object", "as", "a", "GNU", "header", "block", "sequence", "." ]
def create_gnu_header(self, info, encoding, errors): """Return the object as a GNU header block sequence. """ info["magic"] = GNU_MAGIC buf = b"" if len(info["linkname"]) > LENGTH_LINK: buf += self._create_gnu_long_header(info["linkname"], GNUTYPE_LONGLINK, encoding,...
[ "def", "create_gnu_header", "(", "self", ",", "info", ",", "encoding", ",", "errors", ")", ":", "info", "[", "\"magic\"", "]", "=", "GNU_MAGIC", "buf", "=", "b\"\"", "if", "len", "(", "info", "[", "\"linkname\"", "]", ")", ">", "LENGTH_LINK", ":", "buf...
https://github.com/okex/V3-Open-API-SDK/blob/c5abb0db7e2287718e0055e17e57672ce0ec7fd9/okex-python-sdk-api/venv/Lib/site-packages/pip-19.0.3-py3.8.egg/pip/_vendor/distlib/_backport/tarfile.py#L1029-L1041
adobe/chromium
cfe5bf0b51b1f6b9fe239c2a3c2f2364da9967d7
tools/site_compare/command_line.py
python
Command.StringToValue
(self, value, type, argstr)
return value
Convert a string from the command line to a value type.
Convert a string from the command line to a value type.
[ "Convert", "a", "string", "from", "the", "command", "line", "to", "a", "value", "type", "." ]
def StringToValue(self, value, type, argstr): """Convert a string from the command line to a value type.""" try: if type == 'string': pass # leave it be elif type == 'int': try: value = int(value) except ValueError: raise ParseError elif type == '...
[ "def", "StringToValue", "(", "self", ",", "value", ",", "type", ",", "argstr", ")", ":", "try", ":", "if", "type", "==", "'string'", ":", "pass", "# leave it be", "elif", "type", "==", "'int'", ":", "try", ":", "value", "=", "int", "(", "value", ")",...
https://github.com/adobe/chromium/blob/cfe5bf0b51b1f6b9fe239c2a3c2f2364da9967d7/tools/site_compare/command_line.py#L412-L447
MythTV/mythtv
d282a209cb8be85d036f85a62a8ec971b67d45f4
mythtv/programs/scripts/internetcontent/nv_python_libs/xsltfunctions/tedtalksXSL_api.py
python
xpathFunctions.parameterArgs
(self, parameters, terminatorChar=';')
return paramDict
Set the parameters for TedTalks return a dictionary of parameters
Set the parameters for TedTalks return a dictionary of parameters
[ "Set", "the", "parameters", "for", "TedTalks", "return", "a", "dictionary", "of", "parameters" ]
def parameterArgs(self, parameters, terminatorChar=';'): '''Set the parameters for TedTalks return a dictionary of parameters ''' paramDict = {} args = parameters.split(terminatorChar) for arg in args: tmp = arg.split('=') paramDict[tmp[0]] = tmp[1...
[ "def", "parameterArgs", "(", "self", ",", "parameters", ",", "terminatorChar", "=", "';'", ")", ":", "paramDict", "=", "{", "}", "args", "=", "parameters", ".", "split", "(", "terminatorChar", ")", "for", "arg", "in", "args", ":", "tmp", "=", "arg", "....
https://github.com/MythTV/mythtv/blob/d282a209cb8be85d036f85a62a8ec971b67d45f4/mythtv/programs/scripts/internetcontent/nv_python_libs/xsltfunctions/tedtalksXSL_api.py#L245-L254
PaddlePaddle/Paddle
1252f4bb3e574df80aa6d18c7ddae1b3a90bd81c
python/paddle/fluid/framework.py
python
Program.parse_from_string
(binary_str)
return p
.. note:: 1. All information about parameters will be lost after serialization; 2. This API has no effect in Dygraph mode. Deserialize a Program from `protobuf <https://en.wikipedia.org/wiki/Protocol_Buffers>`_ binary string. This method always use to save and load model ...
.. note:: 1. All information about parameters will be lost after serialization; 2. This API has no effect in Dygraph mode.
[ "..", "note", "::", "1", ".", "All", "information", "about", "parameters", "will", "be", "lost", "after", "serialization", ";", "2", ".", "This", "API", "has", "no", "effect", "in", "Dygraph", "mode", "." ]
def parse_from_string(binary_str): """ .. note:: 1. All information about parameters will be lost after serialization; 2. This API has no effect in Dygraph mode. Deserialize a Program from `protobuf <https://en.wikipedia.org/wiki/Protocol_Buffers>`_ binary string. ...
[ "def", "parse_from_string", "(", "binary_str", ")", ":", "p", "=", "Program", "(", ")", "p", ".", "desc", "=", "core", ".", "ProgramDesc", "(", "binary_str", ")", "p", ".", "blocks", "=", "[", "Block", "(", "p", ",", "i", ")", "for", "i", "in", "...
https://github.com/PaddlePaddle/Paddle/blob/1252f4bb3e574df80aa6d18c7ddae1b3a90bd81c/python/paddle/fluid/framework.py#L5585-L5628
tensorflow/tensorflow
419e3a6b650ea4bd1b0cba23c4348f8a69f3272e
tensorflow/examples/custom_ops_doc/multiplex_2/multiplex_2_op.py
python
multiplex
(cond, a, b, name=None)
return examples_multiplex_dense( cond=cond, a=a, b=b, name=name)
Return elements chosen from `a` or `b` depending on `cond`. This is similar to `np.where` and `tf.where`, but simplified to only handle the case of dense tensors, no optional parameters, no broadcasting, etc.. >>> multiplex([True, False, False, True], [1,2,3,4], [100,200,300,400]) <tf.Tensor: shape=(4,), dtyp...
Return elements chosen from `a` or `b` depending on `cond`.
[ "Return", "elements", "chosen", "from", "a", "or", "b", "depending", "on", "cond", "." ]
def multiplex(cond, a, b, name=None): """Return elements chosen from `a` or `b` depending on `cond`. This is similar to `np.where` and `tf.where`, but simplified to only handle the case of dense tensors, no optional parameters, no broadcasting, etc.. >>> multiplex([True, False, False, True], [1,2,3,4], [100,2...
[ "def", "multiplex", "(", "cond", ",", "a", ",", "b", ",", "name", "=", "None", ")", ":", "return", "examples_multiplex_dense", "(", "cond", "=", "cond", ",", "a", "=", "a", ",", "b", "=", "b", ",", "name", "=", "name", ")" ]
https://github.com/tensorflow/tensorflow/blob/419e3a6b650ea4bd1b0cba23c4348f8a69f3272e/tensorflow/examples/custom_ops_doc/multiplex_2/multiplex_2_op.py#L30-L50
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/msw/stc.py
python
StyledTextCtrl.LineEndExtend
(*args, **kwargs)
return _stc.StyledTextCtrl_LineEndExtend(*args, **kwargs)
LineEndExtend(self) Move caret to last position on line extending selection to new caret position.
LineEndExtend(self)
[ "LineEndExtend", "(", "self", ")" ]
def LineEndExtend(*args, **kwargs): """ LineEndExtend(self) Move caret to last position on line extending selection to new caret position. """ return _stc.StyledTextCtrl_LineEndExtend(*args, **kwargs)
[ "def", "LineEndExtend", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_stc", ".", "StyledTextCtrl_LineEndExtend", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/msw/stc.py#L4448-L4454
wlanjie/AndroidFFmpeg
7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf
tools/fdk-aac-build/x86/toolchain/lib/python2.7/imputil.py
python
ImportManager.install
(self, namespace=vars(__builtin__))
Install this ImportManager into the specified namespace.
Install this ImportManager into the specified namespace.
[ "Install", "this", "ImportManager", "into", "the", "specified", "namespace", "." ]
def install(self, namespace=vars(__builtin__)): "Install this ImportManager into the specified namespace." if isinstance(namespace, _ModuleType): namespace = vars(namespace) # Note: we have no notion of "chaining" # Record the previous import hook, then install our own. ...
[ "def", "install", "(", "self", ",", "namespace", "=", "vars", "(", "__builtin__", ")", ")", ":", "if", "isinstance", "(", "namespace", ",", "_ModuleType", ")", ":", "namespace", "=", "vars", "(", "namespace", ")", "# Note: we have no notion of \"chaining\"", "...
https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/x86/toolchain/lib/python2.7/imputil.py#L33-L44
Xilinx/Vitis-AI
fc74d404563d9951b57245443c73bef389f3657f
tools/Vitis-AI-Quantizer/vai_q_tensorflow1.x/tensorflow/python/ops/nccl_ops.py
python
_all_sum_grad
(op, grad)
The gradients for `all_sum`. Args: op: The `all_sum` `Operation` that we are differentiating. grad: Gradient with respect to the output of the `all_sum` op. Returns: The gradient with respect to the output of `all_sum`. Raises: LookupError: If `reduction` is not `sum`.
The gradients for `all_sum`.
[ "The", "gradients", "for", "all_sum", "." ]
def _all_sum_grad(op, grad): """The gradients for `all_sum`. Args: op: The `all_sum` `Operation` that we are differentiating. grad: Gradient with respect to the output of the `all_sum` op. Returns: The gradient with respect to the output of `all_sum`. Raises: LookupError: If `reduction` is no...
[ "def", "_all_sum_grad", "(", "op", ",", "grad", ")", ":", "if", "op", ".", "get_attr", "(", "'reduction'", ")", "!=", "b'sum'", ":", "raise", "LookupError", "(", "'No gradient defined for NcclAllReduce except sum.'", ")", "_check_device", "(", "grad", ",", "expe...
https://github.com/Xilinx/Vitis-AI/blob/fc74d404563d9951b57245443c73bef389f3657f/tools/Vitis-AI-Quantizer/vai_q_tensorflow1.x/tensorflow/python/ops/nccl_ops.py#L51-L76
Polidea/SiriusObfuscator
b0e590d8130e97856afe578869b83a209e2b19be
SymbolExtractorAndRenamer/clang/bindings/python/clang/cindex.py
python
Cursor.is_mutable_field
(self)
return conf.lib.clang_CXXField_isMutable(self)
Returns True if the cursor refers to a C++ field that is declared 'mutable'.
Returns True if the cursor refers to a C++ field that is declared 'mutable'.
[ "Returns", "True", "if", "the", "cursor", "refers", "to", "a", "C", "++", "field", "that", "is", "declared", "mutable", "." ]
def is_mutable_field(self): """Returns True if the cursor refers to a C++ field that is declared 'mutable'. """ return conf.lib.clang_CXXField_isMutable(self)
[ "def", "is_mutable_field", "(", "self", ")", ":", "return", "conf", ".", "lib", ".", "clang_CXXField_isMutable", "(", "self", ")" ]
https://github.com/Polidea/SiriusObfuscator/blob/b0e590d8130e97856afe578869b83a209e2b19be/SymbolExtractorAndRenamer/clang/bindings/python/clang/cindex.py#L1378-L1382
panda3d/panda3d
833ad89ebad58395d0af0b7ec08538e5e4308265
direct/src/showbase/ShowBase.py
python
ShowBase.setupMouse
(self, win, fMultiWin=False)
return self.buttonThrowers[0]
Creates the structures necessary to monitor the mouse input, using the indicated window. If the mouse has already been set up for a different window, those structures are deleted first. :param fMultiWin: If True, then the previous mouse structures are not deleted; ins...
Creates the structures necessary to monitor the mouse input, using the indicated window. If the mouse has already been set up for a different window, those structures are deleted first.
[ "Creates", "the", "structures", "necessary", "to", "monitor", "the", "mouse", "input", "using", "the", "indicated", "window", ".", "If", "the", "mouse", "has", "already", "been", "set", "up", "for", "a", "different", "window", "those", "structures", "are", "...
def setupMouse(self, win, fMultiWin=False): """ Creates the structures necessary to monitor the mouse input, using the indicated window. If the mouse has already been set up for a different window, those structures are deleted first. :param fMultiWin: If True, then the previous...
[ "def", "setupMouse", "(", "self", ",", "win", ",", "fMultiWin", "=", "False", ")", ":", "if", "not", "fMultiWin", "and", "self", ".", "buttonThrowers", "is", "not", "None", ":", "for", "bt", "in", "self", ".", "buttonThrowers", ":", "mw", "=", "bt", ...
https://github.com/panda3d/panda3d/blob/833ad89ebad58395d0af0b7ec08538e5e4308265/direct/src/showbase/ShowBase.py#L1601-L1668
apple/turicreate
cce55aa5311300e3ce6af93cb45ba791fd1bdf49
deps/src/libxml2-2.9.1/python/libxml2class.py
python
parserCtxt.parseElement
(self)
parse an XML element, this is highly recursive [39] element ::= EmptyElemTag | STag content ETag [ WFC: Element Type Match ] The Name in an element's end-tag must match the element type in the start-tag.
parse an XML element, this is highly recursive [39] element ::= EmptyElemTag | STag content ETag [ WFC: Element Type Match ] The Name in an element's end-tag must match the element type in the start-tag.
[ "parse", "an", "XML", "element", "this", "is", "highly", "recursive", "[", "39", "]", "element", "::", "=", "EmptyElemTag", "|", "STag", "content", "ETag", "[", "WFC", ":", "Element", "Type", "Match", "]", "The", "Name", "in", "an", "element", "s", "en...
def parseElement(self): """parse an XML element, this is highly recursive [39] element ::= EmptyElemTag | STag content ETag [ WFC: Element Type Match ] The Name in an element's end-tag must match the element type in the start-tag. """ libxml2mod.xmlParseElement(self._o)
[ "def", "parseElement", "(", "self", ")", ":", "libxml2mod", ".", "xmlParseElement", "(", "self", ".", "_o", ")" ]
https://github.com/apple/turicreate/blob/cce55aa5311300e3ce6af93cb45ba791fd1bdf49/deps/src/libxml2-2.9.1/python/libxml2class.py#L4459-L4464
windystrife/UnrealEngine_NVIDIAGameWorks
b50e6338a7c5b26374d66306ebc7807541ff815e
Engine/Extras/ThirdPartyNotUE/emsdk/Win64/python/2.7.5.3_64bit/Lib/lib-tk/turtle.py
python
TurtleScreenBase._createline
(self)
return self.cv.create_line(0, 0, 0, 0, fill="", width=2, capstyle = TK.ROUND)
Create an invisible line item on canvas self.cv)
Create an invisible line item on canvas self.cv)
[ "Create", "an", "invisible", "line", "item", "on", "canvas", "self", ".", "cv", ")" ]
def _createline(self): """Create an invisible line item on canvas self.cv) """ return self.cv.create_line(0, 0, 0, 0, fill="", width=2, capstyle = TK.ROUND)
[ "def", "_createline", "(", "self", ")", ":", "return", "self", ".", "cv", ".", "create_line", "(", "0", ",", "0", ",", "0", ",", "0", ",", "fill", "=", "\"\"", ",", "width", "=", "2", ",", "capstyle", "=", "TK", ".", "ROUND", ")" ]
https://github.com/windystrife/UnrealEngine_NVIDIAGameWorks/blob/b50e6338a7c5b26374d66306ebc7807541ff815e/Engine/Extras/ThirdPartyNotUE/emsdk/Win64/python/2.7.5.3_64bit/Lib/lib-tk/turtle.py#L548-L552
pmq20/node-packer
12c46c6e44fbc14d9ee645ebd17d5296b324f7e0
lts/tools/gyp/tools/pretty_vcproj.py
python
main
(argv)
return 0
Main function of this vcproj prettifier.
Main function of this vcproj prettifier.
[ "Main", "function", "of", "this", "vcproj", "prettifier", "." ]
def main(argv): """Main function of this vcproj prettifier.""" global ARGUMENTS ARGUMENTS = argv # check if we have exactly 1 parameter. if len(argv) < 2: print('Usage: %s "c:\\path\\to\\vcproj.vcproj" [key1=value1] ' '[key2=value2]' % argv[0]) return 1 # Parse the keys for i in range(...
[ "def", "main", "(", "argv", ")", ":", "global", "ARGUMENTS", "ARGUMENTS", "=", "argv", "# check if we have exactly 1 parameter.", "if", "len", "(", "argv", ")", "<", "2", ":", "print", "(", "'Usage: %s \"c:\\\\path\\\\to\\\\vcproj.vcproj\" [key1=value1] '", "'[key2=valu...
https://github.com/pmq20/node-packer/blob/12c46c6e44fbc14d9ee645ebd17d5296b324f7e0/lts/tools/gyp/tools/pretty_vcproj.py#L287-L333
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
wx/tools/Editra/src/ed_vim.py
python
EditraCommander._GetPos
(self)
return self.stc.GetCurrentPos()
Get caret position
Get caret position
[ "Get", "caret", "position" ]
def _GetPos(self): """Get caret position""" return self.stc.GetCurrentPos()
[ "def", "_GetPos", "(", "self", ")", ":", "return", "self", ".", "stc", ".", "GetCurrentPos", "(", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/wx/tools/Editra/src/ed_vim.py#L155-L157
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/windows/Lib/_pyio.py
python
BufferedReader.read1
(self, size=-1)
Reads up to size bytes, with at most one read() system call.
Reads up to size bytes, with at most one read() system call.
[ "Reads", "up", "to", "size", "bytes", "with", "at", "most", "one", "read", "()", "system", "call", "." ]
def read1(self, size=-1): """Reads up to size bytes, with at most one read() system call.""" # Returns up to size bytes. If at least one byte is buffered, we # only return buffered bytes. Otherwise, we do one raw read. if size < 0: size = self.buffer_size if size ==...
[ "def", "read1", "(", "self", ",", "size", "=", "-", "1", ")", ":", "# Returns up to size bytes. If at least one byte is buffered, we", "# only return buffered bytes. Otherwise, we do one raw read.", "if", "size", "<", "0", ":", "size", "=", "self", ".", "buffer_size", ...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/windows/Lib/_pyio.py#L1098-L1109
mapnik/mapnik
f3da900c355e1d15059c4a91b00203dcc9d9f0ef
scons/scons-local-4.1.0/SCons/Variables/PathVariable.py
python
_PathVariableClass.PathIsDir
(key, val, env)
Validator to check if Path is a directory.
Validator to check if Path is a directory.
[ "Validator", "to", "check", "if", "Path", "is", "a", "directory", "." ]
def PathIsDir(key, val, env): """Validator to check if Path is a directory.""" if not os.path.isdir(val): if os.path.isfile(val): m = 'Directory path for option %s is a file: %s' else: m = 'Directory path for option %s does not exist: %s' ...
[ "def", "PathIsDir", "(", "key", ",", "val", ",", "env", ")", ":", "if", "not", "os", ".", "path", ".", "isdir", "(", "val", ")", ":", "if", "os", ".", "path", ".", "isfile", "(", "val", ")", ":", "m", "=", "'Directory path for option %s is a file: %s...
https://github.com/mapnik/mapnik/blob/f3da900c355e1d15059c4a91b00203dcc9d9f0ef/scons/scons-local-4.1.0/SCons/Variables/PathVariable.py#L81-L88
benoitsteiner/tensorflow-opencl
cb7cb40a57fde5cfd4731bc551e82a1e2fef43a5
tensorflow/python/keras/_impl/keras/backend.py
python
local_conv2d
(inputs, kernel, kernel_size, strides, output_shape, data_format=None)
return output
Apply 2D conv with un-shared weights. Arguments: inputs: 4D tensor with shape: (batch_size, filters, new_rows, new_cols) if data_format='channels_first' or 4D tensor with shape: (batch_size, new_rows, new_cols, filters) if data_format='chann...
Apply 2D conv with un-shared weights.
[ "Apply", "2D", "conv", "with", "un", "-", "shared", "weights", "." ]
def local_conv2d(inputs, kernel, kernel_size, strides, output_shape, data_format=None): """Apply 2D conv with un-shared weights. Arguments: inputs: 4D tensor with shape: (batch_size, filters, new_rows, new_cols...
[ "def", "local_conv2d", "(", "inputs", ",", "kernel", ",", "kernel_size", ",", "strides", ",", "output_shape", ",", "data_format", "=", "None", ")", ":", "if", "data_format", "is", "None", ":", "data_format", "=", "image_data_format", "(", ")", "if", "data_fo...
https://github.com/benoitsteiner/tensorflow-opencl/blob/cb7cb40a57fde5cfd4731bc551e82a1e2fef43a5/tensorflow/python/keras/_impl/keras/backend.py#L3632-L3699
okex/V3-Open-API-SDK
c5abb0db7e2287718e0055e17e57672ce0ec7fd9
okex-python-sdk-api/venv/Lib/site-packages/pip-19.0.3-py3.8.egg/pip/_vendor/requests/utils.py
python
get_netrc_auth
(url, raise_errors=False)
Returns the Requests tuple auth for a given url from netrc.
Returns the Requests tuple auth for a given url from netrc.
[ "Returns", "the", "Requests", "tuple", "auth", "for", "a", "given", "url", "from", "netrc", "." ]
def get_netrc_auth(url, raise_errors=False): """Returns the Requests tuple auth for a given url from netrc.""" try: from netrc import netrc, NetrcParseError netrc_path = None for f in NETRC_FILES: try: loc = os.path.expanduser('~/{}'.format(f)) ...
[ "def", "get_netrc_auth", "(", "url", ",", "raise_errors", "=", "False", ")", ":", "try", ":", "from", "netrc", "import", "netrc", ",", "NetrcParseError", "netrc_path", "=", "None", "for", "f", "in", "NETRC_FILES", ":", "try", ":", "loc", "=", "os", ".", ...
https://github.com/okex/V3-Open-API-SDK/blob/c5abb0db7e2287718e0055e17e57672ce0ec7fd9/okex-python-sdk-api/venv/Lib/site-packages/pip-19.0.3-py3.8.egg/pip/_vendor/requests/utils.py#L168-L216
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/site-packages/botocore/configprovider.py
python
InstanceVarProvider.__init__
(self, instance_var, session)
Initialize InstanceVarProvider. :type instance_var: str :param instance_var: The instance variable to load from the session. :type session: :class:`botocore.session.Session` :param session: The botocore session to get the loaded configuration file variables from.
Initialize InstanceVarProvider.
[ "Initialize", "InstanceVarProvider", "." ]
def __init__(self, instance_var, session): """Initialize InstanceVarProvider. :type instance_var: str :param instance_var: The instance variable to load from the session. :type session: :class:`botocore.session.Session` :param session: The botocore session to get the loaded con...
[ "def", "__init__", "(", "self", ",", "instance_var", ",", "session", ")", ":", "self", ".", "_instance_var", "=", "instance_var", "self", ".", "_session", "=", "session" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/site-packages/botocore/configprovider.py#L406-L417
LiquidPlayer/LiquidCore
9405979363f2353ac9a71ad8ab59685dd7f919c9
deps/node-10.15.3/deps/v8/third_party/jinja2/meta.py
python
TrackingCodeGenerator.enter_frame
(self, frame)
Remember all undeclared identifiers.
Remember all undeclared identifiers.
[ "Remember", "all", "undeclared", "identifiers", "." ]
def enter_frame(self, frame): """Remember all undeclared identifiers.""" CodeGenerator.enter_frame(self, frame) for _, (action, param) in iteritems(frame.symbols.loads): if action == 'resolve': self.undeclared_identifiers.add(param)
[ "def", "enter_frame", "(", "self", ",", "frame", ")", ":", "CodeGenerator", ".", "enter_frame", "(", "self", ",", "frame", ")", "for", "_", ",", "(", "action", ",", "param", ")", "in", "iteritems", "(", "frame", ".", "symbols", ".", "loads", ")", ":"...
https://github.com/LiquidPlayer/LiquidCore/blob/9405979363f2353ac9a71ad8ab59685dd7f919c9/deps/node-10.15.3/deps/v8/third_party/jinja2/meta.py#L28-L33