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
mantidproject/mantid
03deeb89254ec4289edb8771e0188c2090a02f32
scripts/LargeScaleStructures/data_stitching.py
python
DataSet.get_range
(self)
return self._xmin, self._xmax
Return the Q range for this data set
Return the Q range for this data set
[ "Return", "the", "Q", "range", "for", "this", "data", "set" ]
def get_range(self): """ Return the Q range for this data set """ return self._xmin, self._xmax
[ "def", "get_range", "(", "self", ")", ":", "return", "self", ".", "_xmin", ",", "self", ".", "_xmax" ]
https://github.com/mantidproject/mantid/blob/03deeb89254ec4289edb8771e0188c2090a02f32/scripts/LargeScaleStructures/data_stitching.py#L263-L267
junhyukoh/caffe-lstm
598d45456fa2a1b127a644f4aa38daa8fb9fc722
scripts/cpp_lint.py
python
CheckSectionSpacing
(filename, clean_lines, class_info, linenum, error)
Checks for additional blank line issues related to sections. Currently the only thing checked here is blank line before protected/private. Args: filename: The name of the current file. clean_lines: A CleansedLines instance containing the file. class_info: A _ClassInfo objects. linenum: The number ...
Checks for additional blank line issues related to sections.
[ "Checks", "for", "additional", "blank", "line", "issues", "related", "to", "sections", "." ]
def CheckSectionSpacing(filename, clean_lines, class_info, linenum, error): """Checks for additional blank line issues related to sections. Currently the only thing checked here is blank line before protected/private. Args: filename: The name of the current file. clean_lines: A CleansedLines instance co...
[ "def", "CheckSectionSpacing", "(", "filename", ",", "clean_lines", ",", "class_info", ",", "linenum", ",", "error", ")", ":", "# Skip checks if the class is small, where small means 25 lines or less.", "# 25 lines seems like a good cutoff since that's the usual height of", "# termina...
https://github.com/junhyukoh/caffe-lstm/blob/598d45456fa2a1b127a644f4aa38daa8fb9fc722/scripts/cpp_lint.py#L2991-L3043
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/osx_cocoa/_gdi.py
python
GDIObjListBase.__init__
(self, *args, **kwargs)
__init__(self) -> GDIObjListBase
__init__(self) -> GDIObjListBase
[ "__init__", "(", "self", ")", "-", ">", "GDIObjListBase" ]
def __init__(self, *args, **kwargs): """__init__(self) -> GDIObjListBase""" _gdi_.GDIObjListBase_swiginit(self,_gdi_.new_GDIObjListBase(*args, **kwargs))
[ "def", "__init__", "(", "self", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "_gdi_", ".", "GDIObjListBase_swiginit", "(", "self", ",", "_gdi_", ".", "new_GDIObjListBase", "(", "*", "args", ",", "*", "*", "kwargs", ")", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_cocoa/_gdi.py#L7020-L7022
adobe/chromium
cfe5bf0b51b1f6b9fe239c2a3c2f2364da9967d7
third_party/tlslite/tlslite/integration/AsyncStateMachine.py
python
AsyncStateMachine.outCloseEvent
(self)
Called when a close operation completes. May be overridden in subclass.
Called when a close operation completes.
[ "Called", "when", "a", "close", "operation", "completes", "." ]
def outCloseEvent(self): """Called when a close operation completes. May be overridden in subclass. """ pass
[ "def", "outCloseEvent", "(", "self", ")", ":", "pass" ]
https://github.com/adobe/chromium/blob/cfe5bf0b51b1f6b9fe239c2a3c2f2364da9967d7/third_party/tlslite/tlslite/integration/AsyncStateMachine.py#L99-L104
idaholab/moose
9eeebc65e098b4c30f8205fb41591fd5b61eb6ff
python/moosesqa/get_requirements.py
python
get_test_specification
(filename, block)
return _create_specification(node, name, filename, mooseutils.git_root_dir(os.path.dirname(filename)))
Create a TestSpecification object from the HIT file and block name. Input: filename[str]: Complete filename of a HIT file containing test specification(s) block[str]: The name of the block to use for creating the TestSpecification object This function exists to allow for requirements to be def...
Create a TestSpecification object from the HIT file and block name.
[ "Create", "a", "TestSpecification", "object", "from", "the", "HIT", "file", "and", "block", "name", "." ]
def get_test_specification(filename, block): """ Create a TestSpecification object from the HIT file and block name. Input: filename[str]: Complete filename of a HIT file containing test specification(s) block[str]: The name of the block to use for creating the TestSpecification object ...
[ "def", "get_test_specification", "(", "filename", ",", "block", ")", ":", "root", "=", "pyhit", ".", "load", "(", "filename", ")", "# Locate the desired block", "node", "=", "moosetree", ".", "find", "(", "root", ",", "lambda", "n", ":", "n", ".", "fullpat...
https://github.com/idaholab/moose/blob/9eeebc65e098b4c30f8205fb41591fd5b61eb6ff/python/moosesqa/get_requirements.py#L108-L129
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/tools/python3/src/Lib/telnetlib.py
python
Telnet.set_debuglevel
(self, debuglevel)
Set the debug level. The higher it is, the more debug output you get (on sys.stdout).
Set the debug level.
[ "Set", "the", "debug", "level", "." ]
def set_debuglevel(self, debuglevel): """Set the debug level. The higher it is, the more debug output you get (on sys.stdout). """ self.debuglevel = debuglevel
[ "def", "set_debuglevel", "(", "self", ",", "debuglevel", ")", ":", "self", ".", "debuglevel", "=", "debuglevel" ]
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/tools/python3/src/Lib/telnetlib.py#L255-L261
realm/realm-core
5b2ee26683b4dc6a99afdea4d7a8b54888b89d02
evergreen/hang_analyzer/src/pipe.py
python
LoggerPipe.__init__
(self, logger, level, pipe_out)
Initialize the LoggerPipe with the specified arguments.
Initialize the LoggerPipe with the specified arguments.
[ "Initialize", "the", "LoggerPipe", "with", "the", "specified", "arguments", "." ]
def __init__(self, logger, level, pipe_out): """Initialize the LoggerPipe with the specified arguments.""" threading.Thread.__init__(self) # Main thread should not call join() when exiting self.daemon = True self.__logger = logger self.__level = level self.__pip...
[ "def", "__init__", "(", "self", ",", "logger", ",", "level", ",", "pipe_out", ")", ":", "threading", ".", "Thread", ".", "__init__", "(", "self", ")", "# Main thread should not call join() when exiting", "self", ".", "daemon", "=", "True", "self", ".", "__logg...
https://github.com/realm/realm-core/blob/5b2ee26683b4dc6a99afdea4d7a8b54888b89d02/evergreen/hang_analyzer/src/pipe.py#L18-L35
miyosuda/TensorFlowAndroidDemo
35903e0221aa5f109ea2dbef27f20b52e317f42d
jni-build/jni/include/external/bazel_tools/tools/android/incremental_install.py
python
Adb.Install
(self, apk)
Invoke 'adb install'.
Invoke 'adb install'.
[ "Invoke", "adb", "install", "." ]
def Install(self, apk): """Invoke 'adb install'.""" ret, stdout, stderr, args = self._Exec(["install", "-r", apk]) # adb install could fail with a message on stdout like this: # # pkg: /data/local/tmp/Gmail_dev_sharded_incremental.apk # Failure [INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATE...
[ "def", "Install", "(", "self", ",", "apk", ")", ":", "ret", ",", "stdout", ",", "stderr", ",", "args", "=", "self", ".", "_Exec", "(", "[", "\"install\"", ",", "\"-r\"", ",", "apk", "]", ")", "# adb install could fail with a message on stdout like this:", "#...
https://github.com/miyosuda/TensorFlowAndroidDemo/blob/35903e0221aa5f109ea2dbef27f20b52e317f42d/jni-build/jni/include/external/bazel_tools/tools/android/incremental_install.py#L231-L244
apache/incubator-mxnet
f03fb23f1d103fec9541b5ae59ee06b1734a51d9
python/mxnet/ndarray/contrib.py
python
rand_zipfian
(true_classes, num_sampled, range_max, ctx=None)
return sampled_classes, expected_count_true, expected_count_sampled
Draw random samples from an approximately log-uniform or Zipfian distribution. This operation randomly samples *num_sampled* candidates the range of integers [0, range_max). The elements of sampled_candidates are drawn with replacement from the base distribution. The base distribution for this operator is...
Draw random samples from an approximately log-uniform or Zipfian distribution.
[ "Draw", "random", "samples", "from", "an", "approximately", "log", "-", "uniform", "or", "Zipfian", "distribution", "." ]
def rand_zipfian(true_classes, num_sampled, range_max, ctx=None): """Draw random samples from an approximately log-uniform or Zipfian distribution. This operation randomly samples *num_sampled* candidates the range of integers [0, range_max). The elements of sampled_candidates are drawn with replacement fr...
[ "def", "rand_zipfian", "(", "true_classes", ",", "num_sampled", ",", "range_max", ",", "ctx", "=", "None", ")", ":", "if", "ctx", "is", "None", ":", "ctx", "=", "current_device", "(", ")", "log_range", "=", "math", ".", "log", "(", "range_max", "+", "1...
https://github.com/apache/incubator-mxnet/blob/f03fb23f1d103fec9541b5ae59ee06b1734a51d9/python/mxnet/ndarray/contrib.py#L39-L103
ricardoquesada/Spidermonkey
4a75ea2543408bd1b2c515aa95901523eeef7858
python/mozbuild/mozbuild/base.py
python
MozbuildObject.remove_objdir
(self)
Remove the entire object directory.
Remove the entire object directory.
[ "Remove", "the", "entire", "object", "directory", "." ]
def remove_objdir(self): """Remove the entire object directory.""" # We use mozfile because it is faster than shutil.rmtree(). # mozfile doesn't like unicode arguments (bug 818783). rmtree(self.topobjdir.encode('utf-8'))
[ "def", "remove_objdir", "(", "self", ")", ":", "# We use mozfile because it is faster than shutil.rmtree().", "# mozfile doesn't like unicode arguments (bug 818783).", "rmtree", "(", "self", ".", "topobjdir", ".", "encode", "(", "'utf-8'", ")", ")" ]
https://github.com/ricardoquesada/Spidermonkey/blob/4a75ea2543408bd1b2c515aa95901523eeef7858/python/mozbuild/mozbuild/base.py#L295-L300
ricardoquesada/Spidermonkey
4a75ea2543408bd1b2c515aa95901523eeef7858
config/printprereleasesuffix.py
python
get_prerelease_suffix
(version)
return result
Returns the prerelease suffix from the version string argument
Returns the prerelease suffix from the version string argument
[ "Returns", "the", "prerelease", "suffix", "from", "the", "version", "string", "argument" ]
def get_prerelease_suffix(version): """ Returns the prerelease suffix from the version string argument """ def mfunc(m): return " {0} {1} {2}".format(m.group('prefix'), {'a': 'Alpha', 'b': 'Beta'}[m.group('c')], m.group('suffix')) result, c = ...
[ "def", "get_prerelease_suffix", "(", "version", ")", ":", "def", "mfunc", "(", "m", ")", ":", "return", "\" {0} {1} {2}\"", ".", "format", "(", "m", ".", "group", "(", "'prefix'", ")", ",", "{", "'a'", ":", "'Alpha'", ",", "'b'", ":", "'Beta'", "}", ...
https://github.com/ricardoquesada/Spidermonkey/blob/4a75ea2543408bd1b2c515aa95901523eeef7858/config/printprereleasesuffix.py#L17-L28
nieklinnenbank/FreeNOS
db27dbbce09cff86debb58a2d01b49c2b9572c95
support/scons/strip.py
python
strip_string
(target, source, env)
return " STRIP " + str(target[0])
Prints out a user friendly command-line string.
Prints out a user friendly command-line string.
[ "Prints", "out", "a", "user", "friendly", "command", "-", "line", "string", "." ]
def strip_string(target, source, env): """ Prints out a user friendly command-line string. """ return " STRIP " + str(target[0])
[ "def", "strip_string", "(", "target", ",", "source", ",", "env", ")", ":", "return", "\" STRIP \"", "+", "str", "(", "target", "[", "0", "]", ")" ]
https://github.com/nieklinnenbank/FreeNOS/blob/db27dbbce09cff86debb58a2d01b49c2b9572c95/support/scons/strip.py#L34-L38
FreeCAD/FreeCAD
ba42231b9c6889b89e064d6d563448ed81e376ec
src/App/FreeCADInit.py
python
FCADLogger.__init__
(self, tag, **kargs)
Construct a logger instance. Supported arguments are their default values are, * tag: a string tag for this logger. The log level of this logger can be accessed using FreeCAD.getLogLevel(tag)/setLogLevel(tag,level). All logger instance with the same tag shares the same le...
Construct a logger instance.
[ "Construct", "a", "logger", "instance", "." ]
def __init__(self, tag, **kargs): '''Construct a logger instance. Supported arguments are their default values are, * tag: a string tag for this logger. The log level of this logger can be accessed using FreeCAD.getLogLevel(tag)/setLogLevel(tag,level). All logger ...
[ "def", "__init__", "(", "self", ",", "tag", ",", "*", "*", "kargs", ")", ":", "self", ".", "tag", "=", "tag", "self", ".", "laststamp", "=", "datetime", ".", "now", "(", ")", "for", "key", ",", "default", "in", "(", "(", "'printTag'", ",", "True"...
https://github.com/FreeCAD/FreeCAD/blob/ba42231b9c6889b89e064d6d563448ed81e376ec/src/App/FreeCADInit.py#L344-L376
hanpfei/chromium-net
392cc1fa3a8f92f42e4071ab6e674d8e0482f83f
tools/grit/grit/gather/chrome_scaled_image.py
python
_MakeBraceGlob
(strings)
Given ['foo', 'bar'], return '{foo,bar}', for error reporting.
Given ['foo', 'bar'], return '{foo,bar}', for error reporting.
[ "Given", "[", "foo", "bar", "]", "return", "{", "foo", "bar", "}", "for", "error", "reporting", "." ]
def _MakeBraceGlob(strings): '''Given ['foo', 'bar'], return '{foo,bar}', for error reporting. ''' if len(strings) == 1: return strings[0] else: return '{' + ','.join(strings) + '}'
[ "def", "_MakeBraceGlob", "(", "strings", ")", ":", "if", "len", "(", "strings", ")", "==", "1", ":", "return", "strings", "[", "0", "]", "else", ":", "return", "'{'", "+", "','", ".", "join", "(", "strings", ")", "+", "'}'" ]
https://github.com/hanpfei/chromium-net/blob/392cc1fa3a8f92f42e4071ab6e674d8e0482f83f/tools/grit/grit/gather/chrome_scaled_image.py#L76-L82
LiquidPlayer/LiquidCore
9405979363f2353ac9a71ad8ab59685dd7f919c9
deps/node-10.15.3/tools/cpplint.py
python
CheckCheck
(filename, clean_lines, linenum, error)
Checks the use of CHECK and EXPECT macros. Args: filename: The name of the current file. clean_lines: A CleansedLines instance containing the file. linenum: The number of the line to check. error: The function to call with any errors found.
Checks the use of CHECK and EXPECT macros.
[ "Checks", "the", "use", "of", "CHECK", "and", "EXPECT", "macros", "." ]
def CheckCheck(filename, clean_lines, linenum, error): """Checks the use of CHECK and EXPECT macros. Args: filename: The name of the current file. clean_lines: A CleansedLines instance containing the file. linenum: The number of the line to check. error: The function to call with any errors found. ...
[ "def", "CheckCheck", "(", "filename", ",", "clean_lines", ",", "linenum", ",", "error", ")", ":", "# Decide the set of replacement macros that should be suggested", "lines", "=", "clean_lines", ".", "elided", "(", "check_macro", ",", "start_pos", ")", "=", "FindCheckM...
https://github.com/LiquidPlayer/LiquidCore/blob/9405979363f2353ac9a71ad8ab59685dd7f919c9/deps/node-10.15.3/tools/cpplint.py#L4263-L4378
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/windows/Lib/asyncio/streams.py
python
StreamReader.readuntil
(self, separator=b'\n')
return bytes(chunk)
Read data from the stream until ``separator`` is found. On success, the data and separator will be removed from the internal buffer (consumed). Returned data will include the separator at the end. Configured stream limit is used to check result. Limit sets the maximal length of...
Read data from the stream until ``separator`` is found.
[ "Read", "data", "from", "the", "stream", "until", "separator", "is", "found", "." ]
async def readuntil(self, separator=b'\n'): """Read data from the stream until ``separator`` is found. On success, the data and separator will be removed from the internal buffer (consumed). Returned data will include the separator at the end. Configured stream limit is used to...
[ "async", "def", "readuntil", "(", "self", ",", "separator", "=", "b'\\n'", ")", ":", "seplen", "=", "len", "(", "separator", ")", "if", "seplen", "==", "0", ":", "raise", "ValueError", "(", "'Separator should be at least one-byte string'", ")", "if", "self", ...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/windows/Lib/asyncio/streams.py#L508-L597
mongodb/mongo
d8ff665343ad29cf286ee2cf4a1960d29371937b
buildscripts/idl/idl/generator.py
python
_CppSourceFileWriter._gen_field_deserializer_expression
(self, element_name, field, ast_type)
return '%s(%s)' % (method_name, element_name)
Generate the C++ deserializer piece for a field. Writes multiple lines into the generated file. Returns the final statement to access the deserialized value.
Generate the C++ deserializer piece for a field.
[ "Generate", "the", "C", "++", "deserializer", "piece", "for", "a", "field", "." ]
def _gen_field_deserializer_expression(self, element_name, field, ast_type): # type: (str, ast.Field, ast.Type) -> str # pylint: disable=invalid-name,too-many-return-statements """ Generate the C++ deserializer piece for a field. Writes multiple lines into the generated file. ...
[ "def", "_gen_field_deserializer_expression", "(", "self", ",", "element_name", ",", "field", ",", "ast_type", ")", ":", "# type: (str, ast.Field, ast.Type) -> str", "# pylint: disable=invalid-name,too-many-return-statements", "if", "ast_type", ".", "is_struct", ":", "self", "...
https://github.com/mongodb/mongo/blob/d8ff665343ad29cf286ee2cf4a1960d29371937b/buildscripts/idl/idl/generator.py#L1163-L1214
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/windows/Lib/site-packages/pip/_vendor/requests/models.py
python
RequestEncodingMixin._encode_params
(data)
Encode parameters in a piece of data. Will successfully encode parameters when passed as a dict or a list of 2-tuples. Order is retained if data is a list of 2-tuples but arbitrary if parameters are supplied as a dict.
Encode parameters in a piece of data.
[ "Encode", "parameters", "in", "a", "piece", "of", "data", "." ]
def _encode_params(data): """Encode parameters in a piece of data. Will successfully encode parameters when passed as a dict or a list of 2-tuples. Order is retained if data is a list of 2-tuples but arbitrary if parameters are supplied as a dict. """ if isinstance(data...
[ "def", "_encode_params", "(", "data", ")", ":", "if", "isinstance", "(", "data", ",", "(", "str", ",", "bytes", ")", ")", ":", "return", "data", "elif", "hasattr", "(", "data", ",", "'read'", ")", ":", "return", "data", "elif", "hasattr", "(", "data"...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/windows/Lib/site-packages/pip/_vendor/requests/models.py#L83-L107
echronos/echronos
c996f1d2c8af6c6536205eb319c1bf1d4d84569c
prj/app/lib/util/util.py
python
Singleton.__init__
(self, name)
Create and set the name of the singleton. 'name' should match the name of the variable the object is being bound to. E.g: foo = Singleton('foo') not: bar = Singleton('BAR')
Create and set the name of the singleton. 'name' should match the name of the variable the object is being bound to. E.g:
[ "Create", "and", "set", "the", "name", "of", "the", "singleton", ".", "name", "should", "match", "the", "name", "of", "the", "variable", "the", "object", "is", "being", "bound", "to", ".", "E", ".", "g", ":" ]
def __init__(self, name): """Create and set the name of the singleton. 'name' should match the name of the variable the object is being bound to. E.g: foo = Singleton('foo') not: bar = Singleton('BAR') """ self.name = name
[ "def", "__init__", "(", "self", ",", "name", ")", ":", "self", ".", "name", "=", "name" ]
https://github.com/echronos/echronos/blob/c996f1d2c8af6c6536205eb319c1bf1d4d84569c/prj/app/lib/util/util.py#L51-L62
carla-simulator/carla
8854804f4d7748e14d937ec763a2912823a7e5f5
PythonAPI/examples/vehicle_physics.py
python
main
(arg)
Main function of the script
Main function of the script
[ "Main", "function", "of", "the", "script" ]
def main(arg): """Main function of the script""" client = carla.Client(arg.host, arg.port) client.set_timeout(2.0) world = client.get_world() try: # Setting the world and the spawn properties original_settings = world.get_settings() settings = world.get_settings() d...
[ "def", "main", "(", "arg", ")", ":", "client", "=", "carla", ".", "Client", "(", "arg", ".", "host", ",", "arg", ".", "port", ")", "client", ".", "set_timeout", "(", "2.0", ")", "world", "=", "client", ".", "get_world", "(", ")", "try", ":", "# S...
https://github.com/carla-simulator/carla/blob/8854804f4d7748e14d937ec763a2912823a7e5f5/PythonAPI/examples/vehicle_physics.py#L45-L116
miyosuda/TensorFlowAndroidMNIST
7b5a4603d2780a8a2834575706e9001977524007
jni-build/jni/include/tensorflow/python/ops/math_ops.py
python
pow
(x, y, name=None)
Computes the power of one value to another. Given a tensor `x` and a tensor `y`, this operation computes \\\\(x^y\\\\) for corresponding elements in `x` and `y`. For example: ``` # tensor 'x' is [[2, 2], [3, 3]] # tensor 'y' is [[8, 16], [2, 3]] tf.pow(x, y) ==> [[256, 65536], [9, 27]] ``` Args: ...
Computes the power of one value to another.
[ "Computes", "the", "power", "of", "one", "value", "to", "another", "." ]
def pow(x, y, name=None): """Computes the power of one value to another. Given a tensor `x` and a tensor `y`, this operation computes \\\\(x^y\\\\) for corresponding elements in `x` and `y`. For example: ``` # tensor 'x' is [[2, 2], [3, 3]] # tensor 'y' is [[8, 16], [2, 3]] tf.pow(x, y) ==> [[256, 65536...
[ "def", "pow", "(", "x", ",", "y", ",", "name", "=", "None", ")", ":", "with", "ops", ".", "op_scope", "(", "[", "x", "]", ",", "name", ",", "\"Pow\"", ")", "as", "name", ":", "return", "gen_math_ops", ".", "_pow", "(", "x", ",", "y", ",", "na...
https://github.com/miyosuda/TensorFlowAndroidMNIST/blob/7b5a4603d2780a8a2834575706e9001977524007/jni-build/jni/include/tensorflow/python/ops/math_ops.py#L442-L465
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/pandas/io/clipboards.py
python
read_clipboard
(sep=r"\s+", **kwargs)
return read_csv(StringIO(text), sep=sep, **kwargs)
r""" Read text from clipboard and pass to read_csv. Parameters ---------- sep : str, default '\s+' A string or regex delimiter. The default of '\s+' denotes one or more whitespace characters. **kwargs See read_csv for the full argument list. Returns ------- Dat...
r""" Read text from clipboard and pass to read_csv.
[ "r", "Read", "text", "from", "clipboard", "and", "pass", "to", "read_csv", "." ]
def read_clipboard(sep=r"\s+", **kwargs): # pragma: no cover r""" Read text from clipboard and pass to read_csv. Parameters ---------- sep : str, default '\s+' A string or regex delimiter. The default of '\s+' denotes one or more whitespace characters. **kwargs See rea...
[ "def", "read_clipboard", "(", "sep", "=", "r\"\\s+\"", ",", "*", "*", "kwargs", ")", ":", "# pragma: no cover", "encoding", "=", "kwargs", ".", "pop", "(", "\"encoding\"", ",", "\"utf-8\"", ")", "# only utf-8 is valid for passed value because that's what clipboard", "...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/pandas/io/clipboards.py#L10-L76
MythTV/mythtv
d282a209cb8be85d036f85a62a8ec971b67d45f4
mythtv/contrib/imports/mirobridge/mirobridge/mirobridge_interpreter_6_0_0.py
python
MiroInterpreter._get_item_dict
(self, it)
return item_dict
Take an item and convert all elements into a dictionary return a dictionary of item elements
Take an item and convert all elements into a dictionary return a dictionary of item elements
[ "Take", "an", "item", "and", "convert", "all", "elements", "into", "a", "dictionary", "return", "a", "dictionary", "of", "item", "elements" ]
def _get_item_dict(self, it): """Take an item and convert all elements into a dictionary return a dictionary of item elements """ def compatibleGraphics(filename): if filename: (dirName, fileName) = os.path.split(filename) (fileBaseName, fileEx...
[ "def", "_get_item_dict", "(", "self", ",", "it", ")", ":", "def", "compatibleGraphics", "(", "filename", ")", ":", "if", "filename", ":", "(", "dirName", ",", "fileName", ")", "=", "os", ".", "path", ".", "split", "(", "filename", ")", "(", "fileBaseNa...
https://github.com/MythTV/mythtv/blob/d282a209cb8be85d036f85a62a8ec971b67d45f4/mythtv/contrib/imports/mirobridge/mirobridge/mirobridge_interpreter_6_0_0.py#L420-L524
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/ipython/py2/IPython/utils/text.py
python
num_ini_spaces
(strng)
Return the number of initial spaces in a string
Return the number of initial spaces in a string
[ "Return", "the", "number", "of", "initial", "spaces", "in", "a", "string" ]
def num_ini_spaces(strng): """Return the number of initial spaces in a string""" ini_spaces = ini_spaces_re.match(strng) if ini_spaces: return ini_spaces.end() else: return 0
[ "def", "num_ini_spaces", "(", "strng", ")", ":", "ini_spaces", "=", "ini_spaces_re", ".", "match", "(", "strng", ")", "if", "ini_spaces", ":", "return", "ini_spaces", ".", "end", "(", ")", "else", ":", "return", "0" ]
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/ipython/py2/IPython/utils/text.py#L343-L350
rdkit/rdkit
ede860ae316d12d8568daf5ee800921c3389c84e
rdkit/ML/DecTree/Tree.py
python
TreeNode.NameTree
(self, varNames)
Set the names of each node in the tree from a list of variable names. **Arguments** - varNames: a list of names to be assigned **Notes** 1) this works its magic by recursively traversing all children 2) The assumption is made here that the varNames list can be indexed by...
Set the names of each node in the tree from a list of variable names.
[ "Set", "the", "names", "of", "each", "node", "in", "the", "tree", "from", "a", "list", "of", "variable", "names", "." ]
def NameTree(self, varNames): """ Set the names of each node in the tree from a list of variable names. **Arguments** - varNames: a list of names to be assigned **Notes** 1) this works its magic by recursively traversing all children 2) The assumption is made here that the varN...
[ "def", "NameTree", "(", "self", ",", "varNames", ")", ":", "if", "self", ".", "GetTerminal", "(", ")", ":", "return", "else", ":", "for", "child", "in", "self", ".", "GetChildren", "(", ")", ":", "child", ".", "NameTree", "(", "varNames", ")", "self"...
https://github.com/rdkit/rdkit/blob/ede860ae316d12d8568daf5ee800921c3389c84e/rdkit/ML/DecTree/Tree.py#L51-L71
baidu-research/tensorflow-allreduce
66d5b855e90b0949e9fa5cca5599fd729a70e874
tensorflow/contrib/seq2seq/python/ops/helper.py
python
ScheduledEmbeddingTrainingHelper.__init__
(self, inputs, sequence_length, embedding, sampling_probability, time_major=False, seed=None, scheduling_seed=None, name=None)
Initializer. Args: inputs: A (structure of) input tensors. sequence_length: An int32 vector tensor. embedding: A callable that takes a vector tensor of `ids` (argmax ids), or the `params` argument for `embedding_lookup`. sampling_probability: A 0D `float32` tensor: the probability o...
Initializer.
[ "Initializer", "." ]
def __init__(self, inputs, sequence_length, embedding, sampling_probability, time_major=False, seed=None, scheduling_seed=None, name=None): """Initializer. Args: inputs: A (structure of) input tensors. sequence_length: An int32 vector tensor. embedding: A callable that takes a ...
[ "def", "__init__", "(", "self", ",", "inputs", ",", "sequence_length", ",", "embedding", ",", "sampling_probability", ",", "time_major", "=", "False", ",", "seed", "=", "None", ",", "scheduling_seed", "=", "None", ",", "name", "=", "None", ")", ":", "with"...
https://github.com/baidu-research/tensorflow-allreduce/blob/66d5b855e90b0949e9fa5cca5599fd729a70e874/tensorflow/contrib/seq2seq/python/ops/helper.py#L212-L252
wlanjie/AndroidFFmpeg
7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf
tools/fdk-aac-build/armeabi/toolchain/lib/python2.7/optparse.py
python
OptionParser.check_values
(self, values, args)
return (values, args)
check_values(values : Values, args : [string]) -> (values : Values, args : [string]) Check that the supplied option values and leftover arguments are valid. Returns the option values and leftover arguments (possibly adjusted, possibly completely new -- whatever you like). Defa...
check_values(values : Values, args : [string]) -> (values : Values, args : [string])
[ "check_values", "(", "values", ":", "Values", "args", ":", "[", "string", "]", ")", "-", ">", "(", "values", ":", "Values", "args", ":", "[", "string", "]", ")" ]
def check_values(self, values, args): """ check_values(values : Values, args : [string]) -> (values : Values, args : [string]) Check that the supplied option values and leftover arguments are valid. Returns the option values and leftover arguments (possibly adjusted, po...
[ "def", "check_values", "(", "self", ",", "values", ",", "args", ")", ":", "return", "(", "values", ",", "args", ")" ]
https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/armeabi/toolchain/lib/python2.7/optparse.py#L1406-L1417
matthewsamuel95/ACM-ICPC-Algorithms
eb7050344a7f3677c0980c94f3a57b852b4f9bc0
DP/subset_sum problem/subsetSum.py
python
isSubsetSum
(arr, n, sum)
return subset[n % 2][sum]
Returns true if there exists a subset with given sum in arr[]
Returns true if there exists a subset with given sum in arr[]
[ "Returns", "true", "if", "there", "exists", "a", "subset", "with", "given", "sum", "in", "arr", "[]" ]
def isSubsetSum(arr, n, sum): ''' Returns true if there exists a subset with given sum in arr[] ''' # The value of subset[i%2][j] will be true # if there exists a subset of sum j in # arr[0, 1, ...., i-1] subset = [[False for j in range(sum + 1)] for i in range(3)] for i in range(n...
[ "def", "isSubsetSum", "(", "arr", ",", "n", ",", "sum", ")", ":", "# The value of subset[i%2][j] will be true", "# if there exists a subset of sum j in", "# arr[0, 1, ...., i-1]", "subset", "=", "[", "[", "False", "for", "j", "in", "range", "(", "sum", "+", "1", "...
https://github.com/matthewsamuel95/ACM-ICPC-Algorithms/blob/eb7050344a7f3677c0980c94f3a57b852b4f9bc0/DP/subset_sum problem/subsetSum.py#L1-L28
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/gtk/html.py
python
HtmlWinParser.GetDC
(*args, **kwargs)
return _html.HtmlWinParser_GetDC(*args, **kwargs)
GetDC(self) -> DC
GetDC(self) -> DC
[ "GetDC", "(", "self", ")", "-", ">", "DC" ]
def GetDC(*args, **kwargs): """GetDC(self) -> DC""" return _html.HtmlWinParser_GetDC(*args, **kwargs)
[ "def", "GetDC", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_html", ".", "HtmlWinParser_GetDC", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/gtk/html.py#L248-L250
ducha-aiki/LSUVinit
a42ecdc0d44c217a29b65e98748d80b90d5c6279
scripts/cpp_lint.py
python
CheckForIncludeWhatYouUse
(filename, clean_lines, include_state, error, io=codecs)
Reports for missing stl includes. This function will output warnings to make sure you are including the headers necessary for the stl containers and functions that you use. We only give one reason to include a header. For example, if you use both equal_to<> and less<> in a .h file, only one (the latter in the ...
Reports for missing stl includes.
[ "Reports", "for", "missing", "stl", "includes", "." ]
def CheckForIncludeWhatYouUse(filename, clean_lines, include_state, error, io=codecs): """Reports for missing stl includes. This function will output warnings to make sure you are including the headers necessary for the stl containers and functions that you use. We only give one r...
[ "def", "CheckForIncludeWhatYouUse", "(", "filename", ",", "clean_lines", ",", "include_state", ",", "error", ",", "io", "=", "codecs", ")", ":", "required", "=", "{", "}", "# A map of header name to linenumber and the template entity.", "# Example of required: { '<functiona...
https://github.com/ducha-aiki/LSUVinit/blob/a42ecdc0d44c217a29b65e98748d80b90d5c6279/scripts/cpp_lint.py#L4483-L4573
tensorflow/tensorflow
419e3a6b650ea4bd1b0cba23c4348f8a69f3272e
tensorflow/python/ops/distributions/util.py
python
parent_frame_arguments
()
return final_args
Returns parent frame arguments. When called inside a function, returns a dictionary with the caller's function arguments. These are positional arguments and keyword arguments (**kwargs), while variable arguments (*varargs) are excluded. When called at global scope, this will return an empty dictionary, since ...
Returns parent frame arguments.
[ "Returns", "parent", "frame", "arguments", "." ]
def parent_frame_arguments(): """Returns parent frame arguments. When called inside a function, returns a dictionary with the caller's function arguments. These are positional arguments and keyword arguments (**kwargs), while variable arguments (*varargs) are excluded. When called at global scope, this will...
[ "def", "parent_frame_arguments", "(", ")", ":", "# All arguments and the names used for *varargs, and **kwargs", "arg_names", ",", "variable_arg_name", ",", "keyword_arg_name", ",", "local_vars", "=", "(", "tf_inspect", ".", "_inspect", ".", "getargvalues", "(", "# pylint: ...
https://github.com/tensorflow/tensorflow/blob/419e3a6b650ea4bd1b0cba23c4348f8a69f3272e/tensorflow/python/ops/distributions/util.py#L1351-L1385
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/scipy/scipy/signal/signaltools.py
python
choose_conv_method
(in1, in2, mode='full', measure=False)
return 'direct'
Find the fastest convolution/correlation method. This primarily exists to be called during the ``method='auto'`` option in `convolve` and `correlate`, but can also be used when performing many convolutions of the same input shapes and dtypes, determining which method to use for all of them, either to a...
Find the fastest convolution/correlation method.
[ "Find", "the", "fastest", "convolution", "/", "correlation", "method", "." ]
def choose_conv_method(in1, in2, mode='full', measure=False): """ Find the fastest convolution/correlation method. This primarily exists to be called during the ``method='auto'`` option in `convolve` and `correlate`, but can also be used when performing many convolutions of the same input shapes an...
[ "def", "choose_conv_method", "(", "in1", ",", "in2", ",", "mode", "=", "'full'", ",", "measure", "=", "False", ")", ":", "volume", "=", "asarray", "(", "in1", ")", "kernel", "=", "asarray", "(", "in2", ")", "if", "measure", ":", "times", "=", "{", ...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/scipy/scipy/signal/signaltools.py#L551-L671
eric612/Caffe-YOLOv3-Windows
6736ca6e16781789b828cc64218ff77cc3454e5d
scripts/cpp_lint.py
python
_DropCommonSuffixes
(filename)
return os.path.splitext(filename)[0]
Drops common suffixes like _test.cc or -inl.h from filename. For example: >>> _DropCommonSuffixes('foo/foo-inl.h') 'foo/foo' >>> _DropCommonSuffixes('foo/bar/foo.cc') 'foo/bar/foo' >>> _DropCommonSuffixes('foo/foo_internal.h') 'foo/foo' >>> _DropCommonSuffixes('foo/foo_unusualinternal.h')...
Drops common suffixes like _test.cc or -inl.h from filename.
[ "Drops", "common", "suffixes", "like", "_test", ".", "cc", "or", "-", "inl", ".", "h", "from", "filename", "." ]
def _DropCommonSuffixes(filename): """Drops common suffixes like _test.cc or -inl.h from filename. For example: >>> _DropCommonSuffixes('foo/foo-inl.h') 'foo/foo' >>> _DropCommonSuffixes('foo/bar/foo.cc') 'foo/bar/foo' >>> _DropCommonSuffixes('foo/foo_internal.h') 'foo/foo' >>> _DropCom...
[ "def", "_DropCommonSuffixes", "(", "filename", ")", ":", "for", "suffix", "in", "(", "'test.cc'", ",", "'regtest.cc'", ",", "'unittest.cc'", ",", "'inl.h'", ",", "'impl.h'", ",", "'internal.h'", ")", ":", "if", "(", "filename", ".", "endswith", "(", "suffix"...
https://github.com/eric612/Caffe-YOLOv3-Windows/blob/6736ca6e16781789b828cc64218ff77cc3454e5d/scripts/cpp_lint.py#L3580-L3604
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/osx_carbon/_controls.py
python
TreeItemData.__init__
(self, *args, **kwargs)
__init__(self, PyObject obj=None) -> TreeItemData
__init__(self, PyObject obj=None) -> TreeItemData
[ "__init__", "(", "self", "PyObject", "obj", "=", "None", ")", "-", ">", "TreeItemData" ]
def __init__(self, *args, **kwargs): """__init__(self, PyObject obj=None) -> TreeItemData""" _controls_.TreeItemData_swiginit(self,_controls_.new_TreeItemData(*args, **kwargs))
[ "def", "__init__", "(", "self", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "_controls_", ".", "TreeItemData_swiginit", "(", "self", ",", "_controls_", ".", "new_TreeItemData", "(", "*", "args", ",", "*", "*", "kwargs", ")", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_carbon/_controls.py#L5023-L5025
SFTtech/openage
d6a08c53c48dc1e157807471df92197f6ca9e04d
openage/nyan/import_tree.py
python
Node.get_fqon
(self)
return tuple(fqon)
Get the fqon that is associated with this node by traversing the tree upwards.
Get the fqon that is associated with this node by traversing the tree upwards.
[ "Get", "the", "fqon", "that", "is", "associated", "with", "this", "node", "by", "traversing", "the", "tree", "upwards", "." ]
def get_fqon(self): """ Get the fqon that is associated with this node by traversing the tree upwards. """ current_node = self fqon = [] while current_node.node_type is not NodeType.ROOT: fqon.insert(0, current_node.name) current_node = current_nod...
[ "def", "get_fqon", "(", "self", ")", ":", "current_node", "=", "self", "fqon", "=", "[", "]", "while", "current_node", ".", "node_type", "is", "not", "NodeType", ".", "ROOT", ":", "fqon", ".", "insert", "(", "0", ",", "current_node", ".", "name", ")", ...
https://github.com/SFTtech/openage/blob/d6a08c53c48dc1e157807471df92197f6ca9e04d/openage/nyan/import_tree.py#L297-L307
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/gtk/html.py
python
HtmlWindow.GetInternalRepresentation
(*args, **kwargs)
return _html.HtmlWindow_GetInternalRepresentation(*args, **kwargs)
GetInternalRepresentation(self) -> HtmlContainerCell
GetInternalRepresentation(self) -> HtmlContainerCell
[ "GetInternalRepresentation", "(", "self", ")", "-", ">", "HtmlContainerCell" ]
def GetInternalRepresentation(*args, **kwargs): """GetInternalRepresentation(self) -> HtmlContainerCell""" return _html.HtmlWindow_GetInternalRepresentation(*args, **kwargs)
[ "def", "GetInternalRepresentation", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_html", ".", "HtmlWindow_GetInternalRepresentation", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/gtk/html.py#L1073-L1075
yue/yue
619d62c191b13c51c01be451dc48917c34a5aefc
building/tools/cpplint.py
python
CheckParenthesisSpacing
(filename, clean_lines, linenum, error)
Checks for horizontal spacing around parentheses. Args: filename: The name of the current file. clean_lines: A CleansedLines instance containing the file. linenum: The number of the line to check. error: The function to call with any errors found.
Checks for horizontal spacing around parentheses.
[ "Checks", "for", "horizontal", "spacing", "around", "parentheses", "." ]
def CheckParenthesisSpacing(filename, clean_lines, linenum, error): """Checks for horizontal spacing around parentheses. Args: filename: The name of the current file. clean_lines: A CleansedLines instance containing the file. linenum: The number of the line to check. error: The function to call wit...
[ "def", "CheckParenthesisSpacing", "(", "filename", ",", "clean_lines", ",", "linenum", ",", "error", ")", ":", "line", "=", "clean_lines", ".", "elided", "[", "linenum", "]", "# No spaces after an if, while, switch, or for", "match", "=", "Search", "(", "r' (if\\(|f...
https://github.com/yue/yue/blob/619d62c191b13c51c01be451dc48917c34a5aefc/building/tools/cpplint.py#L3408-L3443
polyworld/polyworld
eb7e6bbc82fe77ba79e3bc48c3da2ad8c8238c26
scripts/agent/agent.py
python
_wrap_Agent
(a)
return Agent(*a)
wrapper function to enable use of asyncronous map
wrapper function to enable use of asyncronous map
[ "wrapper", "function", "to", "enable", "use", "of", "asyncronous", "map" ]
def _wrap_Agent(a): ''' wrapper function to enable use of asyncronous map ''' return Agent(*a)
[ "def", "_wrap_Agent", "(", "a", ")", ":", "return", "Agent", "(", "*", "a", ")" ]
https://github.com/polyworld/polyworld/blob/eb7e6bbc82fe77ba79e3bc48c3da2ad8c8238c26/scripts/agent/agent.py#L336-L338
adobe/chromium
cfe5bf0b51b1f6b9fe239c2a3c2f2364da9967d7
tools/site_compare/drivers/win32/mouse.py
python
DoubleClickButton
(button='left', click_time=0, time_between_clicks=0)
Double-click a mouse button at the current mouse location. Args: button: which button to click click_time: duration between press and release time_between_clicks: time to pause between clicks Returns: None
Double-click a mouse button at the current mouse location.
[ "Double", "-", "click", "a", "mouse", "button", "at", "the", "current", "mouse", "location", "." ]
def DoubleClickButton(button='left', click_time=0, time_between_clicks=0): """Double-click a mouse button at the current mouse location. Args: button: which button to click click_time: duration between press and release time_between_clicks: time to pause between clicks Returns: None """ Clic...
[ "def", "DoubleClickButton", "(", "button", "=", "'left'", ",", "click_time", "=", "0", ",", "time_between_clicks", "=", "0", ")", ":", "ClickButton", "(", "button", ",", "click_time", ")", "time", ".", "sleep", "(", "time_between_clicks", ")", "ClickButton", ...
https://github.com/adobe/chromium/blob/cfe5bf0b51b1f6b9fe239c2a3c2f2364da9967d7/tools/site_compare/drivers/win32/mouse.py#L84-L97
tensorflow/minigo
6d89c202cdceaf449aefc3149ab2110d44f1a6a4
strategies.py
python
MCTSPlayer.play_move
(self, c)
return True
Notable side effects: - finalizes the probability distribution according to this roots visit counts into the class' running tally, `searches_pi` - Makes the node associated with this move the root, for future `inject_noise` calls.
Notable side effects: - finalizes the probability distribution according to this roots visit counts into the class' running tally, `searches_pi` - Makes the node associated with this move the root, for future `inject_noise` calls.
[ "Notable", "side", "effects", ":", "-", "finalizes", "the", "probability", "distribution", "according", "to", "this", "roots", "visit", "counts", "into", "the", "class", "running", "tally", "searches_pi", "-", "Makes", "the", "node", "associated", "with", "this"...
def play_move(self, c): """Notable side effects: - finalizes the probability distribution according to this roots visit counts into the class' running tally, `searches_pi` - Makes the node associated with this move the root, for future `inject_noise` calls. """ ...
[ "def", "play_move", "(", "self", ",", "c", ")", ":", "if", "not", "self", ".", "two_player_mode", ":", "self", ".", "searches_pi", ".", "append", "(", "self", ".", "root", ".", "children_as_pi", "(", "self", ".", "root", ".", "position", ".", "n", "<...
https://github.com/tensorflow/minigo/blob/6d89c202cdceaf449aefc3149ab2110d44f1a6a4/strategies.py#L151-L173
hanpfei/chromium-net
392cc1fa3a8f92f42e4071ab6e674d8e0482f83f
third_party/catapult/third_party/closure_linter/closure_linter/common/simplefileflags.py
python
_GetUserSpecifiedFiles
(argv, suffixes)
return lint_files
Returns files to be linted, specified directly on the command line. Can handle the '*' wildcard in filenames, but no other wildcards. Args: argv: Sequence of command line arguments. The second and following arguments are assumed to be files that should be linted. suffixes: Expected suffixes for the ...
Returns files to be linted, specified directly on the command line.
[ "Returns", "files", "to", "be", "linted", "specified", "directly", "on", "the", "command", "line", "." ]
def _GetUserSpecifiedFiles(argv, suffixes): """Returns files to be linted, specified directly on the command line. Can handle the '*' wildcard in filenames, but no other wildcards. Args: argv: Sequence of command line arguments. The second and following arguments are assumed to be files that should be...
[ "def", "_GetUserSpecifiedFiles", "(", "argv", ",", "suffixes", ")", ":", "files", "=", "argv", "[", "1", ":", "]", "or", "[", "]", "all_files", "=", "[", "]", "lint_files", "=", "[", "]", "# Perform any necessary globs.", "for", "f", "in", "files", ":", ...
https://github.com/hanpfei/chromium-net/blob/392cc1fa3a8f92f42e4071ab6e674d8e0482f83f/third_party/catapult/third_party/closure_linter/closure_linter/common/simplefileflags.py#L63-L91
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/msw/_controls.py
python
ScrollBar.IsVertical
(*args, **kwargs)
return _controls_.ScrollBar_IsVertical(*args, **kwargs)
IsVertical(self) -> bool
IsVertical(self) -> bool
[ "IsVertical", "(", "self", ")", "-", ">", "bool" ]
def IsVertical(*args, **kwargs): """IsVertical(self) -> bool""" return _controls_.ScrollBar_IsVertical(*args, **kwargs)
[ "def", "IsVertical", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_controls_", ".", "ScrollBar_IsVertical", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/msw/_controls.py#L2180-L2182
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Gems/CloudGemMetric/v1/AWS/common-code/Lib/pandas/core/frame.py
python
DataFrame.join
( self, other, on=None, how="left", lsuffix="", rsuffix="", sort=False )
return self._join_compat( other, on=on, how=how, lsuffix=lsuffix, rsuffix=rsuffix, sort=sort )
Join columns of another DataFrame. Join columns with `other` DataFrame either on index or on a key column. Efficiently join multiple DataFrame objects by index at once by passing a list. Parameters ---------- other : DataFrame, Series, or list of DataFrame I...
Join columns of another DataFrame.
[ "Join", "columns", "of", "another", "DataFrame", "." ]
def join( self, other, on=None, how="left", lsuffix="", rsuffix="", sort=False ) -> "DataFrame": """ Join columns of another DataFrame. Join columns with `other` DataFrame either on index or on a key column. Efficiently join multiple DataFrame objects by index at once by ...
[ "def", "join", "(", "self", ",", "other", ",", "on", "=", "None", ",", "how", "=", "\"left\"", ",", "lsuffix", "=", "\"\"", ",", "rsuffix", "=", "\"\"", ",", "sort", "=", "False", ")", "->", "\"DataFrame\"", ":", "return", "self", ".", "_join_compat"...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Gems/CloudGemMetric/v1/AWS/common-code/Lib/pandas/core/frame.py#L7088-L7210
hanpfei/chromium-net
392cc1fa3a8f92f42e4071ab6e674d8e0482f83f
third_party/catapult/third_party/gsutil/third_party/rsa/rsa/cli.py
python
CryptoOperation.__call__
(self)
Runs the program.
Runs the program.
[ "Runs", "the", "program", "." ]
def __call__(self): '''Runs the program.''' (cli, cli_args) = self.parse_cli() key = self.read_key(cli_args[0], cli.keyform) indata = self.read_infile(cli.input) print(self.operation_progressive.title(), file=sys.stderr) outdata = self.perform_operation(indata, key, c...
[ "def", "__call__", "(", "self", ")", ":", "(", "cli", ",", "cli_args", ")", "=", "self", ".", "parse_cli", "(", ")", "key", "=", "self", ".", "read_key", "(", "cli_args", "[", "0", "]", ",", "cli", ".", "keyform", ")", "indata", "=", "self", ".",...
https://github.com/hanpfei/chromium-net/blob/392cc1fa3a8f92f42e4071ab6e674d8e0482f83f/third_party/catapult/third_party/gsutil/third_party/rsa/rsa/cli.py#L124-L137
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/jedi/jedi/api/completion.py
python
Completion._get_class_context_completions
(self, is_function=True)
Autocomplete inherited methods when overriding in child class.
Autocomplete inherited methods when overriding in child class.
[ "Autocomplete", "inherited", "methods", "when", "overriding", "in", "child", "class", "." ]
def _get_class_context_completions(self, is_function=True): """ Autocomplete inherited methods when overriding in child class. """ leaf = self._module_node.get_leaf_for_position(self._position, include_prefixes=True) cls = tree.search_ancestor(leaf, 'classdef') if isinsta...
[ "def", "_get_class_context_completions", "(", "self", ",", "is_function", "=", "True", ")", ":", "leaf", "=", "self", ".", "_module_node", ".", "get_leaf_for_position", "(", "self", ".", "_position", ",", "include_prefixes", "=", "True", ")", "cls", "=", "tree...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/jedi/jedi/api/completion.py#L268-L292
leela-zero/leela-zero
e3ed6310d33d75078ba74c3adf887d18439fc2e3
scripts/cpplint.py
python
_BlockInfo.CheckBegin
(self, filename, clean_lines, linenum, error)
Run checks that applies to text up to the opening brace. This is mostly for checking the text after the class identifier and the "{", usually where the base class is specified. For other blocks, there isn't much to check, so we always pass. Args: filename: The name of the current file. cl...
Run checks that applies to text up to the opening brace.
[ "Run", "checks", "that", "applies", "to", "text", "up", "to", "the", "opening", "brace", "." ]
def CheckBegin(self, filename, clean_lines, linenum, error): """Run checks that applies to text up to the opening brace. This is mostly for checking the text after the class identifier and the "{", usually where the base class is specified. For other blocks, there isn't much to check, so we always pas...
[ "def", "CheckBegin", "(", "self", ",", "filename", ",", "clean_lines", ",", "linenum", ",", "error", ")", ":", "pass" ]
https://github.com/leela-zero/leela-zero/blob/e3ed6310d33d75078ba74c3adf887d18439fc2e3/scripts/cpplint.py#L2006-L2019
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/pandas/py3/pandas/io/formats/style.py
python
Styler.apply
( self, func: Callable[..., Styler], axis: Axis | None = 0, subset: Subset | None = None, **kwargs, )
return self
Apply a CSS-styling function column-wise, row-wise, or table-wise. Updates the HTML representation with the result. Parameters ---------- func : function ``func`` should take a Series if ``axis`` in [0,1] and return an object of same length, also with identical ...
Apply a CSS-styling function column-wise, row-wise, or table-wise.
[ "Apply", "a", "CSS", "-", "styling", "function", "column", "-", "wise", "row", "-", "wise", "or", "table", "-", "wise", "." ]
def apply( self, func: Callable[..., Styler], axis: Axis | None = 0, subset: Subset | None = None, **kwargs, ) -> Styler: """ Apply a CSS-styling function column-wise, row-wise, or table-wise. Updates the HTML representation with the result. ...
[ "def", "apply", "(", "self", ",", "func", ":", "Callable", "[", "...", ",", "Styler", "]", ",", "axis", ":", "Axis", "|", "None", "=", "0", ",", "subset", ":", "Subset", "|", "None", "=", "None", ",", "*", "*", "kwargs", ",", ")", "->", "Styler...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/pandas/py3/pandas/io/formats/style.py#L1089-L1163
Kronuz/Xapiand
a71570859dcfc9f48090d845053f359b07f4f78c
contrib/python/xapiand-py/xapiand/connection_pool.py
python
ConnectionPool.mark_live
(self, connection)
Mark connection as healthy after a resurrection. Resets the fail counter for the connection. :arg connection: the connection to redeem
Mark connection as healthy after a resurrection. Resets the fail counter for the connection.
[ "Mark", "connection", "as", "healthy", "after", "a", "resurrection", ".", "Resets", "the", "fail", "counter", "for", "the", "connection", "." ]
def mark_live(self, connection): """ Mark connection as healthy after a resurrection. Resets the fail counter for the connection. :arg connection: the connection to redeem """ try: del self.dead_count[connection] except KeyError: # race co...
[ "def", "mark_live", "(", "self", ",", "connection", ")", ":", "try", ":", "del", "self", ".", "dead_count", "[", "connection", "]", "except", "KeyError", ":", "# race condition, safe to ignore", "pass" ]
https://github.com/Kronuz/Xapiand/blob/a71570859dcfc9f48090d845053f359b07f4f78c/contrib/python/xapiand-py/xapiand/connection_pool.py#L179-L190
Tencent/CMONGO
c40380caa14e05509f46993aa8b8da966b09b0b5
src/mongo/db/fts/unicode/gen_delimiter_list.py
python
generate
(unicode_proplist_file, target)
Generates a C++ source file that contains a delimiter checking function. The delimiter checking function contains a switch statement with cases for every delimiter in the Unicode Character Database with the properties specified in delim_properties.
Generates a C++ source file that contains a delimiter checking function.
[ "Generates", "a", "C", "++", "source", "file", "that", "contains", "a", "delimiter", "checking", "function", "." ]
def generate(unicode_proplist_file, target): """Generates a C++ source file that contains a delimiter checking function. The delimiter checking function contains a switch statement with cases for every delimiter in the Unicode Character Database with the properties specified in delim_properties. ...
[ "def", "generate", "(", "unicode_proplist_file", ",", "target", ")", ":", "out", "=", "open", "(", "target", ",", "\"w\"", ")", "out", ".", "write", "(", "getCopyrightNotice", "(", ")", ")", "out", ".", "write", "(", "include", "(", "\"mongo/db/fts/unicode...
https://github.com/Tencent/CMONGO/blob/c40380caa14e05509f46993aa8b8da966b09b0b5/src/mongo/db/fts/unicode/gen_delimiter_list.py#L8-L93
Xilinx/Vitis-AI
fc74d404563d9951b57245443c73bef389f3657f
tools/Vitis-AI-Quantizer/vai_q_tensorflow1.x/tensorflow/python/ops/resource_variable_ops.py
python
BaseResourceVariable.scatter_nd_add
(self, indices, updates, name=None)
return self._lazy_read(gen_state_ops.resource_scatter_nd_add( self.handle, indices, ops.convert_to_tensor(updates, self.dtype), name=name))
Applies sparse addition to individual values or slices in a Variable. `ref` is a `Tensor` with rank `P` and `indices` is a `Tensor` of rank `Q`. `indices` must be integer tensor, containing indices into `ref`. It must be shape `[d_0, ..., d_{Q-2}, K]` where `0 < K <= P`. The innermost dimension of `i...
Applies sparse addition to individual values or slices in a Variable.
[ "Applies", "sparse", "addition", "to", "individual", "values", "or", "slices", "in", "a", "Variable", "." ]
def scatter_nd_add(self, indices, updates, name=None): """Applies sparse addition to individual values or slices in a Variable. `ref` is a `Tensor` with rank `P` and `indices` is a `Tensor` of rank `Q`. `indices` must be integer tensor, containing indices into `ref`. It must be shape `[d_0, ..., d_{Q-...
[ "def", "scatter_nd_add", "(", "self", ",", "indices", ",", "updates", ",", "name", "=", "None", ")", ":", "return", "self", ".", "_lazy_read", "(", "gen_state_ops", ".", "resource_scatter_nd_add", "(", "self", ".", "handle", ",", "indices", ",", "ops", "."...
https://github.com/Xilinx/Vitis-AI/blob/fc74d404563d9951b57245443c73bef389f3657f/tools/Vitis-AI-Quantizer/vai_q_tensorflow1.x/tensorflow/python/ops/resource_variable_ops.py#L1082-L1130
hanpfei/chromium-net
392cc1fa3a8f92f42e4071ab6e674d8e0482f83f
third_party/catapult/third_party/pyfakefs/pyfakefs/fake_filesystem.py
python
FakeOsModule.chmod
(self, path, mode)
Change the permissions of a file as encoded in integer mode. Args: path: (str) Path to the file. mode: (int) Permissions
Change the permissions of a file as encoded in integer mode.
[ "Change", "the", "permissions", "of", "a", "file", "as", "encoded", "in", "integer", "mode", "." ]
def chmod(self, path, mode): """Change the permissions of a file as encoded in integer mode. Args: path: (str) Path to the file. mode: (int) Permissions """ try: file_object = self.filesystem.GetObject(path) except IOError as io_error: if io_error.errno == errno.ENOENT: ...
[ "def", "chmod", "(", "self", ",", "path", ",", "mode", ")", ":", "try", ":", "file_object", "=", "self", ".", "filesystem", ".", "GetObject", "(", "path", ")", "except", "IOError", "as", "io_error", ":", "if", "io_error", ".", "errno", "==", "errno", ...
https://github.com/hanpfei/chromium-net/blob/392cc1fa3a8f92f42e4071ab6e674d8e0482f83f/third_party/catapult/third_party/pyfakefs/pyfakefs/fake_filesystem.py#L1731-L1748
benoitsteiner/tensorflow-opencl
cb7cb40a57fde5cfd4731bc551e82a1e2fef43a5
tensorflow/contrib/timeseries/python/timeseries/state_space_models/state_space_model.py
python
StateSpaceModel._variable_observation_transition_tradeoff_log
(self)
return variable_scope.get_variable( name="observation_transition_tradeoff_log_scale", initializer=constant_op.constant( -self._configuration.transition_covariance_initial_log_scale_bias, dtype=self.dtype), dtype=self.dtype)
Define a variable to trade off observation and transition noise.
Define a variable to trade off observation and transition noise.
[ "Define", "a", "variable", "to", "trade", "off", "observation", "and", "transition", "noise", "." ]
def _variable_observation_transition_tradeoff_log(self): """Define a variable to trade off observation and transition noise.""" return variable_scope.get_variable( name="observation_transition_tradeoff_log_scale", initializer=constant_op.constant( -self._configuration.transition_cova...
[ "def", "_variable_observation_transition_tradeoff_log", "(", "self", ")", ":", "return", "variable_scope", ".", "get_variable", "(", "name", "=", "\"observation_transition_tradeoff_log_scale\"", ",", "initializer", "=", "constant_op", ".", "constant", "(", "-", "self", ...
https://github.com/benoitsteiner/tensorflow-opencl/blob/cb7cb40a57fde5cfd4731bc551e82a1e2fef43a5/tensorflow/contrib/timeseries/python/timeseries/state_space_models/state_space_model.py#L641-L648
OSGeo/gdal
3748fc4ba4fba727492774b2b908a2130c864a83
swig/python/osgeo/osr.py
python
SpatialReference.ImportFromUSGS
(self, *args)
return _osr.SpatialReference_ImportFromUSGS(self, *args)
r"""ImportFromUSGS(SpatialReference self, long proj_code, long zone=0, double [15] argin=0, long datum_code=0) -> OGRErr
r"""ImportFromUSGS(SpatialReference self, long proj_code, long zone=0, double [15] argin=0, long datum_code=0) -> OGRErr
[ "r", "ImportFromUSGS", "(", "SpatialReference", "self", "long", "proj_code", "long", "zone", "=", "0", "double", "[", "15", "]", "argin", "=", "0", "long", "datum_code", "=", "0", ")", "-", ">", "OGRErr" ]
def ImportFromUSGS(self, *args): r"""ImportFromUSGS(SpatialReference self, long proj_code, long zone=0, double [15] argin=0, long datum_code=0) -> OGRErr""" return _osr.SpatialReference_ImportFromUSGS(self, *args)
[ "def", "ImportFromUSGS", "(", "self", ",", "*", "args", ")", ":", "return", "_osr", ".", "SpatialReference_ImportFromUSGS", "(", "self", ",", "*", "args", ")" ]
https://github.com/OSGeo/gdal/blob/3748fc4ba4fba727492774b2b908a2130c864a83/swig/python/osgeo/osr.py#L782-L784
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Gems/CloudGemMetric/v1/AWS/common-code/Lib/llvmlite/ir/types.py
python
BaseStructType.gep
(self, i)
return self.elements[i.constant]
Resolve the type of the i-th element (for getelementptr lookups). *i* needs to be a LLVM constant, so that the type can be determined at compile-time.
Resolve the type of the i-th element (for getelementptr lookups).
[ "Resolve", "the", "type", "of", "the", "i", "-", "th", "element", "(", "for", "getelementptr", "lookups", ")", "." ]
def gep(self, i): """ Resolve the type of the i-th element (for getelementptr lookups). *i* needs to be a LLVM constant, so that the type can be determined at compile-time. """ if not isinstance(i.type, IntType): raise TypeError(i.type) return self.el...
[ "def", "gep", "(", "self", ",", "i", ")", ":", "if", "not", "isinstance", "(", "i", ".", "type", ",", "IntType", ")", ":", "raise", "TypeError", "(", "i", ".", "type", ")", "return", "self", ".", "elements", "[", "i", ".", "constant", "]" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Gems/CloudGemMetric/v1/AWS/common-code/Lib/llvmlite/ir/types.py#L515-L524
oracle/graaljs
36a56e8e993d45fc40939a3a4d9c0c24990720f1
graal-nodejs/tools/gyp/pylib/gyp/MSVSUtil.py
python
_GetPdbPath
(target_dict, config_name, vars)
return pdb_path
Returns the path to the PDB file that will be generated by a given configuration. The lookup proceeds as follows: - Look for an explicit path in the VCLinkerTool configuration block. - Look for an 'msvs_large_pdb_path' variable. - Use '<(PRODUCT_DIR)/<(product_name).(exe|dll).pdb' if 'product_name' is ...
Returns the path to the PDB file that will be generated by a given configuration.
[ "Returns", "the", "path", "to", "the", "PDB", "file", "that", "will", "be", "generated", "by", "a", "given", "configuration", "." ]
def _GetPdbPath(target_dict, config_name, vars): """Returns the path to the PDB file that will be generated by a given configuration. The lookup proceeds as follows: - Look for an explicit path in the VCLinkerTool configuration block. - Look for an 'msvs_large_pdb_path' variable. - Use '<(PRODUCT_D...
[ "def", "_GetPdbPath", "(", "target_dict", ",", "config_name", ",", "vars", ")", ":", "config", "=", "target_dict", "[", "\"configurations\"", "]", "[", "config_name", "]", "msvs", "=", "config", ".", "setdefault", "(", "\"msvs_settings\"", ",", "{", "}", ")"...
https://github.com/oracle/graaljs/blob/36a56e8e993d45fc40939a3a4d9c0c24990720f1/graal-nodejs/tools/gyp/pylib/gyp/MSVSUtil.py#L130-L166
greenheartgames/greenworks
3ea4ab490b56676de3f0a237c74bcfdb17323e60
deps/cpplint/cpplint.py
python
CheckBracesSpacing
(filename, clean_lines, linenum, nesting_state, error)
Checks for horizontal spacing near commas. Args: filename: The name of the current file. clean_lines: A CleansedLines instance containing the file. linenum: The number of the line to check. nesting_state: A NestingState instance which maintains information about the current stack o...
Checks for horizontal spacing near commas.
[ "Checks", "for", "horizontal", "spacing", "near", "commas", "." ]
def CheckBracesSpacing(filename, clean_lines, linenum, nesting_state, error): """Checks for horizontal spacing near commas. Args: filename: The name of the current file. clean_lines: A CleansedLines instance containing the file. linenum: The number of the line to check. nesting_state: A NestingStat...
[ "def", "CheckBracesSpacing", "(", "filename", ",", "clean_lines", ",", "linenum", ",", "nesting_state", ",", "error", ")", ":", "line", "=", "clean_lines", ".", "elided", "[", "linenum", "]", "# Except after an opening paren, or after another opening brace (in case of", ...
https://github.com/greenheartgames/greenworks/blob/3ea4ab490b56676de3f0a237c74bcfdb17323e60/deps/cpplint/cpplint.py#L3485-L3571
alexgkendall/caffe-posenet
62aafbd7c45df91acdba14f5d1406d8295c2bc6f
scripts/cpp_lint.py
python
ProcessFile
(filename, vlevel, extra_check_functions=[])
Does google-lint on a single file. Args: filename: The name of the file to parse. vlevel: The level of errors to report. Every error of confidence >= verbose_level will be reported. 0 is a good default. extra_check_functions: An array of additional check functions that will be ...
Does google-lint on a single file.
[ "Does", "google", "-", "lint", "on", "a", "single", "file", "." ]
def ProcessFile(filename, vlevel, extra_check_functions=[]): """Does google-lint on a single file. Args: filename: The name of the file to parse. vlevel: The level of errors to report. Every error of confidence >= verbose_level will be reported. 0 is a good default. extra_check_functions: An ar...
[ "def", "ProcessFile", "(", "filename", ",", "vlevel", ",", "extra_check_functions", "=", "[", "]", ")", ":", "_SetVerboseLevel", "(", "vlevel", ")", "try", ":", "# Support the UNIX convention of using \"-\" for stdin. Note that", "# we are not opening the file with universal...
https://github.com/alexgkendall/caffe-posenet/blob/62aafbd7c45df91acdba14f5d1406d8295c2bc6f/scripts/cpp_lint.py#L4689-L4754
Xilinx/Vitis-AI
fc74d404563d9951b57245443c73bef389f3657f
tools/Vitis-AI-Runtime/VART/vart/trace/vaitrace/writer/parser/vart_parser.py
python
DPUEventParser.get_dpu_profile_summary
(self, fmt="vtf")
return ret
DPU Profile Summary Format: Kernel Name,Number Of Runs,CU Full Name,Minimum Time (ms),Average Time (ms),Maximum Time (ms),Workload(GOP),DPU Performance(GOP/s),Mem IO(MB),Mem Bandwidth(MB/s),
DPU Profile Summary Format: Kernel Name,Number Of Runs,CU Full Name,Minimum Time (ms),Average Time (ms),Maximum Time (ms),Workload(GOP),DPU Performance(GOP/s),Mem IO(MB),Mem Bandwidth(MB/s),
[ "DPU", "Profile", "Summary", "Format", ":", "Kernel", "Name", "Number", "Of", "Runs", "CU", "Full", "Name", "Minimum", "Time", "(", "ms", ")", "Average", "Time", "(", "ms", ")", "Maximum", "Time", "(", "ms", ")", "Workload", "(", "GOP", ")", "DPU", "...
def get_dpu_profile_summary(self, fmt="vtf"): """ DPU Profile Summary Format: Kernel Name,Number Of Runs,CU Full Name,Minimum Time (ms),Average Time (ms),Maximum Time (ms),Workload(GOP),DPU Performance(GOP/s),Mem IO(MB),Mem Bandwidth(MB/s), """ subGraphStat = {} ret = []...
[ "def", "get_dpu_profile_summary", "(", "self", ",", "fmt", "=", "\"vtf\"", ")", ":", "subGraphStat", "=", "{", "}", "ret", "=", "[", "]", "for", "dpu", "in", "self", ".", "dpu_timelines", ":", "if", "dpu", ".", "len", "(", ")", "==", "0", ":", "con...
https://github.com/Xilinx/Vitis-AI/blob/fc74d404563d9951b57245443c73bef389f3657f/tools/Vitis-AI-Runtime/VART/vart/trace/vaitrace/writer/parser/vart_parser.py#L286-L386
Polidea/SiriusObfuscator
b0e590d8130e97856afe578869b83a209e2b19be
SymbolExtractorAndRenamer/lldb/scripts/Python/static-binding/lldb.py
python
SBType.GetTypedefedType
(self)
return _lldb.SBType_GetTypedefedType(self)
GetTypedefedType(self) -> SBType
GetTypedefedType(self) -> SBType
[ "GetTypedefedType", "(", "self", ")", "-", ">", "SBType" ]
def GetTypedefedType(self): """GetTypedefedType(self) -> SBType""" return _lldb.SBType_GetTypedefedType(self)
[ "def", "GetTypedefedType", "(", "self", ")", ":", "return", "_lldb", ".", "SBType_GetTypedefedType", "(", "self", ")" ]
https://github.com/Polidea/SiriusObfuscator/blob/b0e590d8130e97856afe578869b83a209e2b19be/SymbolExtractorAndRenamer/lldb/scripts/Python/static-binding/lldb.py#L10402-L10404
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/idlelib/macosx.py
python
preferTabsPreferenceWarning
()
return None
Warn if "Prefer tabs when opening documents" is set to "Always".
Warn if "Prefer tabs when opening documents" is set to "Always".
[ "Warn", "if", "Prefer", "tabs", "when", "opening", "documents", "is", "set", "to", "Always", "." ]
def preferTabsPreferenceWarning(): """ Warn if "Prefer tabs when opening documents" is set to "Always". """ if platform != 'darwin': return None prefs = readSystemPreferences() if prefs and prefs.get('AppleWindowTabbingMode') == 'always': return ( 'WARNING: The syste...
[ "def", "preferTabsPreferenceWarning", "(", ")", ":", "if", "platform", "!=", "'darwin'", ":", "return", "None", "prefs", "=", "readSystemPreferences", "(", ")", "if", "prefs", "and", "prefs", ".", "get", "(", "'AppleWindowTabbingMode'", ")", "==", "'always'", ...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/idlelib/macosx.py#L107-L122
ricardoquesada/Spidermonkey
4a75ea2543408bd1b2c515aa95901523eeef7858
dom/bindings/parser/WebIDL.py
python
Parser.p_SpecialLegacyCaller
(self, p)
Special : LEGACYCALLER
Special : LEGACYCALLER
[ "Special", ":", "LEGACYCALLER" ]
def p_SpecialLegacyCaller(self, p): """ Special : LEGACYCALLER """ p[0] = IDLMethod.Special.LegacyCaller
[ "def", "p_SpecialLegacyCaller", "(", "self", ",", "p", ")", ":", "p", "[", "0", "]", "=", "IDLMethod", ".", "Special", ".", "LegacyCaller" ]
https://github.com/ricardoquesada/Spidermonkey/blob/4a75ea2543408bd1b2c515aa95901523eeef7858/dom/bindings/parser/WebIDL.py#L4878-L4882
tensorflow/tensorflow
419e3a6b650ea4bd1b0cba23c4348f8a69f3272e
tensorflow/python/eager/tape.py
python
pop_tape
(tape)
Pops the given tape in the stack.
Pops the given tape in the stack.
[ "Pops", "the", "given", "tape", "in", "the", "stack", "." ]
def pop_tape(tape): """Pops the given tape in the stack.""" pywrap_tfe.TFE_Py_TapeSetRemove(tape._tape)
[ "def", "pop_tape", "(", "tape", ")", ":", "pywrap_tfe", ".", "TFE_Py_TapeSetRemove", "(", "tape", ".", "_tape", ")" ]
https://github.com/tensorflow/tensorflow/blob/419e3a6b650ea4bd1b0cba23c4348f8a69f3272e/tensorflow/python/eager/tape.py#L145-L147
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/imaplib.py
python
IMAP4_stream.readline
(self)
return self.readfile.readline()
Read line from remote.
Read line from remote.
[ "Read", "line", "from", "remote", "." ]
def readline(self): """Read line from remote.""" return self.readfile.readline()
[ "def", "readline", "(", "self", ")", ":", "return", "self", ".", "readfile", ".", "readline", "(", ")" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/imaplib.py#L1344-L1346
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/gtk/_gdi.py
python
RegionFromBitmap
(*args, **kwargs)
return val
RegionFromBitmap(Bitmap bmp) -> Region
RegionFromBitmap(Bitmap bmp) -> Region
[ "RegionFromBitmap", "(", "Bitmap", "bmp", ")", "-", ">", "Region" ]
def RegionFromBitmap(*args, **kwargs): """RegionFromBitmap(Bitmap bmp) -> Region""" val = _gdi_.new_RegionFromBitmap(*args, **kwargs) return val
[ "def", "RegionFromBitmap", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "val", "=", "_gdi_", ".", "new_RegionFromBitmap", "(", "*", "args", ",", "*", "*", "kwargs", ")", "return", "val" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/gtk/_gdi.py#L1654-L1657
Xilinx/Vitis-AI
fc74d404563d9951b57245443c73bef389f3657f
tools/Vitis-AI-Quantizer/vai_q_tensorflow1.x/tensorflow/contrib/factorization/python/ops/kmeans.py
python
KMeansClustering.score
(self, input_fn)
return self.evaluate(input_fn=input_fn, steps=1)[KMeansClustering.SCORE]
Returns the sum of squared distances to nearest clusters. Note that this function is different from the corresponding one in sklearn which returns the negative sum. Args: input_fn: Input points. See `tf.estimator.Estimator.evaluate`. Only one batch is retrieved. Returns: The sum o...
Returns the sum of squared distances to nearest clusters.
[ "Returns", "the", "sum", "of", "squared", "distances", "to", "nearest", "clusters", "." ]
def score(self, input_fn): """Returns the sum of squared distances to nearest clusters. Note that this function is different from the corresponding one in sklearn which returns the negative sum. Args: input_fn: Input points. See `tf.estimator.Estimator.evaluate`. Only one batch is retrie...
[ "def", "score", "(", "self", ",", "input_fn", ")", ":", "return", "self", ".", "evaluate", "(", "input_fn", "=", "input_fn", ",", "steps", "=", "1", ")", "[", "KMeansClustering", ".", "SCORE", "]" ]
https://github.com/Xilinx/Vitis-AI/blob/fc74d404563d9951b57245443c73bef389f3657f/tools/Vitis-AI-Quantizer/vai_q_tensorflow1.x/tensorflow/contrib/factorization/python/ops/kmeans.py#L442-L456
microsoft/TSS.MSR
0f2516fca2cd9929c31d5450e39301c9bde43688
TSS.Py/src/TpmMarshaler.py
python
TpmBuffer.writeNum
(self, val, len)
Writes the given integer of the given size to this buffer in the TPM wire format Args: val: Numerical value to marshal len: Size of the numerical value in bytes
Writes the given integer of the given size to this buffer in the TPM wire format Args: val: Numerical value to marshal len: Size of the numerical value in bytes
[ "Writes", "the", "given", "integer", "of", "the", "given", "size", "to", "this", "buffer", "in", "the", "TPM", "wire", "format", "Args", ":", "val", ":", "Numerical", "value", "to", "marshal", "len", ":", "Size", "of", "the", "numerical", "value", "in", ...
def writeNum(self, val, len): """ Writes the given integer of the given size to this buffer in the TPM wire format Args: val: Numerical value to marshal len: Size of the numerical value in bytes """ self.__checkLen(len, True) self.buffer[self.curPos : self...
[ "def", "writeNum", "(", "self", ",", "val", ",", "len", ")", ":", "self", ".", "__checkLen", "(", "len", ",", "True", ")", "self", ".", "buffer", "[", "self", ".", "curPos", ":", "self", ".", "curPos", "+", "len", "]", "=", "intToTpm", "(", "val"...
https://github.com/microsoft/TSS.MSR/blob/0f2516fca2cd9929c31d5450e39301c9bde43688/TSS.Py/src/TpmMarshaler.py#L129-L137
miyosuda/TensorFlowAndroidDemo
35903e0221aa5f109ea2dbef27f20b52e317f42d
jni-build/jni/include/external/bazel_tools/third_party/py/gflags/__init__.py
python
FlagValues._RegisterFlagByModuleId
(self, module_id, flag)
Records the module that defines a specific flag. Args: module_id: An int, the ID of the Python module. flag: A Flag object, a flag that is key to the module.
Records the module that defines a specific flag.
[ "Records", "the", "module", "that", "defines", "a", "specific", "flag", "." ]
def _RegisterFlagByModuleId(self, module_id, flag): """Records the module that defines a specific flag. Args: module_id: An int, the ID of the Python module. flag: A Flag object, a flag that is key to the module. """ flags_by_module_id = self.FlagsByModuleIdDict() flags_by_module_id.set...
[ "def", "_RegisterFlagByModuleId", "(", "self", ",", "module_id", ",", "flag", ")", ":", "flags_by_module_id", "=", "self", ".", "FlagsByModuleIdDict", "(", ")", "flags_by_module_id", ".", "setdefault", "(", "module_id", ",", "[", "]", ")", ".", "append", "(", ...
https://github.com/miyosuda/TensorFlowAndroidDemo/blob/35903e0221aa5f109ea2dbef27f20b52e317f42d/jni-build/jni/include/external/bazel_tools/third_party/py/gflags/__init__.py#L889-L897
tensorflow/tensorflow
419e3a6b650ea4bd1b0cba23c4348f8a69f3272e
tensorflow/python/distribute/ps_values.py
python
RestoredDistributedTable._create_resource
(self)
return self._coordinator_instance._create_resource()
A function that creates a resource handle for a table on coordinator.
A function that creates a resource handle for a table on coordinator.
[ "A", "function", "that", "creates", "a", "resource", "handle", "for", "a", "table", "on", "coordinator", "." ]
def _create_resource(self): """A function that creates a resource handle for a table on coordinator.""" return self._coordinator_instance._create_resource()
[ "def", "_create_resource", "(", "self", ")", ":", "return", "self", ".", "_coordinator_instance", ".", "_create_resource", "(", ")" ]
https://github.com/tensorflow/tensorflow/blob/419e3a6b650ea4bd1b0cba23c4348f8a69f3272e/tensorflow/python/distribute/ps_values.py#L770-L772
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Gems/CloudGemDefectReporter/v1/AWS/common-code/Lib/pkg_resources/_vendor/pyparsing.py
python
Keyword.setDefaultKeywordChars
( chars )
Overrides the default Keyword chars
Overrides the default Keyword chars
[ "Overrides", "the", "default", "Keyword", "chars" ]
def setDefaultKeywordChars( chars ): """Overrides the default Keyword chars """ Keyword.DEFAULT_KEYWORD_CHARS = chars
[ "def", "setDefaultKeywordChars", "(", "chars", ")", ":", "Keyword", ".", "DEFAULT_KEYWORD_CHARS", "=", "chars" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Gems/CloudGemDefectReporter/v1/AWS/common-code/Lib/pkg_resources/_vendor/pyparsing.py#L2458-L2461
potassco/clingo
e0c91d8f95cc28de1c480a871f9c97c30de83d40
libpyclingo/clingo/backend.py
python
Observer.theory_element
(self, element_id: int, terms: Sequence[int], condition: Sequence[int])
Observe theory elements. Parameters ---------- element_id The id of the element. terms The term tuple of the element in form of a list of term ids. condition The list of program literals forming the condition.
Observe theory elements.
[ "Observe", "theory", "elements", "." ]
def theory_element(self, element_id: int, terms: Sequence[int], condition: Sequence[int]) -> None: ''' Observe theory elements. Parameters ---------- element_id The id of the element. terms The term tuple of the element in f...
[ "def", "theory_element", "(", "self", ",", "element_id", ":", "int", ",", "terms", ":", "Sequence", "[", "int", "]", ",", "condition", ":", "Sequence", "[", "int", "]", ")", "->", "None", ":" ]
https://github.com/potassco/clingo/blob/e0c91d8f95cc28de1c480a871f9c97c30de83d40/libpyclingo/clingo/backend.py#L300-L313
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/idlelib/configdialog.py
python
ConfigDialog.create_widgets
(self)
Create and place widgets for tabbed dialog. Widgets Bound to self: note: Notebook highpage: HighPage fontpage: FontPage keyspage: KeysPage genpage: GenPage extpage: self.create_page_extensions Methods: create_action_bu...
Create and place widgets for tabbed dialog.
[ "Create", "and", "place", "widgets", "for", "tabbed", "dialog", "." ]
def create_widgets(self): """Create and place widgets for tabbed dialog. Widgets Bound to self: note: Notebook highpage: HighPage fontpage: FontPage keyspage: KeysPage genpage: GenPage extpage: self.create_page_extensions ...
[ "def", "create_widgets", "(", "self", ")", ":", "self", ".", "note", "=", "note", "=", "Notebook", "(", "self", ")", "self", ".", "highpage", "=", "HighPage", "(", "note", ")", "self", ".", "fontpage", "=", "FontPage", "(", "note", ",", "self", ".", ...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/idlelib/configdialog.py#L96-L125
MegEngine/MegEngine
ce9ad07a27ec909fb8db4dd67943d24ba98fb93a
imperative/python/megengine/optimizer/lr_scheduler.py
python
LRScheduler.load_state_dict
(self, state_dict)
r"""Loads the schedulers state. Args: state_dict: scheduler state.
r"""Loads the schedulers state.
[ "r", "Loads", "the", "schedulers", "state", "." ]
def load_state_dict(self, state_dict): r"""Loads the schedulers state. Args: state_dict: scheduler state. """ raise NotImplementedError
[ "def", "load_state_dict", "(", "self", ",", "state_dict", ")", ":", "raise", "NotImplementedError" ]
https://github.com/MegEngine/MegEngine/blob/ce9ad07a27ec909fb8db4dd67943d24ba98fb93a/imperative/python/megengine/optimizer/lr_scheduler.py#L54-L60
psmoveservice/PSMoveService
22bbe20e9de53f3f3581137bce7b88e2587a27e7
misc/python/pypsmove/transformations.py
python
arcball_map_to_sphere
(point, center, radius)
Return unit sphere coordinates from window coordinates.
Return unit sphere coordinates from window coordinates.
[ "Return", "unit", "sphere", "coordinates", "from", "window", "coordinates", "." ]
def arcball_map_to_sphere(point, center, radius): """Return unit sphere coordinates from window coordinates.""" v0 = (point[0] - center[0]) / radius v1 = (center[1] - point[1]) / radius n = v0*v0 + v1*v1 if n > 1.0: # position outside of sphere n = math.sqrt(n) return numpy.a...
[ "def", "arcball_map_to_sphere", "(", "point", ",", "center", ",", "radius", ")", ":", "v0", "=", "(", "point", "[", "0", "]", "-", "center", "[", "0", "]", ")", "/", "radius", "v1", "=", "(", "center", "[", "1", "]", "-", "point", "[", "1", "]"...
https://github.com/psmoveservice/PSMoveService/blob/22bbe20e9de53f3f3581137bce7b88e2587a27e7/misc/python/pypsmove/transformations.py#L1621-L1631
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/numpy/py3/numpy/core/arrayprint.py
python
_array_repr_implementation
( arr, max_line_width=None, precision=None, suppress_small=None, array2string=array2string)
return arr_str + spacer + dtype_str
Internal version of array_repr() that allows overriding array2string.
Internal version of array_repr() that allows overriding array2string.
[ "Internal", "version", "of", "array_repr", "()", "that", "allows", "overriding", "array2string", "." ]
def _array_repr_implementation( arr, max_line_width=None, precision=None, suppress_small=None, array2string=array2string): """Internal version of array_repr() that allows overriding array2string.""" if max_line_width is None: max_line_width = _format_options['linewidth'] if type(arr...
[ "def", "_array_repr_implementation", "(", "arr", ",", "max_line_width", "=", "None", ",", "precision", "=", "None", ",", "suppress_small", "=", "None", ",", "array2string", "=", "array2string", ")", ":", "if", "max_line_width", "is", "None", ":", "max_line_width...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/numpy/py3/numpy/core/arrayprint.py#L1426-L1470
apple/swift-lldb
d74be846ef3e62de946df343e8c234bde93a8912
scripts/Python/static-binding/lldb.py
python
SBDebugger.SetSelectedTarget
(self, target)
return _lldb.SBDebugger_SetSelectedTarget(self, target)
SetSelectedTarget(SBDebugger self, SBTarget target)
SetSelectedTarget(SBDebugger self, SBTarget target)
[ "SetSelectedTarget", "(", "SBDebugger", "self", "SBTarget", "target", ")" ]
def SetSelectedTarget(self, target): """SetSelectedTarget(SBDebugger self, SBTarget target)""" return _lldb.SBDebugger_SetSelectedTarget(self, target)
[ "def", "SetSelectedTarget", "(", "self", ",", "target", ")", ":", "return", "_lldb", ".", "SBDebugger_SetSelectedTarget", "(", "self", ",", "target", ")" ]
https://github.com/apple/swift-lldb/blob/d74be846ef3e62de946df343e8c234bde93a8912/scripts/Python/static-binding/lldb.py#L3993-L3995
carla-simulator/carla
8854804f4d7748e14d937ec763a2912823a7e5f5
PythonAPI/examples/no_rendering_mode.py
python
MapImage.scale_map
(self, scale)
Scales the map surface
Scales the map surface
[ "Scales", "the", "map", "surface" ]
def scale_map(self, scale): """Scales the map surface""" if scale != self.scale: self.scale = scale width = int(self.big_map_surface.get_width() * self.scale) self.surface = pygame.transform.smoothscale(self.big_map_surface, (width, width))
[ "def", "scale_map", "(", "self", ",", "scale", ")", ":", "if", "scale", "!=", "self", ".", "scale", ":", "self", ".", "scale", "=", "scale", "width", "=", "int", "(", "self", ".", "big_map_surface", ".", "get_width", "(", ")", "*", "self", ".", "sc...
https://github.com/carla-simulator/carla/blob/8854804f4d7748e14d937ec763a2912823a7e5f5/PythonAPI/examples/no_rendering_mode.py#L870-L875
ricardoquesada/Spidermonkey
4a75ea2543408bd1b2c515aa95901523eeef7858
config/expandlibs.py
python
ExpandArgs._expand
(self, arg)
return self._expand_desc(arg)
Internal function doing the actual work
Internal function doing the actual work
[ "Internal", "function", "doing", "the", "actual", "work" ]
def _expand(self, arg): '''Internal function doing the actual work''' (root, ext) = os.path.splitext(arg) if ext != conf.LIB_SUFFIX or not os.path.basename(root).startswith(conf.LIB_PREFIX): return [relativize(arg)] if len(conf.IMPORT_LIB_SUFFIX): dll = root + con...
[ "def", "_expand", "(", "self", ",", "arg", ")", ":", "(", "root", ",", "ext", ")", "=", "os", ".", "path", ".", "splitext", "(", "arg", ")", "if", "ext", "!=", "conf", ".", "LIB_SUFFIX", "or", "not", "os", ".", "path", ".", "basename", "(", "ro...
https://github.com/ricardoquesada/Spidermonkey/blob/4a75ea2543408bd1b2c515aa95901523eeef7858/config/expandlibs.py#L111-L124
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/py/py/_path/local.py
python
LocalPath.remove
(self, rec=1, ignore_errors=False)
remove a file or directory (or a directory tree if rec=1). if ignore_errors is True, errors while removing directories will be ignored.
remove a file or directory (or a directory tree if rec=1). if ignore_errors is True, errors while removing directories will be ignored.
[ "remove", "a", "file", "or", "directory", "(", "or", "a", "directory", "tree", "if", "rec", "=", "1", ")", ".", "if", "ignore_errors", "is", "True", "errors", "while", "removing", "directories", "will", "be", "ignored", "." ]
def remove(self, rec=1, ignore_errors=False): """ remove a file or directory (or a directory tree if rec=1). if ignore_errors is True, errors while removing directories will be ignored. """ if self.check(dir=1, link=0): if rec: # force remove of readon...
[ "def", "remove", "(", "self", ",", "rec", "=", "1", ",", "ignore_errors", "=", "False", ")", ":", "if", "self", ".", "check", "(", "dir", "=", "1", ",", "link", "=", "0", ")", ":", "if", "rec", ":", "# force remove of readonly files on windows", "if", ...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/py/py/_path/local.py#L207-L226
windystrife/UnrealEngine_NVIDIAGameWorks
b50e6338a7c5b26374d66306ebc7807541ff815e
Engine/Extras/ThirdPartyNotUE/emsdk/Win64/python/2.7.5.3_64bit/Lib/locale.py
python
getlocale
(category=LC_CTYPE)
return _parse_localename(localename)
Returns the current setting for the given locale category as tuple (language code, encoding). category may be one of the LC_* value except LC_ALL. It defaults to LC_CTYPE. Except for the code 'C', the language code corresponds to RFC 1766. code and encoding can be None in case...
Returns the current setting for the given locale category as tuple (language code, encoding).
[ "Returns", "the", "current", "setting", "for", "the", "given", "locale", "category", "as", "tuple", "(", "language", "code", "encoding", ")", "." ]
def getlocale(category=LC_CTYPE): """ Returns the current setting for the given locale category as tuple (language code, encoding). category may be one of the LC_* value except LC_ALL. It defaults to LC_CTYPE. Except for the code 'C', the language code corresponds to RFC 1...
[ "def", "getlocale", "(", "category", "=", "LC_CTYPE", ")", ":", "localename", "=", "_setlocale", "(", "category", ")", "if", "category", "==", "LC_ALL", "and", "';'", "in", "localename", ":", "raise", "TypeError", ",", "'category LC_ALL is not supported'", "retu...
https://github.com/windystrife/UnrealEngine_NVIDIAGameWorks/blob/b50e6338a7c5b26374d66306ebc7807541ff815e/Engine/Extras/ThirdPartyNotUE/emsdk/Win64/python/2.7.5.3_64bit/Lib/locale.py#L514-L530
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/gtk/_misc.py
python
Display_GetCount
(*args)
return _misc_.Display_GetCount(*args)
Display_GetCount() -> unsigned int Return the number of available displays.
Display_GetCount() -> unsigned int
[ "Display_GetCount", "()", "-", ">", "unsigned", "int" ]
def Display_GetCount(*args): """ Display_GetCount() -> unsigned int Return the number of available displays. """ return _misc_.Display_GetCount(*args)
[ "def", "Display_GetCount", "(", "*", "args", ")", ":", "return", "_misc_", ".", "Display_GetCount", "(", "*", "args", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/gtk/_misc.py#L6218-L6224
Xilinx/Vitis-AI
fc74d404563d9951b57245443c73bef389f3657f
tools/Vitis-AI-Quantizer/vai_q_tensorflow1.x/tensorflow/contrib/bigtable/python/ops/bigtable_api.py
python
BigtableTable.sample_keys
(self)
return _BigtableSampleKeysDataset(self)
Retrieves a sampling of row keys from the Bigtable table. This dataset is most often used in conjunction with `tf.data.experimental.parallel_interleave` to construct a set of ranges for scanning in parallel. Returns: A `tf.data.Dataset` returning string row keys.
Retrieves a sampling of row keys from the Bigtable table.
[ "Retrieves", "a", "sampling", "of", "row", "keys", "from", "the", "Bigtable", "table", "." ]
def sample_keys(self): """Retrieves a sampling of row keys from the Bigtable table. This dataset is most often used in conjunction with `tf.data.experimental.parallel_interleave` to construct a set of ranges for scanning in parallel. Returns: A `tf.data.Dataset` returning string row keys. ...
[ "def", "sample_keys", "(", "self", ")", ":", "return", "_BigtableSampleKeysDataset", "(", "self", ")" ]
https://github.com/Xilinx/Vitis-AI/blob/fc74d404563d9951b57245443c73bef389f3657f/tools/Vitis-AI-Quantizer/vai_q_tensorflow1.x/tensorflow/contrib/bigtable/python/ops/bigtable_api.py#L226-L236
windystrife/UnrealEngine_NVIDIAGameWorks
b50e6338a7c5b26374d66306ebc7807541ff815e
Engine/Extras/ThirdPartyNotUE/emsdk/Win64/python/2.7.5.3_64bit/Lib/lib-tk/Tkinter.py
python
Canvas.addtag_closest
(self, newtag, x, y, halo=None, start=None)
Add tag NEWTAG to item which is closest to pixel at X, Y. If several match take the top-most. All items closer than HALO are considered overlapping (all are closests). If START is specified the next below this tag is taken.
Add tag NEWTAG to item which is closest to pixel at X, Y. If several match take the top-most. All items closer than HALO are considered overlapping (all are closests). If START is specified the next below this tag is taken.
[ "Add", "tag", "NEWTAG", "to", "item", "which", "is", "closest", "to", "pixel", "at", "X", "Y", ".", "If", "several", "match", "take", "the", "top", "-", "most", ".", "All", "items", "closer", "than", "HALO", "are", "considered", "overlapping", "(", "al...
def addtag_closest(self, newtag, x, y, halo=None, start=None): """Add tag NEWTAG to item which is closest to pixel at X, Y. If several match take the top-most. All items closer than HALO are considered overlapping (all are closests). If START is specified the next below this tag is taken...
[ "def", "addtag_closest", "(", "self", ",", "newtag", ",", "x", ",", "y", ",", "halo", "=", "None", ",", "start", "=", "None", ")", ":", "self", ".", "addtag", "(", "newtag", ",", "'closest'", ",", "x", ",", "y", ",", "halo", ",", "start", ")" ]
https://github.com/windystrife/UnrealEngine_NVIDIAGameWorks/blob/b50e6338a7c5b26374d66306ebc7807541ff815e/Engine/Extras/ThirdPartyNotUE/emsdk/Win64/python/2.7.5.3_64bit/Lib/lib-tk/Tkinter.py#L2189-L2194
krishauser/Klampt
972cc83ea5befac3f653c1ba20f80155768ad519
Python/klampt/src/robotsim.py
python
IKObjective.setLinearPosConstraint
(self, tlocal: "double const [3]", sworld: "double const [3]", dworld: "double const [3]")
return _robotsim.IKObjective_setLinearPosConstraint(self, tlocal, sworld, dworld)
r""" setLinearPosConstraint(IKObjective self, double const [3] tlocal, double const [3] sworld, double const [3] dworld) Manual: Sets a linear position constraint T(link)*tlocal = sworld + u*dworld for some real value u.
r""" setLinearPosConstraint(IKObjective self, double const [3] tlocal, double const [3] sworld, double const [3] dworld)
[ "r", "setLinearPosConstraint", "(", "IKObjective", "self", "double", "const", "[", "3", "]", "tlocal", "double", "const", "[", "3", "]", "sworld", "double", "const", "[", "3", "]", "dworld", ")" ]
def setLinearPosConstraint(self, tlocal: "double const [3]", sworld: "double const [3]", dworld: "double const [3]") -> "void": r""" setLinearPosConstraint(IKObjective self, double const [3] tlocal, double const [3] sworld, double const [3] dworld) Manual: Sets a linear position constraint T(l...
[ "def", "setLinearPosConstraint", "(", "self", ",", "tlocal", ":", "\"double const [3]\"", ",", "sworld", ":", "\"double const [3]\"", ",", "dworld", ":", "\"double const [3]\"", ")", "->", "\"void\"", ":", "return", "_robotsim", ".", "IKObjective_setLinearPosConstraint"...
https://github.com/krishauser/Klampt/blob/972cc83ea5befac3f653c1ba20f80155768ad519/Python/klampt/src/robotsim.py#L6446-L6455
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/osx_carbon/_controls.py
python
RadioBox.SetItemToolTip
(*args, **kwargs)
return _controls_.RadioBox_SetItemToolTip(*args, **kwargs)
SetItemToolTip(self, unsigned int item, String text)
SetItemToolTip(self, unsigned int item, String text)
[ "SetItemToolTip", "(", "self", "unsigned", "int", "item", "String", "text", ")" ]
def SetItemToolTip(*args, **kwargs): """SetItemToolTip(self, unsigned int item, String text)""" return _controls_.RadioBox_SetItemToolTip(*args, **kwargs)
[ "def", "SetItemToolTip", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_controls_", ".", "RadioBox_SetItemToolTip", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_carbon/_controls.py#L2657-L2659
datlife/jetson-car
a1bae7b8ad2af8ef9fd33cdd76421ebe3ff5ca7f
data/train/DatNet.py
python
DatNet.build
(self, nb_classes=10, input_shape=(HEIGHT, WIDTH, CHANNELS), layer1_params=(5, 32, 2), res_layer_params=(3, 16, 3), init='glorot_normal', reg=0.01, use_shortcuts=True)
return model
Return a new Residual Network using full pre-activation based on the work in "Identity Mappings in Deep Residual Networks" by He et al http://arxiv.org/abs/1603.05027 Parameters ---------- input_shape : tuple of (C, H, W) nb_classes : number of scores to produ...
Return a new Residual Network using full pre-activation based on the work in "Identity Mappings in Deep Residual Networks" by He et al http://arxiv.org/abs/1603.05027
[ "Return", "a", "new", "Residual", "Network", "using", "full", "pre", "-", "activation", "based", "on", "the", "work", "in", "Identity", "Mappings", "in", "Deep", "Residual", "Networks", "by", "He", "et", "al", "http", ":", "//", "arxiv", ".", "org", "/",...
def build(self, nb_classes=10, input_shape=(HEIGHT, WIDTH, CHANNELS), layer1_params=(5, 32, 2), res_layer_params=(3, 16, 3), init='glorot_normal', reg=0.01, use_shortcuts=True): ''' Return a new Residual Network using full pre-activation based on the work in "Identity...
[ "def", "build", "(", "self", ",", "nb_classes", "=", "10", ",", "input_shape", "=", "(", "HEIGHT", ",", "WIDTH", ",", "CHANNELS", ")", ",", "layer1_params", "=", "(", "5", ",", "32", ",", "2", ")", ",", "res_layer_params", "=", "(", "3", ",", "16",...
https://github.com/datlife/jetson-car/blob/a1bae7b8ad2af8ef9fd33cdd76421ebe3ff5ca7f/data/train/DatNet.py#L119-L182
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/gtk/stc.py
python
StyledTextCtrl.GetWrapVisualFlagsLocation
(*args, **kwargs)
return _stc.StyledTextCtrl_GetWrapVisualFlagsLocation(*args, **kwargs)
GetWrapVisualFlagsLocation(self) -> int Retrive the location of visual flags for wrapped lines.
GetWrapVisualFlagsLocation(self) -> int
[ "GetWrapVisualFlagsLocation", "(", "self", ")", "-", ">", "int" ]
def GetWrapVisualFlagsLocation(*args, **kwargs): """ GetWrapVisualFlagsLocation(self) -> int Retrive the location of visual flags for wrapped lines. """ return _stc.StyledTextCtrl_GetWrapVisualFlagsLocation(*args, **kwargs)
[ "def", "GetWrapVisualFlagsLocation", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_stc", ".", "StyledTextCtrl_GetWrapVisualFlagsLocation", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/gtk/stc.py#L4111-L4117
LLNL/Caliper
60e06980fc65057e1da01296e6eebbbed30f59c8
src/mpi/services/mpiwrap/wrap.py
python
write_fortran_binding
(out, decl, delegate_name, binding, stmts=None)
Outputs a wrapper for a particular fortran binding that delegates to the primary Fortran wrapper. Optionally takes a list of statements to execute before delegating.
Outputs a wrapper for a particular fortran binding that delegates to the primary Fortran wrapper. Optionally takes a list of statements to execute before delegating.
[ "Outputs", "a", "wrapper", "for", "a", "particular", "fortran", "binding", "that", "delegates", "to", "the", "primary", "Fortran", "wrapper", ".", "Optionally", "takes", "a", "list", "of", "statements", "to", "execute", "before", "delegating", "." ]
def write_fortran_binding(out, decl, delegate_name, binding, stmts=None): """Outputs a wrapper for a particular fortran binding that delegates to the primary Fortran wrapper. Optionally takes a list of statements to execute before delegating. """ out.write(decl.fortranPrototype(binding, defau...
[ "def", "write_fortran_binding", "(", "out", ",", "decl", ",", "delegate_name", ",", "binding", ",", "stmts", "=", "None", ")", ":", "out", ".", "write", "(", "decl", ".", "fortranPrototype", "(", "binding", ",", "default_modifiers", ")", ")", "out", ".", ...
https://github.com/LLNL/Caliper/blob/60e06980fc65057e1da01296e6eebbbed30f59c8/src/mpi/services/mpiwrap/wrap.py#L688-L703
borglab/gtsam
a5bee157efce6a0563704bce6a5d188c29817f39
gtsam_unstable/timing/process_shonan_timing_results.py
python
make_convergence_plot
(name, p_values, times, costs, iter=10)
Make a bar that show the success rate for each p_value according to whether the SO(3) cost converges Arguments: name: string of the plot title p_values: list of p-values (int) times: list of timings (seconds) costs: list of costs (double) iter: int of ...
Make a bar that show the success rate for each p_value according to whether the SO(3) cost converges Arguments: name: string of the plot title p_values: list of p-values (int) times: list of timings (seconds) costs: list of costs (double) iter: int of ...
[ "Make", "a", "bar", "that", "show", "the", "success", "rate", "for", "each", "p_value", "according", "to", "whether", "the", "SO", "(", "3", ")", "cost", "converges", "Arguments", ":", "name", ":", "string", "of", "the", "plot", "title", "p_values", ":",...
def make_convergence_plot(name, p_values, times, costs, iter=10): """ Make a bar that show the success rate for each p_value according to whether the SO(3) cost converges Arguments: name: string of the plot title p_values: list of p-values (int) times: list of timings (se...
[ "def", "make_convergence_plot", "(", "name", ",", "p_values", ",", "times", ",", "costs", ",", "iter", "=", "10", ")", ":", "max_cost", "=", "np", ".", "mean", "(", "np", ".", "array", "(", "heapq", ".", "nlargest", "(", "iter", ",", "costs", ")", ...
https://github.com/borglab/gtsam/blob/a5bee157efce6a0563704bce6a5d188c29817f39/gtsam_unstable/timing/process_shonan_timing_results.py#L40-L93
HKUST-Aerial-Robotics/Teach-Repeat-Replan
98505a7f74b13c8b501176ff838a38423dbef536
utils/pose_utils/build/devel/_setup_util.py
python
_rollback_env_variable
(environ, name, subfolder)
return new_value if value_modified else None
For each catkin workspace in CMAKE_PREFIX_PATH remove the first entry from env[NAME] matching workspace + subfolder. :param subfolder: str '' or subfoldername that may start with '/' :returns: the updated value of the environment variable.
For each catkin workspace in CMAKE_PREFIX_PATH remove the first entry from env[NAME] matching workspace + subfolder.
[ "For", "each", "catkin", "workspace", "in", "CMAKE_PREFIX_PATH", "remove", "the", "first", "entry", "from", "env", "[", "NAME", "]", "matching", "workspace", "+", "subfolder", "." ]
def _rollback_env_variable(environ, name, subfolder): ''' For each catkin workspace in CMAKE_PREFIX_PATH remove the first entry from env[NAME] matching workspace + subfolder. :param subfolder: str '' or subfoldername that may start with '/' :returns: the updated value of the environment variable. '...
[ "def", "_rollback_env_variable", "(", "environ", ",", "name", ",", "subfolder", ")", ":", "value", "=", "environ", "[", "name", "]", "if", "name", "in", "environ", "else", "''", "env_paths", "=", "[", "path", "for", "path", "in", "value", ".", "split", ...
https://github.com/HKUST-Aerial-Robotics/Teach-Repeat-Replan/blob/98505a7f74b13c8b501176ff838a38423dbef536/utils/pose_utils/build/devel/_setup_util.py#L84-L111
SoarGroup/Soar
a1c5e249499137a27da60533c72969eef3b8ab6b
scons/scons-local-4.1.0/SCons/Node/FS.py
python
Dir.get_labspath
(self)
return self._labspath
Get the absolute path of the file.
Get the absolute path of the file.
[ "Get", "the", "absolute", "path", "of", "the", "file", "." ]
def get_labspath(self): """Get the absolute path of the file.""" return self._labspath
[ "def", "get_labspath", "(", "self", ")", ":", "return", "self", ".", "_labspath" ]
https://github.com/SoarGroup/Soar/blob/a1c5e249499137a27da60533c72969eef3b8ab6b/scons/scons-local-4.1.0/SCons/Node/FS.py#L1918-L1920
SequoiaDB/SequoiaDB
2894ed7e5bd6fe57330afc900cf76d0ff0df9f64
tools/server/php_linux/libxml2/lib/python2.4/site-packages/libxml2.py
python
ValidCtxt.validateDocument
(self, doc)
return ret
Try to validate the document instance basically it does the all the checks described by the XML Rec i.e. validates the internal and external subset (if present) and validate the document tree.
Try to validate the document instance basically it does the all the checks described by the XML Rec i.e. validates the internal and external subset (if present) and validate the document tree.
[ "Try", "to", "validate", "the", "document", "instance", "basically", "it", "does", "the", "all", "the", "checks", "described", "by", "the", "XML", "Rec", "i", ".", "e", ".", "validates", "the", "internal", "and", "external", "subset", "(", "if", "present",...
def validateDocument(self, doc): """Try to validate the document instance basically it does the all the checks described by the XML Rec i.e. validates the internal and external subset (if present) and validate the document tree. """ if doc is None: doc__o = None e...
[ "def", "validateDocument", "(", "self", ",", "doc", ")", ":", "if", "doc", "is", "None", ":", "doc__o", "=", "None", "else", ":", "doc__o", "=", "doc", ".", "_o", "ret", "=", "libxml2mod", ".", "xmlValidateDocument", "(", "self", ".", "_o", ",", "doc...
https://github.com/SequoiaDB/SequoiaDB/blob/2894ed7e5bd6fe57330afc900cf76d0ff0df9f64/tools/server/php_linux/libxml2/lib/python2.4/site-packages/libxml2.py#L7056-L7064
natanielruiz/android-yolo
1ebb54f96a67a20ff83ddfc823ed83a13dc3a47f
jni-build/jni/include/tensorflow/python/training/training_ops.py
python
_SparseApplyAdadeltaShape
(op)
return [accum_update_shape]
Shape function for the SparseApplyAdadelta op.
Shape function for the SparseApplyAdadelta op.
[ "Shape", "function", "for", "the", "SparseApplyAdadelta", "op", "." ]
def _SparseApplyAdadeltaShape(op): """Shape function for the SparseApplyAdadelta op.""" var_shape = op.inputs[0].get_shape() accum_grad_shape = op.inputs[1].get_shape().merge_with(var_shape) accum_update_shape = op.inputs[2].get_shape().merge_with(accum_grad_shape) _AssertInputIsScalar(op, 3) # lr _A...
[ "def", "_SparseApplyAdadeltaShape", "(", "op", ")", ":", "var_shape", "=", "op", ".", "inputs", "[", "0", "]", ".", "get_shape", "(", ")", "accum_grad_shape", "=", "op", ".", "inputs", "[", "1", "]", ".", "get_shape", "(", ")", ".", "merge_with", "(", ...
https://github.com/natanielruiz/android-yolo/blob/1ebb54f96a67a20ff83ddfc823ed83a13dc3a47f/jni-build/jni/include/tensorflow/python/training/training_ops.py#L191-L203
apiaryio/drafter
4634ebd07f6c6f257cc656598ccd535492fdfb55
tools/gyp/pylib/gyp/ordered_dict.py
python
OrderedDict.keys
(self)
return list(self)
od.keys() -> list of keys in od
od.keys() -> list of keys in od
[ "od", ".", "keys", "()", "-", ">", "list", "of", "keys", "in", "od" ]
def keys(self): 'od.keys() -> list of keys in od' return list(self)
[ "def", "keys", "(", "self", ")", ":", "return", "list", "(", "self", ")" ]
https://github.com/apiaryio/drafter/blob/4634ebd07f6c6f257cc656598ccd535492fdfb55/tools/gyp/pylib/gyp/ordered_dict.py#L143-L145
stan-dev/math
5fd79f89933269a4ca4d8dd1fde2a36d53d4768c
lib/boost_1.75.0/tools/build/src/build/type.py
python
generated_target_ps
(is_suffix, type, prop_set)
return v
Returns suffix that should be used when generating target of 'type', with the specified properties. If not suffix were specified for 'type', returns suffix for base type, if any.
Returns suffix that should be used when generating target of 'type', with the specified properties. If not suffix were specified for 'type', returns suffix for base type, if any.
[ "Returns", "suffix", "that", "should", "be", "used", "when", "generating", "target", "of", "type", "with", "the", "specified", "properties", ".", "If", "not", "suffix", "were", "specified", "for", "type", "returns", "suffix", "for", "base", "type", "if", "an...
def generated_target_ps(is_suffix, type, prop_set): """ Returns suffix that should be used when generating target of 'type', with the specified properties. If not suffix were specified for 'type', returns suffix for base type, if any. """ if __debug__: from .property_set import Prope...
[ "def", "generated_target_ps", "(", "is_suffix", ",", "type", ",", "prop_set", ")", ":", "if", "__debug__", ":", "from", ".", "property_set", "import", "PropertySet", "assert", "isinstance", "(", "is_suffix", ",", "(", "int", ",", "bool", ")", ")", "assert", ...
https://github.com/stan-dev/math/blob/5fd79f89933269a4ca4d8dd1fde2a36d53d4768c/lib/boost_1.75.0/tools/build/src/build/type.py#L334-L351
fengbingchun/NN_Test
d6305825d5273e4569ccd1eda9ffa2a9c72e18d2
src/tiny-dnn/third_party/cpplint.py
python
GetPreviousNonBlankLine
(clean_lines, linenum)
return ('', -1)
Return the most recent non-blank line and its line number. Args: clean_lines: A CleansedLines instance containing the file contents. linenum: The number of the line to check. Returns: A tuple with two elements. The first element is the contents of the last non-blank line before the current line, ...
Return the most recent non-blank line and its line number.
[ "Return", "the", "most", "recent", "non", "-", "blank", "line", "and", "its", "line", "number", "." ]
def GetPreviousNonBlankLine(clean_lines, linenum): """Return the most recent non-blank line and its line number. Args: clean_lines: A CleansedLines instance containing the file contents. linenum: The number of the line to check. Returns: A tuple with two elements. The first element is the contents ...
[ "def", "GetPreviousNonBlankLine", "(", "clean_lines", ",", "linenum", ")", ":", "prevlinenum", "=", "linenum", "-", "1", "while", "prevlinenum", ">=", "0", ":", "prevline", "=", "clean_lines", ".", "elided", "[", "prevlinenum", "]", "if", "not", "IsBlankLine",...
https://github.com/fengbingchun/NN_Test/blob/d6305825d5273e4569ccd1eda9ffa2a9c72e18d2/src/tiny-dnn/third_party/cpplint.py#L3853-L3873
PaddlePaddle/Paddle
1252f4bb3e574df80aa6d18c7ddae1b3a90bd81c
python/paddle/distributed/metric/metrics.py
python
print_auc
(metric_ptr, is_day, phase="all")
return metric_results
print metric according to stage and phase
print metric according to stage and phase
[ "print", "metric", "according", "to", "stage", "and", "phase" ]
def print_auc(metric_ptr, is_day, phase="all"): """ print metric according to stage and phase """ if is_day is True: stage = "day" stage_num = -1 else: stage = "pass" stage_num = 1 if phase == "join" else 0 metric_results = [] name_list = metric_ptr.get_metri...
[ "def", "print_auc", "(", "metric_ptr", ",", "is_day", ",", "phase", "=", "\"all\"", ")", ":", "if", "is_day", "is", "True", ":", "stage", "=", "\"day\"", "stage_num", "=", "-", "1", "else", ":", "stage", "=", "\"pass\"", "stage_num", "=", "1", "if", ...
https://github.com/PaddlePaddle/Paddle/blob/1252f4bb3e574df80aa6d18c7ddae1b3a90bd81c/python/paddle/distributed/metric/metrics.py#L116-L138
hanpfei/chromium-net
392cc1fa3a8f92f42e4071ab6e674d8e0482f83f
tools/roll_webrtc.py
python
AutoRoller._GetBranches
(self)
return (active, branches)
Returns a tuple of active,branches. The 'active' is the name of the currently active branch and 'branches' is a list of all branches.
Returns a tuple of active,branches.
[ "Returns", "a", "tuple", "of", "active", "branches", "." ]
def _GetBranches(self): """Returns a tuple of active,branches. The 'active' is the name of the currently active branch and 'branches' is a list of all branches. """ lines = self._RunCommand(['git', 'branch']).split('\n') branches = [] active = '' for l in lines: if '*' in l: ...
[ "def", "_GetBranches", "(", "self", ")", ":", "lines", "=", "self", ".", "_RunCommand", "(", "[", "'git'", ",", "'branch'", "]", ")", ".", "split", "(", "'\\n'", ")", "branches", "=", "[", "]", "active", "=", "''", "for", "l", "in", "lines", ":", ...
https://github.com/hanpfei/chromium-net/blob/392cc1fa3a8f92f42e4071ab6e674d8e0482f83f/tools/roll_webrtc.py#L352-L370
hanpfei/chromium-net
392cc1fa3a8f92f42e4071ab6e674d8e0482f83f
third_party/catapult/third_party/gsutil/gslib/cloud_api.py
python
CloudApi.GetObjectMetadata
(self, bucket_name, object_name, generation=None, provider=None, fields=None)
Gets object metadata. Args: bucket_name: Bucket containing the object. object_name: Object name. generation: Generation of the object to retrieve. provider: Cloud storage provider to connect to. If not present, class-wide default is used. fields: If present, return on...
Gets object metadata.
[ "Gets", "object", "metadata", "." ]
def GetObjectMetadata(self, bucket_name, object_name, generation=None, provider=None, fields=None): """Gets object metadata. Args: bucket_name: Bucket containing the object. object_name: Object name. generation: Generation of the object to retrieve. provider: Clo...
[ "def", "GetObjectMetadata", "(", "self", ",", "bucket_name", ",", "object_name", ",", "generation", "=", "None", ",", "provider", "=", "None", ",", "fields", "=", "None", ")", ":", "raise", "NotImplementedError", "(", "'GetObjectMetadata must be overloaded'", ")" ...
https://github.com/hanpfei/chromium-net/blob/392cc1fa3a8f92f42e4071ab6e674d8e0482f83f/third_party/catapult/third_party/gsutil/gslib/cloud_api.py#L205-L225
wlanjie/AndroidFFmpeg
7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf
tools/fdk-aac-build/armeabi-v7a/toolchain/lib/python2.7/plat-mac/lib-scriptpackages/Netscape/Standard_Suite.py
python
Standard_Suite_Events.set
(self, _object, _attributes={}, **_arguments)
set: Set an object\xd5s data Required argument: the object to change Keyword argument to: the new value Keyword argument _attributes: AppleEvent attribute dictionary
set: Set an object\xd5s data Required argument: the object to change Keyword argument to: the new value Keyword argument _attributes: AppleEvent attribute dictionary
[ "set", ":", "Set", "an", "object", "\\", "xd5s", "data", "Required", "argument", ":", "the", "object", "to", "change", "Keyword", "argument", "to", ":", "the", "new", "value", "Keyword", "argument", "_attributes", ":", "AppleEvent", "attribute", "dictionary" ]
def set(self, _object, _attributes={}, **_arguments): """set: Set an object\xd5s data Required argument: the object to change Keyword argument to: the new value Keyword argument _attributes: AppleEvent attribute dictionary """ _code = 'core' _subcode = 'setd' ...
[ "def", "set", "(", "self", ",", "_object", ",", "_attributes", "=", "{", "}", ",", "*", "*", "_arguments", ")", ":", "_code", "=", "'core'", "_subcode", "=", "'setd'", "aetools", ".", "keysubst", "(", "_arguments", ",", "self", ".", "_argmap_set", ")",...
https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/armeabi-v7a/toolchain/lib/python2.7/plat-mac/lib-scriptpackages/Netscape/Standard_Suite.py#L82-L101
ApolloAuto/apollo-platform
86d9dc6743b496ead18d597748ebabd34a513289
ros/ros/rosunit/src/rosunit/core.py
python
xml_results_file
(test_pkg, test_name, is_rostest=False, env=None)
@param test_pkg: name of test's package @type test_pkg: str @param test_name str: name of test @type test_name: str @param is_rostest: True if the results file is for a rostest-generated unit instance @type is_rostest: bool @return: name of xml results file for specified test @rtype: st...
[]
def xml_results_file(test_pkg, test_name, is_rostest=False, env=None): """ @param test_pkg: name of test's package @type test_pkg: str @param test_name str: name of test @type test_name: str @param is_rostest: True if the results file is for a rostest-generated unit instance @type is_ros...
[ "def", "xml_results_file", "(", "test_pkg", ",", "test_name", ",", "is_rostest", "=", "False", ",", "env", "=", "None", ")", ":", "test_dir", "=", "os", ".", "path", ".", "join", "(", "rospkg", ".", "get_test_results_dir", "(", "env", "=", "env", ")", ...
https://github.com/ApolloAuto/apollo-platform/blob/86d9dc6743b496ead18d597748ebabd34a513289/ros/ros/rosunit/src/rosunit/core.py#L91-L117