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
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/windows/Lib/xml/etree/ElementTree.py
python
SubElement
(parent, tag, attrib={}, **extra)
return element
Subelement factory which creates an element instance, and appends it to an existing parent. The element tag, attribute names, and attribute values can be either bytes or Unicode strings. *parent* is the parent element, *tag* is the subelements name, *attrib* is an optional directory containing ele...
Subelement factory which creates an element instance, and appends it to an existing parent.
[ "Subelement", "factory", "which", "creates", "an", "element", "instance", "and", "appends", "it", "to", "an", "existing", "parent", "." ]
def SubElement(parent, tag, attrib={}, **extra): """Subelement factory which creates an element instance, and appends it to an existing parent. The element tag, attribute names, and attribute values can be either bytes or Unicode strings. *parent* is the parent element, *tag* is the subelements na...
[ "def", "SubElement", "(", "parent", ",", "tag", ",", "attrib", "=", "{", "}", ",", "*", "*", "extra", ")", ":", "attrib", "=", "attrib", ".", "copy", "(", ")", "attrib", ".", "update", "(", "extra", ")", "element", "=", "parent", ".", "makeelement"...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/windows/Lib/xml/etree/ElementTree.py#L443-L459
vgc/vgc
8bc17514dc75c99c1166f738d4440b3e0981ebe3
third/fmt/support/docopt.py
python
parse_long
(tokens, options)
return [o]
long ::= '--' chars [ ( ' ' | '=' ) chars ] ;
long ::= '--' chars [ ( ' ' | '=' ) chars ] ;
[ "long", "::", "=", "--", "chars", "[", "(", "|", "=", ")", "chars", "]", ";" ]
def parse_long(tokens, options): """long ::= '--' chars [ ( ' ' | '=' ) chars ] ;""" long, eq, value = tokens.move().partition('=') assert long.startswith('--') value = None if eq == value == '' else value similar = [o for o in options if o.long == long] if tokens.error is DocoptExit and similar...
[ "def", "parse_long", "(", "tokens", ",", "options", ")", ":", "long", ",", "eq", ",", "value", "=", "tokens", ".", "move", "(", ")", ".", "partition", "(", "'='", ")", "assert", "long", ".", "startswith", "(", "'--'", ")", "value", "=", "None", "if...
https://github.com/vgc/vgc/blob/8bc17514dc75c99c1166f738d4440b3e0981ebe3/third/fmt/support/docopt.py#L301-L331
wlanjie/AndroidFFmpeg
7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf
tools/fdk-aac-build/armeabi/toolchain/lib/python2.7/lib-tk/turtle.py
python
_Screen.title
(self, titlestring)
Set title of turtle-window Argument: titlestring -- a string, to appear in the titlebar of the turtle graphics window. This is a method of Screen-class. Not available for TurtleScreen- objects. Example (for a Screen instance named screen): >>> sc...
Set title of turtle-window
[ "Set", "title", "of", "turtle", "-", "window" ]
def title(self, titlestring): """Set title of turtle-window Argument: titlestring -- a string, to appear in the titlebar of the turtle graphics window. This is a method of Screen-class. Not available for TurtleScreen- objects. Example (for a Scre...
[ "def", "title", "(", "self", ",", "titlestring", ")", ":", "if", "_Screen", ".", "_root", "is", "not", "None", ":", "_Screen", ".", "_root", ".", "title", "(", "titlestring", ")", "_Screen", ".", "_title", "=", "titlestring" ]
https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/armeabi/toolchain/lib/python2.7/lib-tk/turtle.py#L3623-L3638
cms-sw/cmssw
fd9de012d503d3405420bcbeec0ec879baa57cf2
Configuration/AlCa/python/GlobalTag.py
python
GlobalTag
(essource = None, globaltag = None, conditions = None)
return essource
Modify the GlobalTag module configuration, allowing to use the extended Configuration/AlCa/python/autoCond.py functionality of specifying symbolic globaltags (i.e., actual global tags, plus additional payloads to get from the DB as customisations). The actual code is taken from cmsDriver's ConfigBuilder...
Modify the GlobalTag module configuration, allowing to use the extended Configuration/AlCa/python/autoCond.py functionality of specifying symbolic globaltags (i.e., actual global tags, plus additional payloads to get from the DB as customisations). The actual code is taken from cmsDriver's ConfigBuilder...
[ "Modify", "the", "GlobalTag", "module", "configuration", "allowing", "to", "use", "the", "extended", "Configuration", "/", "AlCa", "/", "python", "/", "autoCond", ".", "py", "functionality", "of", "specifying", "symbolic", "globaltags", "(", "i", ".", "e", "."...
def GlobalTag(essource = None, globaltag = None, conditions = None): """Modify the GlobalTag module configuration, allowing to use the extended Configuration/AlCa/python/autoCond.py functionality of specifying symbolic globaltags (i.e., actual global tags, plus additional payloads to get from the DB as ...
[ "def", "GlobalTag", "(", "essource", "=", "None", ",", "globaltag", "=", "None", ",", "conditions", "=", "None", ")", ":", "# custom conditions: ", "# - start from an empty map", "# - add any conditions coming from autoCond.py", "# - then add and override them with any condi...
https://github.com/cms-sw/cmssw/blob/fd9de012d503d3405420bcbeec0ec879baa57cf2/Configuration/AlCa/python/GlobalTag.py#L45-L145
commaai/openpilot
4416c21b1e738ab7d04147c5ae52b5135e0cdb40
pyextra/acados_template/acados_ocp.py
python
AcadosOcpConstraints.usbx
(self)
return self.__usbx
Lower bounds on slacks corresponding to soft upper bounds on x at stages (1 to N-1); not required - zeros by default
Lower bounds on slacks corresponding to soft upper bounds on x at stages (1 to N-1); not required - zeros by default
[ "Lower", "bounds", "on", "slacks", "corresponding", "to", "soft", "upper", "bounds", "on", "x", "at", "stages", "(", "1", "to", "N", "-", "1", ")", ";", "not", "required", "-", "zeros", "by", "default" ]
def usbx(self): """Lower bounds on slacks corresponding to soft upper bounds on x at stages (1 to N-1); not required - zeros by default""" return self.__usbx
[ "def", "usbx", "(", "self", ")", ":", "return", "self", ".", "__usbx" ]
https://github.com/commaai/openpilot/blob/4416c21b1e738ab7d04147c5ae52b5135e0cdb40/pyextra/acados_template/acados_ocp.py#L1319-L1323
rdiankov/openrave
d1a23023fd4b58f077d2ca949ceaf1b91f3f13d7
python/ikfast.py
python
IKFastSolver.solveSingleVariableLinearly
(self,raweqns,solvevar,othervars,maxnumeqs=2,douniquecheck=True)
return neweqs2
tries to linearly solve for one variable treating everything else as constant. need at least 3 equations
tries to linearly solve for one variable treating everything else as constant.
[ "tries", "to", "linearly", "solve", "for", "one", "variable", "treating", "everything", "else", "as", "constant", "." ]
def solveSingleVariableLinearly(self,raweqns,solvevar,othervars,maxnumeqs=2,douniquecheck=True): """tries to linearly solve for one variable treating everything else as constant. need at least 3 equations """ cvar = Symbol('c%s'%solvevar.name) svar = Symbol('s%s'%solvevar.name) ...
[ "def", "solveSingleVariableLinearly", "(", "self", ",", "raweqns", ",", "solvevar", ",", "othervars", ",", "maxnumeqs", "=", "2", ",", "douniquecheck", "=", "True", ")", ":", "cvar", "=", "Symbol", "(", "'c%s'", "%", "solvevar", ".", "name", ")", "svar", ...
https://github.com/rdiankov/openrave/blob/d1a23023fd4b58f077d2ca949ceaf1b91f3f13d7/python/ikfast.py#L8108-L8157
ceph/ceph
959663007321a369c83218414a29bd9dbc8bda3a
qa/tasks/cephfs/filesystem.py
python
Filesystem.erase_mds_objects
(self, rank)
Erase all the per-MDS objects for a particular rank. This includes inotable, sessiontable, journal
Erase all the per-MDS objects for a particular rank. This includes inotable, sessiontable, journal
[ "Erase", "all", "the", "per", "-", "MDS", "objects", "for", "a", "particular", "rank", ".", "This", "includes", "inotable", "sessiontable", "journal" ]
def erase_mds_objects(self, rank): """ Erase all the per-MDS objects for a particular rank. This includes inotable, sessiontable, journal """ def obj_prefix(multiplier): """ MDS object naming conventions like rank 1's journal is at 201.*** ...
[ "def", "erase_mds_objects", "(", "self", ",", "rank", ")", ":", "def", "obj_prefix", "(", "multiplier", ")", ":", "\"\"\"\n MDS object naming conventions like rank 1's\n journal is at 201.***\n \"\"\"", "return", "\"%x.\"", "%", "(", "multiplier...
https://github.com/ceph/ceph/blob/959663007321a369c83218414a29bd9dbc8bda3a/qa/tasks/cephfs/filesystem.py#L1437-L1457
mindspore-ai/mindspore
fb8fd3338605bb34fa5cea054e535a8b1d753fab
mindspore/python/mindspore/ops/_grad/grad_debug_ops.py
python
get_bprop_histogram_summary
(self)
return bprop
Generate bprop for HistogramSummary
Generate bprop for HistogramSummary
[ "Generate", "bprop", "for", "HistogramSummary" ]
def get_bprop_histogram_summary(self): """Generate bprop for HistogramSummary""" def bprop(tag, x, out, dout): return tag, zeros_like(x) return bprop
[ "def", "get_bprop_histogram_summary", "(", "self", ")", ":", "def", "bprop", "(", "tag", ",", "x", ",", "out", ",", "dout", ")", ":", "return", "tag", ",", "zeros_like", "(", "x", ")", "return", "bprop" ]
https://github.com/mindspore-ai/mindspore/blob/fb8fd3338605bb34fa5cea054e535a8b1d753fab/mindspore/python/mindspore/ops/_grad/grad_debug_ops.py#L53-L58
thalium/icebox
99d147d5b9269222225443ce171b4fd46d8985d4
third_party/virtualbox/src/VBox/ValidationKit/common/utils.py
python
unpackZipFile
(sArchive, sDstDir, fnLog, fnError = None, fnFilter = None)
return asMembers
Worker for unpackFile that deals with ZIP files, same function signature.
Worker for unpackFile that deals with ZIP files, same function signature.
[ "Worker", "for", "unpackFile", "that", "deals", "with", "ZIP", "files", "same", "function", "signature", "." ]
def unpackZipFile(sArchive, sDstDir, fnLog, fnError = None, fnFilter = None): # type: (string, string, (string) -> None, (string) -> None, (string) -> bool) -> list[string] """ Worker for unpackFile that deals with ZIP files, same function signature. """ import zipfile if fnError is None: ...
[ "def", "unpackZipFile", "(", "sArchive", ",", "sDstDir", ",", "fnLog", ",", "fnError", "=", "None", ",", "fnFilter", "=", "None", ")", ":", "# type: (string, string, (string) -> None, (string) -> None, (string) -> bool) -> list[string]", "import", "zipfile", "if", "fnErro...
https://github.com/thalium/icebox/blob/99d147d5b9269222225443ce171b4fd46d8985d4/third_party/virtualbox/src/VBox/ValidationKit/common/utils.py#L1785-L1822
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/ipython/py2/IPython/lib/deepreload.py
python
load_next
(mod, altmod, name, buf)
return result, next, buf
mod, name, buf = load_next(mod, altmod, name, buf) altmod is either None or same as mod
mod, name, buf = load_next(mod, altmod, name, buf)
[ "mod", "name", "buf", "=", "load_next", "(", "mod", "altmod", "name", "buf", ")" ]
def load_next(mod, altmod, name, buf): """ mod, name, buf = load_next(mod, altmod, name, buf) altmod is either None or same as mod """ if len(name) == 0: # completely empty module name should only happen in # 'from . import' (or '__import__("")') return mod, None, buf ...
[ "def", "load_next", "(", "mod", ",", "altmod", ",", "name", ",", "buf", ")", ":", "if", "len", "(", "name", ")", "==", "0", ":", "# completely empty module name should only happen in", "# 'from . import' (or '__import__(\"\")')", "return", "mod", ",", "None", ",",...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/ipython/py2/IPython/lib/deepreload.py#L129-L165
intel-iot-devkit/how-to-code-samples
b4ea616f36bbfa2e042beb1698f968cfd651d79f
earthquake-detector/python/iot_earthquake_detector/hardware/board.py
python
Board.remove_event_handler
(self, event, handler)
Remove hardware event handler.
Remove hardware event handler.
[ "Remove", "hardware", "event", "handler", "." ]
def remove_event_handler(self, event, handler): """ Remove hardware event handler. """ self.emitter.remove(event, handler)
[ "def", "remove_event_handler", "(", "self", ",", "event", ",", "handler", ")", ":", "self", ".", "emitter", ".", "remove", "(", "event", ",", "handler", ")" ]
https://github.com/intel-iot-devkit/how-to-code-samples/blob/b4ea616f36bbfa2e042beb1698f968cfd651d79f/earthquake-detector/python/iot_earthquake_detector/hardware/board.py#L86-L92
weichengkuo/DeepBox
c4f8c065b6a51cf296540cc453a44f0519aaacc9
caffe-fast-rcnn/scripts/cpp_lint.py
python
FilesBelongToSameModule
(filename_cc, filename_h)
return files_belong_to_same_module, common_path
Check if these two filenames belong to the same module. The concept of a 'module' here is a as follows: foo.h, foo-inl.h, foo.cc, foo_test.cc and foo_unittest.cc belong to the same 'module' if they are in the same directory. some/path/public/xyzzy and some/path/internal/xyzzy are also considered to belong to...
Check if these two filenames belong to the same module.
[ "Check", "if", "these", "two", "filenames", "belong", "to", "the", "same", "module", "." ]
def FilesBelongToSameModule(filename_cc, filename_h): """Check if these two filenames belong to the same module. The concept of a 'module' here is a as follows: foo.h, foo-inl.h, foo.cc, foo_test.cc and foo_unittest.cc belong to the same 'module' if they are in the same directory. some/path/public/xyzzy and ...
[ "def", "FilesBelongToSameModule", "(", "filename_cc", ",", "filename_h", ")", ":", "if", "not", "filename_cc", ".", "endswith", "(", "'.cc'", ")", ":", "return", "(", "False", ",", "''", ")", "filename_cc", "=", "filename_cc", "[", ":", "-", "len", "(", ...
https://github.com/weichengkuo/DeepBox/blob/c4f8c065b6a51cf296540cc453a44f0519aaacc9/caffe-fast-rcnn/scripts/cpp_lint.py#L4399-L4451
metashell/metashell
f4177e4854ea00c8dbc722cadab26ef413d798ea
3rd/templight/compiler-rt/lib/sanitizer_common/scripts/cpplint.py
python
_CppLintState.SetQuiet
(self, quiet)
return last_quiet
Sets the module's quiet settings, and returns the previous setting.
Sets the module's quiet settings, and returns the previous setting.
[ "Sets", "the", "module", "s", "quiet", "settings", "and", "returns", "the", "previous", "setting", "." ]
def SetQuiet(self, quiet): """Sets the module's quiet settings, and returns the previous setting.""" last_quiet = self.quiet self.quiet = quiet return last_quiet
[ "def", "SetQuiet", "(", "self", ",", "quiet", ")", ":", "last_quiet", "=", "self", ".", "quiet", "self", ".", "quiet", "=", "quiet", "return", "last_quiet" ]
https://github.com/metashell/metashell/blob/f4177e4854ea00c8dbc722cadab26ef413d798ea/3rd/templight/compiler-rt/lib/sanitizer_common/scripts/cpplint.py#L885-L889
ValveSoftware/source-sdk-2013
0d8dceea4310fde5706b3ce1c70609d72a38efdf
mp/src/thirdparty/protobuf-2.3.0/python/google/protobuf/internal/containers.py
python
RepeatedScalarFieldContainer.__delslice__
(self, start, stop)
Deletes the subset of items from between the specified indices.
Deletes the subset of items from between the specified indices.
[ "Deletes", "the", "subset", "of", "items", "from", "between", "the", "specified", "indices", "." ]
def __delslice__(self, start, stop): """Deletes the subset of items from between the specified indices.""" del self._values[start:stop] self._message_listener.Modified()
[ "def", "__delslice__", "(", "self", ",", "start", ",", "stop", ")", ":", "del", "self", ".", "_values", "[", "start", ":", "stop", "]", "self", ".", "_message_listener", ".", "Modified", "(", ")" ]
https://github.com/ValveSoftware/source-sdk-2013/blob/0d8dceea4310fde5706b3ce1c70609d72a38efdf/mp/src/thirdparty/protobuf-2.3.0/python/google/protobuf/internal/containers.py#L160-L163
ChromiumWebApps/chromium
c7361d39be8abd1574e6ce8957c8dbddd4c6ccf7
tools/bisect_utils.py
python
CreateBisectDirectoryAndSetupDepot
(opts, custom_deps)
Sets up a subdirectory 'bisect' and then retrieves a copy of the depot there using gclient. Args: opts: The options parsed from the command line through parse_args(). custom_deps: A dictionary of additional dependencies to add to .gclient.
Sets up a subdirectory 'bisect' and then retrieves a copy of the depot there using gclient.
[ "Sets", "up", "a", "subdirectory", "bisect", "and", "then", "retrieves", "a", "copy", "of", "the", "depot", "there", "using", "gclient", "." ]
def CreateBisectDirectoryAndSetupDepot(opts, custom_deps): """Sets up a subdirectory 'bisect' and then retrieves a copy of the depot there using gclient. Args: opts: The options parsed from the command line through parse_args(). custom_deps: A dictionary of additional dependencies to add to .gclient. "...
[ "def", "CreateBisectDirectoryAndSetupDepot", "(", "opts", ",", "custom_deps", ")", ":", "if", "not", "CreateAndChangeToSourceDirectory", "(", "opts", ".", "working_directory", ")", ":", "raise", "RuntimeError", "(", "'Could not create bisect directory.'", ")", "if", "no...
https://github.com/ChromiumWebApps/chromium/blob/c7361d39be8abd1574e6ce8957c8dbddd4c6ccf7/tools/bisect_utils.py#L491-L503
tkn-tub/ns3-gym
19bfe0a583e641142609939a090a09dfc63a095f
utils/check-style.py
python
PatchChunkLine.is_src
(self)
return self.__type == self.SRC or self.__type == self.BOTH
! Is source @param self The current class @return true if type is source
! Is source
[ "!", "Is", "source" ]
def is_src(self): """! Is source @param self The current class @return true if type is source """ return self.__type == self.SRC or self.__type == self.BOTH
[ "def", "is_src", "(", "self", ")", ":", "return", "self", ".", "__type", "==", "self", ".", "SRC", "or", "self", ".", "__type", "==", "self", ".", "BOTH" ]
https://github.com/tkn-tub/ns3-gym/blob/19bfe0a583e641142609939a090a09dfc63a095f/utils/check-style.py#L192-L197
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/numba/roc/stubs.py
python
get_global_size
(*args, **kargs)
OpenCL get_global_size()
OpenCL get_global_size()
[ "OpenCL", "get_global_size", "()" ]
def get_global_size(*args, **kargs): """ OpenCL get_global_size() """ raise _stub_error
[ "def", "get_global_size", "(", "*", "args", ",", "*", "*", "kargs", ")", ":", "raise", "_stub_error" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/numba/roc/stubs.py#L22-L26
ApolloAuto/apollo-platform
86d9dc6743b496ead18d597748ebabd34a513289
ros/ros/rosmake/src/rosmake/engine.py
python
RosMakeAll.main
(self)
return build_passed and tests_passed
main command-line entrypoint
main command-line entrypoint
[ "main", "command", "-", "line", "entrypoint" ]
def main(self): """ main command-line entrypoint """ parser = OptionParser(usage="usage: %prog [options] [PACKAGE]...", description="rosmake recursively builds all dependencies before building a package", prog='rosmake') parser.add_option("--test-onl...
[ "def", "main", "(", "self", ")", ":", "parser", "=", "OptionParser", "(", "usage", "=", "\"usage: %prog [options] [PACKAGE]...\"", ",", "description", "=", "\"rosmake recursively builds all dependencies before building a package\"", ",", "prog", "=", "'rosmake'", ")", "pa...
https://github.com/ApolloAuto/apollo-platform/blob/86d9dc6743b496ead18d597748ebabd34a513289/ros/ros/rosmake/src/rosmake/engine.py#L597-L843
plaidml/plaidml
f3c6681db21460e5fdc11ae651d6d7b6c27f8262
plaidml/edsl/__init__.py
python
TensorIndex.__rsub__
(self, lhs)
return TensorIndex(_poly_op(lib.PLAIDML_INT_OP_SUB, lhs, self))
Performs a subtraction between a TensorIndex and another operand in a polynomial expression. Example: >>> i, j = TensorIndexes(2) >>> A = Placeholder(DType.FLOAT32, [3, 3]) >>> R = Contraction().sum(A[5 - i, j]).build()
Performs a subtraction between a TensorIndex and another operand in a polynomial expression.
[ "Performs", "a", "subtraction", "between", "a", "TensorIndex", "and", "another", "operand", "in", "a", "polynomial", "expression", "." ]
def __rsub__(self, lhs): """Performs a subtraction between a TensorIndex and another operand in a polynomial expression. Example: >>> i, j = TensorIndexes(2) >>> A = Placeholder(DType.FLOAT32, [3, 3]) >>> R = Contraction().sum(A[5 - i, j]).build() """...
[ "def", "__rsub__", "(", "self", ",", "lhs", ")", ":", "return", "TensorIndex", "(", "_poly_op", "(", "lib", ".", "PLAIDML_INT_OP_SUB", ",", "lhs", ",", "self", ")", ")" ]
https://github.com/plaidml/plaidml/blob/f3c6681db21460e5fdc11ae651d6d7b6c27f8262/plaidml/edsl/__init__.py#L235-L244
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Gems/CloudGemFramework/v1/AWS/resource-manager-code/lib/setuptools/msvc.py
python
PlatformInfo.target_dir
(self, hidex86=False, x64=False)
return ( '' if (self.target_cpu == 'x86' and hidex86) else r'\x64' if (self.target_cpu == 'amd64' and x64) else r'\%s' % self.target_cpu )
r""" Target platform specific subfolder. Parameters ---------- hidex86: bool return '' and not '\x86' if architecture is x86. x64: bool return '\x64' and not '\amd64' if architecture is amd64. Return ------ str subfold...
r""" Target platform specific subfolder.
[ "r", "Target", "platform", "specific", "subfolder", "." ]
def target_dir(self, hidex86=False, x64=False): r""" Target platform specific subfolder. Parameters ---------- hidex86: bool return '' and not '\x86' if architecture is x86. x64: bool return '\x64' and not '\amd64' if architecture is amd64. ...
[ "def", "target_dir", "(", "self", ",", "hidex86", "=", "False", ",", "x64", "=", "False", ")", ":", "return", "(", "''", "if", "(", "self", ".", "target_cpu", "==", "'x86'", "and", "hidex86", ")", "else", "r'\\x64'", "if", "(", "self", ".", "target_c...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Gems/CloudGemFramework/v1/AWS/resource-manager-code/lib/setuptools/msvc.py#L439-L459
MegEngine/MegEngine
ce9ad07a27ec909fb8db4dd67943d24ba98fb93a
imperative/python/megengine/functional/math.py
python
sum
( inp: Tensor, axis: Optional[Union[int, Sequence[int]]] = None, keepdims: bool = False, )
return inp.sum(axis=axis, keepdims=keepdims)
r"""Returns the sum of input tensor along given axis. If axis is a list of dimensions, reduce over all of them. Args: inp: input tensor. axis: dimension to reduce. If None, all dimensions will be reduced. Default: None keepdims: whether the output tensor has axis retained or...
r"""Returns the sum of input tensor along given axis. If axis is a list of dimensions, reduce over all of them.
[ "r", "Returns", "the", "sum", "of", "input", "tensor", "along", "given", "axis", ".", "If", "axis", "is", "a", "list", "of", "dimensions", "reduce", "over", "all", "of", "them", "." ]
def sum( inp: Tensor, axis: Optional[Union[int, Sequence[int]]] = None, keepdims: bool = False, ) -> Tensor: r"""Returns the sum of input tensor along given axis. If axis is a list of dimensions, reduce over all of them. Args: inp: input tensor. axis: dimension to reduce. If Non...
[ "def", "sum", "(", "inp", ":", "Tensor", ",", "axis", ":", "Optional", "[", "Union", "[", "int", ",", "Sequence", "[", "int", "]", "]", "]", "=", "None", ",", "keepdims", ":", "bool", "=", "False", ",", ")", "->", "Tensor", ":", "return", "inp", ...
https://github.com/MegEngine/MegEngine/blob/ce9ad07a27ec909fb8db4dd67943d24ba98fb93a/imperative/python/megengine/functional/math.py#L139-L175
benoitsteiner/tensorflow-opencl
cb7cb40a57fde5cfd4731bc551e82a1e2fef43a5
tensorflow/python/data/ops/dataset_ops.py
python
Dataset.from_tensor_slices
(tensors)
return TensorSliceDataset(tensors)
Creates a `Dataset` whose elements are slices of the given tensors. Args: tensors: A nested structure of tensors, each having the same size in the 0th dimension. Returns: A `Dataset`.
Creates a `Dataset` whose elements are slices of the given tensors.
[ "Creates", "a", "Dataset", "whose", "elements", "are", "slices", "of", "the", "given", "tensors", "." ]
def from_tensor_slices(tensors): """Creates a `Dataset` whose elements are slices of the given tensors. Args: tensors: A nested structure of tensors, each having the same size in the 0th dimension. Returns: A `Dataset`. """ return TensorSliceDataset(tensors)
[ "def", "from_tensor_slices", "(", "tensors", ")", ":", "return", "TensorSliceDataset", "(", "tensors", ")" ]
https://github.com/benoitsteiner/tensorflow-opencl/blob/cb7cb40a57fde5cfd4731bc551e82a1e2fef43a5/tensorflow/python/data/ops/dataset_ops.py#L162-L172
Kitware/ParaView
f760af9124ff4634b23ebbeab95a4f56e0261955
Plugins/pvblot/blotish.py
python
_find_variable_or_raise_exception
(reader, name)
return var
Returns a valid blot_common.Variable instance or raises a BlotishError.
Returns a valid blot_common.Variable instance or raises a BlotishError.
[ "Returns", "a", "valid", "blot_common", ".", "Variable", "instance", "or", "raises", "a", "BlotishError", "." ]
def _find_variable_or_raise_exception(reader, name): """Returns a valid blot_common.Variable instance or raises a BlotishError.""" var = blot_common.find_variable(reader, name) if not var: raise BlotishError("'%s' is an invalid variable name" % name) return var
[ "def", "_find_variable_or_raise_exception", "(", "reader", ",", "name", ")", ":", "var", "=", "blot_common", ".", "find_variable", "(", "reader", ",", "name", ")", "if", "not", "var", ":", "raise", "BlotishError", "(", "\"'%s' is an invalid variable name\"", "%", ...
https://github.com/Kitware/ParaView/blob/f760af9124ff4634b23ebbeab95a4f56e0261955/Plugins/pvblot/blotish.py#L343-L348
Yelp/MOE
5b5a6a2c6c3cf47320126f7f5894e2a83e347f5c
moe/optimal_learning/python/cpp_wrappers/optimization.py
python
GradientDescentOptimizer.__init__
(self, domain, optimizable, optimizer_parameters, num_random_samples=None)
Construct a GradientDescentOptimizer. :param domain: the domain that this optimizer operates over :type domain: interfaces.domain_interface.DomainInterface subclass from cpp_wrappers :param optimizable: object representing the objective function being optimized :type optimizable: interf...
Construct a GradientDescentOptimizer.
[ "Construct", "a", "GradientDescentOptimizer", "." ]
def __init__(self, domain, optimizable, optimizer_parameters, num_random_samples=None): """Construct a GradientDescentOptimizer. :param domain: the domain that this optimizer operates over :type domain: interfaces.domain_interface.DomainInterface subclass from cpp_wrappers :param optimi...
[ "def", "__init__", "(", "self", ",", "domain", ",", "optimizable", ",", "optimizer_parameters", ",", "num_random_samples", "=", "None", ")", ":", "self", ".", "domain", "=", "domain", "self", ".", "objective_function", "=", "optimizable", "self", ".", "optimiz...
https://github.com/Yelp/MOE/blob/5b5a6a2c6c3cf47320126f7f5894e2a83e347f5c/moe/optimal_learning/python/cpp_wrappers/optimization.py#L412-L434
mindspore-ai/mindspore
fb8fd3338605bb34fa5cea054e535a8b1d753fab
mindspore/python/mindspore/mindrecord/shardwriter.py
python
ShardWriter.is_open
(self)
return self._is_open
getter function
getter function
[ "getter", "function" ]
def is_open(self): """getter function""" return self._is_open
[ "def", "is_open", "(", "self", ")", ":", "return", "self", ".", "_is_open" ]
https://github.com/mindspore-ai/mindspore/blob/fb8fd3338605bb34fa5cea054e535a8b1d753fab/mindspore/python/mindspore/mindrecord/shardwriter.py#L228-L230
google/llvm-propeller
45c226984fe8377ebfb2ad7713c680d652ba678d
clang/tools/scan-build-py/libscanbuild/__init__.py
python
run_command
(command, cwd=None)
Run a given command and report the execution. :param command: array of tokens :param cwd: the working directory where the command will be executed :return: output of the command
Run a given command and report the execution.
[ "Run", "a", "given", "command", "and", "report", "the", "execution", "." ]
def run_command(command, cwd=None): """ Run a given command and report the execution. :param command: array of tokens :param cwd: the working directory where the command will be executed :return: output of the command """ def decode_when_needed(result): """ check_output returns bytes or...
[ "def", "run_command", "(", "command", ",", "cwd", "=", "None", ")", ":", "def", "decode_when_needed", "(", "result", ")", ":", "\"\"\" check_output returns bytes or string depend on python version \"\"\"", "return", "result", ".", "decode", "(", "'utf-8'", ")", "if", ...
https://github.com/google/llvm-propeller/blob/45c226984fe8377ebfb2ad7713c680d652ba678d/clang/tools/scan-build-py/libscanbuild/__init__.py#L59-L79
trailofbits/llvm-sanitizer-tutorial
d29dfeec7f51fbf234fd0080f28f2b30cd0b6e99
llvm/projects/compiler-rt/lib/sanitizer_common/scripts/cpplint.py
python
CheckMakePairUsesDeduction
(filename, clean_lines, linenum, error)
Check that make_pair's template arguments are deduced. G++ 4.6 in C++0x mode fails badly if make_pair's template arguments are specified explicitly, and such use isn't intended in any case. Args: filename: The name of the current file. clean_lines: A CleansedLines instance containing the file. linen...
Check that make_pair's template arguments are deduced.
[ "Check", "that", "make_pair", "s", "template", "arguments", "are", "deduced", "." ]
def CheckMakePairUsesDeduction(filename, clean_lines, linenum, error): """Check that make_pair's template arguments are deduced. G++ 4.6 in C++0x mode fails badly if make_pair's template arguments are specified explicitly, and such use isn't intended in any case. Args: filename: The name of the current fi...
[ "def", "CheckMakePairUsesDeduction", "(", "filename", ",", "clean_lines", ",", "linenum", ",", "error", ")", ":", "raw", "=", "clean_lines", ".", "raw_lines", "line", "=", "raw", "[", "linenum", "]", "match", "=", "_RE_PATTERN_EXPLICIT_MAKEPAIR", ".", "search", ...
https://github.com/trailofbits/llvm-sanitizer-tutorial/blob/d29dfeec7f51fbf234fd0080f28f2b30cd0b6e99/llvm/projects/compiler-rt/lib/sanitizer_common/scripts/cpplint.py#L3753-L3772
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/msw/_core.py
python
Window.FindWindowByLabel
(*args, **kwargs)
return _core_.Window_FindWindowByLabel(*args, **kwargs)
FindWindowByLabel(self, String label) -> Window Find a child of this window by label
FindWindowByLabel(self, String label) -> Window
[ "FindWindowByLabel", "(", "self", "String", "label", ")", "-", ">", "Window" ]
def FindWindowByLabel(*args, **kwargs): """ FindWindowByLabel(self, String label) -> Window Find a child of this window by label """ return _core_.Window_FindWindowByLabel(*args, **kwargs)
[ "def", "FindWindowByLabel", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_core_", ".", "Window_FindWindowByLabel", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/msw/_core.py#L10347-L10353
blackberry/Boost
fc90c3fde129c62565c023f091eddc4a7ed9902b
tools/build/v2/build/generators.py
python
viable_source_types
(target_type)
return __viable_source_types_cache [target_type]
Helper rule, caches the result of '__viable_source_types_real'.
Helper rule, caches the result of '__viable_source_types_real'.
[ "Helper", "rule", "caches", "the", "result", "of", "__viable_source_types_real", "." ]
def viable_source_types (target_type): """ Helper rule, caches the result of '__viable_source_types_real'. """ if not __viable_source_types_cache.has_key(target_type): __vst_cached_types.append(target_type) __viable_source_types_cache [target_type] = __viable_source_types_real (target_type) ...
[ "def", "viable_source_types", "(", "target_type", ")", ":", "if", "not", "__viable_source_types_cache", ".", "has_key", "(", "target_type", ")", ":", "__vst_cached_types", ".", "append", "(", "target_type", ")", "__viable_source_types_cache", "[", "target_type", "]", ...
https://github.com/blackberry/Boost/blob/fc90c3fde129c62565c023f091eddc4a7ed9902b/tools/build/v2/build/generators.py#L757-L763
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/osx_carbon/stc.py
python
StyledTextCtrl.StyleGetFaceName
(*args, **kwargs)
return _stc.StyledTextCtrl_StyleGetFaceName(*args, **kwargs)
StyleGetFaceName(self, int style) -> String Get the font facename of a style
StyleGetFaceName(self, int style) -> String
[ "StyleGetFaceName", "(", "self", "int", "style", ")", "-", ">", "String" ]
def StyleGetFaceName(*args, **kwargs): """ StyleGetFaceName(self, int style) -> String Get the font facename of a style """ return _stc.StyledTextCtrl_StyleGetFaceName(*args, **kwargs)
[ "def", "StyleGetFaceName", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_stc", ".", "StyledTextCtrl_StyleGetFaceName", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_carbon/stc.py#L2626-L2632
BlzFans/wke
b0fa21158312e40c5fbd84682d643022b6c34a93
cygwin/lib/python2.6/xml/sax/handler.py
python
EntityResolver.resolveEntity
(self, publicId, systemId)
return systemId
Resolve the system identifier of an entity and return either the system identifier to read from as a string, or an InputSource to read from.
Resolve the system identifier of an entity and return either the system identifier to read from as a string, or an InputSource to read from.
[ "Resolve", "the", "system", "identifier", "of", "an", "entity", "and", "return", "either", "the", "system", "identifier", "to", "read", "from", "as", "a", "string", "or", "an", "InputSource", "to", "read", "from", "." ]
def resolveEntity(self, publicId, systemId): """Resolve the system identifier of an entity and return either the system identifier to read from as a string, or an InputSource to read from.""" return systemId
[ "def", "resolveEntity", "(", "self", ",", "publicId", ",", "systemId", ")", ":", "return", "systemId" ]
https://github.com/BlzFans/wke/blob/b0fa21158312e40c5fbd84682d643022b6c34a93/cygwin/lib/python2.6/xml/sax/handler.py#L230-L234
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/osx_cocoa/_core.py
python
Window.GetCursor
(*args, **kwargs)
return _core_.Window_GetCursor(*args, **kwargs)
GetCursor(self) -> Cursor Return the cursor associated with this window.
GetCursor(self) -> Cursor
[ "GetCursor", "(", "self", ")", "-", ">", "Cursor" ]
def GetCursor(*args, **kwargs): """ GetCursor(self) -> Cursor Return the cursor associated with this window. """ return _core_.Window_GetCursor(*args, **kwargs)
[ "def", "GetCursor", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_core_", ".", "Window_GetCursor", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_cocoa/_core.py#L10970-L10976
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
wx/lib/agw/foldpanelbar.py
python
FoldWindowItem.GetSpacing
(self)
return self._spacing
Returns the spacing of :class:`FoldWindowItem`.
Returns the spacing of :class:`FoldWindowItem`.
[ "Returns", "the", "spacing", "of", ":", "class", ":", "FoldWindowItem", "." ]
def GetSpacing(self): """ Returns the spacing of :class:`FoldWindowItem`. """ return self._spacing
[ "def", "GetSpacing", "(", "self", ")", ":", "return", "self", ".", "_spacing" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/wx/lib/agw/foldpanelbar.py#L2193-L2196
Polidea/SiriusObfuscator
b0e590d8130e97856afe578869b83a209e2b19be
SymbolExtractorAndRenamer/lldb/scripts/Python/static-binding/lldb.py
python
SBThread.RunToAddress
(self, *args)
return _lldb.SBThread_RunToAddress(self, *args)
RunToAddress(self, addr_t addr)
RunToAddress(self, addr_t addr)
[ "RunToAddress", "(", "self", "addr_t", "addr", ")" ]
def RunToAddress(self, *args): """RunToAddress(self, addr_t addr)""" return _lldb.SBThread_RunToAddress(self, *args)
[ "def", "RunToAddress", "(", "self", ",", "*", "args", ")", ":", "return", "_lldb", ".", "SBThread_RunToAddress", "(", "self", ",", "*", "args", ")" ]
https://github.com/Polidea/SiriusObfuscator/blob/b0e590d8130e97856afe578869b83a209e2b19be/SymbolExtractorAndRenamer/lldb/scripts/Python/static-binding/lldb.py#L9761-L9763
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/importlib/_bootstrap.py
python
_get_module_lock
(name)
return lock
Get or create the module lock for a given module name. Acquire/release internally the global import lock to protect _module_locks.
Get or create the module lock for a given module name.
[ "Get", "or", "create", "the", "module", "lock", "for", "a", "given", "module", "name", "." ]
def _get_module_lock(name): """Get or create the module lock for a given module name. Acquire/release internally the global import lock to protect _module_locks.""" _imp.acquire_lock() try: try: lock = _module_locks[name]() except KeyError: lock = None ...
[ "def", "_get_module_lock", "(", "name", ")", ":", "_imp", ".", "acquire_lock", "(", ")", "try", ":", "try", ":", "lock", "=", "_module_locks", "[", "name", "]", "(", ")", "except", "KeyError", ":", "lock", "=", "None", "if", "lock", "is", "None", ":"...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/importlib/_bootstrap.py#L157-L191
MythTV/mythtv
d282a209cb8be85d036f85a62a8ec971b67d45f4
mythtv/programs/scripts/internetcontent/nv_python_libs/vimeo/vimeo_api.py
python
SimpleOAuthClient.get_authorize_token_url
(self)
return oauth_request.to_url()
Returns a URL used to verify and authorize the application to access user's account. The pointed page should contain a simple 'password' that acts as the 'verifier' in oauth.
Returns a URL used to verify and authorize the application to access user's account. The pointed page should contain a simple 'password' that acts as the 'verifier' in oauth.
[ "Returns", "a", "URL", "used", "to", "verify", "and", "authorize", "the", "application", "to", "access", "user", "s", "account", ".", "The", "pointed", "page", "should", "contain", "a", "simple", "password", "that", "acts", "as", "the", "verifier", "in", "...
def get_authorize_token_url(self): """ Returns a URL used to verify and authorize the application to access user's account. The pointed page should contain a simple 'password' that acts as the 'verifier' in oauth. """ oauth_request = oauth.OAuthRequest.from_token_and_cal...
[ "def", "get_authorize_token_url", "(", "self", ")", ":", "oauth_request", "=", "oauth", ".", "OAuthRequest", ".", "from_token_and_callback", "(", "token", "=", "self", ".", "token", ",", "http_url", "=", "self", ".", "authorization_url", ")", "return", "oauth_re...
https://github.com/MythTV/mythtv/blob/d282a209cb8be85d036f85a62a8ec971b67d45f4/mythtv/programs/scripts/internetcontent/nv_python_libs/vimeo/vimeo_api.py#L252-L261
ApolloAuto/apollo-platform
86d9dc6743b496ead18d597748ebabd34a513289
ros/ros_comm/rosgraph/src/rosgraph/xmlrpc.py
python
XmlRpcNode.start
(self)
Initiate a thread to run the XML RPC server. Uses thread.start_new_thread.
Initiate a thread to run the XML RPC server. Uses thread.start_new_thread.
[ "Initiate", "a", "thread", "to", "run", "the", "XML", "RPC", "server", ".", "Uses", "thread", ".", "start_new_thread", "." ]
def start(self): """ Initiate a thread to run the XML RPC server. Uses thread.start_new_thread. """ _thread.start_new_thread(self.run, ())
[ "def", "start", "(", "self", ")", ":", "_thread", ".", "start_new_thread", "(", "self", ".", "run", ",", "(", ")", ")" ]
https://github.com/ApolloAuto/apollo-platform/blob/86d9dc6743b496ead18d597748ebabd34a513289/ros/ros_comm/rosgraph/src/rosgraph/xmlrpc.py#L198-L202
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
wx/tools/Editra/src/eclib/segmentbk.py
python
SegmentBook.SetUsePyImageList
(self, use_pylist)
Set whether the control us using a regular python list for storing images or a wxImageList. @param use_pylist: bool
Set whether the control us using a regular python list for storing images or a wxImageList. @param use_pylist: bool
[ "Set", "whether", "the", "control", "us", "using", "a", "regular", "python", "list", "for", "storing", "images", "or", "a", "wxImageList", ".", "@param", "use_pylist", ":", "bool" ]
def SetUsePyImageList(self, use_pylist): """Set whether the control us using a regular python list for storing images or a wxImageList. @param use_pylist: bool """ self._use_pylist = use_pylist
[ "def", "SetUsePyImageList", "(", "self", ",", "use_pylist", ")", ":", "self", ".", "_use_pylist", "=", "use_pylist" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/wx/tools/Editra/src/eclib/segmentbk.py#L432-L438
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/numba/dispatcher.py
python
_DispatcherBase.get_overload
(self, sig)
return self.overloads[tuple(args)].entry_point
Return the compiled function for the given signature.
Return the compiled function for the given signature.
[ "Return", "the", "compiled", "function", "for", "the", "given", "signature", "." ]
def get_overload(self, sig): """ Return the compiled function for the given signature. """ args, return_type = sigutils.normalize_signature(sig) return self.overloads[tuple(args)].entry_point
[ "def", "get_overload", "(", "self", ",", "sig", ")", ":", "args", ",", "return_type", "=", "sigutils", ".", "normalize_signature", "(", "sig", ")", "return", "self", ".", "overloads", "[", "tuple", "(", "args", ")", "]", ".", "entry_point" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/numba/dispatcher.py#L312-L317
BlzFans/wke
b0fa21158312e40c5fbd84682d643022b6c34a93
cygwin/lib/python2.6/multiprocessing/__init__.py
python
Value
(typecode_or_type, *args, **kwds)
return Value(typecode_or_type, *args, **kwds)
Returns a synchronized shared object
Returns a synchronized shared object
[ "Returns", "a", "synchronized", "shared", "object" ]
def Value(typecode_or_type, *args, **kwds): ''' Returns a synchronized shared object ''' from multiprocessing.sharedctypes import Value return Value(typecode_or_type, *args, **kwds)
[ "def", "Value", "(", "typecode_or_type", ",", "*", "args", ",", "*", "*", "kwds", ")", ":", "from", "multiprocessing", ".", "sharedctypes", "import", "Value", "return", "Value", "(", "typecode_or_type", ",", "*", "args", ",", "*", "*", "kwds", ")" ]
https://github.com/BlzFans/wke/blob/b0fa21158312e40c5fbd84682d643022b6c34a93/cygwin/lib/python2.6/multiprocessing/__init__.py#L243-L248
francinexue/xuefu
b6ff79747a42e020588c0c0a921048e08fe4680c
cnx/tickds.py
python
TickDataSeries.getBoughtVolumeDataSeries
(self)
return self.__boughtVolumeDS
Returns a :class:`pyalgotrade.dataseries.DataSeries` with the high prices.
Returns a :class:`pyalgotrade.dataseries.DataSeries` with the high prices.
[ "Returns", "a", ":", "class", ":", "pyalgotrade", ".", "dataseries", ".", "DataSeries", "with", "the", "high", "prices", "." ]
def getBoughtVolumeDataSeries(self): """Returns a :class:`pyalgotrade.dataseries.DataSeries` with the high prices.""" return self.__boughtVolumeDS
[ "def", "getBoughtVolumeDataSeries", "(", "self", ")", ":", "return", "self", ".", "__boughtVolumeDS" ]
https://github.com/francinexue/xuefu/blob/b6ff79747a42e020588c0c0a921048e08fe4680c/cnx/tickds.py#L121-L123
coinapi/coinapi-sdk
854f21e7f69ea8599ae35c5403565cf299d8b795
oeml-sdk/python/openapi_client/model/exec_inst.py
python
ExecInst.openapi_types
()
return { 'value': ([str],), }
This must be a method because a model may have properties that are of type self, this must run after the class is loaded Returns openapi_types (dict): The key is attribute name and the value is attribute type.
This must be a method because a model may have properties that are of type self, this must run after the class is loaded
[ "This", "must", "be", "a", "method", "because", "a", "model", "may", "have", "properties", "that", "are", "of", "type", "self", "this", "must", "run", "after", "the", "class", "is", "loaded" ]
def openapi_types(): """ This must be a method because a model may have properties that are of type self, this must run after the class is loaded Returns openapi_types (dict): The key is attribute name and the value is attribute type. """ retu...
[ "def", "openapi_types", "(", ")", ":", "return", "{", "'value'", ":", "(", "[", "str", "]", ",", ")", ",", "}" ]
https://github.com/coinapi/coinapi-sdk/blob/854f21e7f69ea8599ae35c5403565cf299d8b795/oeml-sdk/python/openapi_client/model/exec_inst.py#L65-L76
moflow/moflow
2dfb27c799c90c6caf1477508eca3eec616ef7d2
bap/libtracewrap/libtrace/protobuf/python/mox.py
python
MultipleTimesGroup.AddMethod
(self, mock_method)
Add a method to this group. Args: mock_method: A mock method to be added to this group.
Add a method to this group.
[ "Add", "a", "method", "to", "this", "group", "." ]
def AddMethod(self, mock_method): """Add a method to this group. Args: mock_method: A mock method to be added to this group. """ self._methods.add(mock_method)
[ "def", "AddMethod", "(", "self", ",", "mock_method", ")", ":", "self", ".", "_methods", ".", "add", "(", "mock_method", ")" ]
https://github.com/moflow/moflow/blob/2dfb27c799c90c6caf1477508eca3eec616ef7d2/bap/libtracewrap/libtrace/protobuf/python/mox.py#L1276-L1283
mantidproject/mantid
03deeb89254ec4289edb8771e0188c2090a02f32
qt/python/mantidqtinterfaces/mantidqtinterfaces/Muon/GUI/Common/plot_widget/base_pane/base_pane_model.py
python
BasePaneModel.get_workspace_list_and_indices_to_plot
(self, is_raw, plot_type)
return workspace_list, indices
:return: a list of workspace names to plot
:return: a list of workspace names to plot
[ ":", "return", ":", "a", "list", "of", "workspace", "names", "to", "plot" ]
def get_workspace_list_and_indices_to_plot(self, is_raw, plot_type): """ :return: a list of workspace names to plot """ workspace_list = self.get_workspaces_to_plot(is_raw, plot_type) indices = self._generate_run_indices(workspace_list) return workspace_list, indices
[ "def", "get_workspace_list_and_indices_to_plot", "(", "self", ",", "is_raw", ",", "plot_type", ")", ":", "workspace_list", "=", "self", ".", "get_workspaces_to_plot", "(", "is_raw", ",", "plot_type", ")", "indices", "=", "self", ".", "_generate_run_indices", "(", ...
https://github.com/mantidproject/mantid/blob/03deeb89254ec4289edb8771e0188c2090a02f32/qt/python/mantidqtinterfaces/mantidqtinterfaces/Muon/GUI/Common/plot_widget/base_pane/base_pane_model.py#L29-L36
mongodb/mongo
d8ff665343ad29cf286ee2cf4a1960d29371937b
buildscripts/resmokelib/setup_multiversion/setup_multiversion.py
python
infer_platform
(edition=None, version=None)
Infer platform for popular OS.
Infer platform for popular OS.
[ "Infer", "platform", "for", "popular", "OS", "." ]
def infer_platform(edition=None, version=None): """Infer platform for popular OS.""" syst = platform.system() pltf = None if syst == 'Darwin': pltf = 'osx' elif syst == 'Windows': pltf = 'windows' if edition == 'base' and version == "4.2": pltf += '_x86_64-2012plu...
[ "def", "infer_platform", "(", "edition", "=", "None", ",", "version", "=", "None", ")", ":", "syst", "=", "platform", ".", "system", "(", ")", "pltf", "=", "None", "if", "syst", "==", "'Darwin'", ":", "pltf", "=", "'osx'", "elif", "syst", "==", "'Win...
https://github.com/mongodb/mongo/blob/d8ff665343ad29cf286ee2cf4a1960d29371937b/buildscripts/resmokelib/setup_multiversion/setup_multiversion.py#L52-L70
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/numba/roc/hsadrv/driver.py
python
require_device_memory
(obj)
A sentry for methods that accept HSA memory object.
A sentry for methods that accept HSA memory object.
[ "A", "sentry", "for", "methods", "that", "accept", "HSA", "memory", "object", "." ]
def require_device_memory(obj): """A sentry for methods that accept HSA memory object. """ if not is_device_memory(obj): raise Exception("Not a HSA memory object.")
[ "def", "require_device_memory", "(", "obj", ")", ":", "if", "not", "is_device_memory", "(", "obj", ")", ":", "raise", "Exception", "(", "\"Not a HSA memory object.\"", ")" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/numba/roc/hsadrv/driver.py#L1448-L1452
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/osx_carbon/stc.py
python
StyledTextCtrl.GetLineIndentPosition
(*args, **kwargs)
return _stc.StyledTextCtrl_GetLineIndentPosition(*args, **kwargs)
GetLineIndentPosition(self, int line) -> int Retrieve the position before the first non indentation character on a line.
GetLineIndentPosition(self, int line) -> int
[ "GetLineIndentPosition", "(", "self", "int", "line", ")", "-", ">", "int" ]
def GetLineIndentPosition(*args, **kwargs): """ GetLineIndentPosition(self, int line) -> int Retrieve the position before the first non indentation character on a line. """ return _stc.StyledTextCtrl_GetLineIndentPosition(*args, **kwargs)
[ "def", "GetLineIndentPosition", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_stc", ".", "StyledTextCtrl_GetLineIndentPosition", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_carbon/stc.py#L3319-L3325
JumpingYang001/webrtc
c03d6e965e1f54aeadd670e491eabe5fdb8db968
rtc_tools/py_event_log_analyzer/rtp_analyzer.py
python
CalculateDelay
(start, stop, step, points)
return numpy.ma.masked_values(regularized_delays, -1)
Quantizes the time coordinates for the delay. Quantizes points by rounding the timestamps downwards to the nearest point in the time sequence start, start+step, start+2*step... Takes the average of the delays of points rounded to the same. Returns masked array, in which time points with no value are masked.
Quantizes the time coordinates for the delay.
[ "Quantizes", "the", "time", "coordinates", "for", "the", "delay", "." ]
def CalculateDelay(start, stop, step, points): """Quantizes the time coordinates for the delay. Quantizes points by rounding the timestamps downwards to the nearest point in the time sequence start, start+step, start+2*step... Takes the average of the delays of points rounded to the same. Returns masked ar...
[ "def", "CalculateDelay", "(", "start", ",", "stop", ",", "step", ",", "points", ")", ":", "grouped_delays", "=", "[", "[", "]", "for", "_", "in", "numpy", ".", "arange", "(", "start", ",", "stop", "+", "step", ",", "step", ")", "]", "rounded_value_in...
https://github.com/JumpingYang001/webrtc/blob/c03d6e965e1f54aeadd670e491eabe5fdb8db968/rtc_tools/py_event_log_analyzer/rtp_analyzer.py#L280-L297
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/msw/_windows.py
python
PrintPreview.GetFrame
(*args, **kwargs)
return _windows_.PrintPreview_GetFrame(*args, **kwargs)
GetFrame(self) -> Frame
GetFrame(self) -> Frame
[ "GetFrame", "(", "self", ")", "-", ">", "Frame" ]
def GetFrame(*args, **kwargs): """GetFrame(self) -> Frame""" return _windows_.PrintPreview_GetFrame(*args, **kwargs)
[ "def", "GetFrame", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_windows_", ".", "PrintPreview_GetFrame", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/msw/_windows.py#L5601-L5603
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Gems/CloudGemDefectReporter/v1/AWS/common-code/Lib/urllib3/packages/ordered_dict.py
python
OrderedDict.fromkeys
(cls, iterable, value=None)
return d
OD.fromkeys(S[, v]) -> New ordered dictionary with keys from S and values equal to v (which defaults to None).
OD.fromkeys(S[, v]) -> New ordered dictionary with keys from S and values equal to v (which defaults to None).
[ "OD", ".", "fromkeys", "(", "S", "[", "v", "]", ")", "-", ">", "New", "ordered", "dictionary", "with", "keys", "from", "S", "and", "values", "equal", "to", "v", "(", "which", "defaults", "to", "None", ")", "." ]
def fromkeys(cls, iterable, value=None): '''OD.fromkeys(S[, v]) -> New ordered dictionary with keys from S and values equal to v (which defaults to None). ''' d = cls() for key in iterable: d[key] = value return d
[ "def", "fromkeys", "(", "cls", ",", "iterable", ",", "value", "=", "None", ")", ":", "d", "=", "cls", "(", ")", "for", "key", "in", "iterable", ":", "d", "[", "key", "]", "=", "value", "return", "d" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Gems/CloudGemDefectReporter/v1/AWS/common-code/Lib/urllib3/packages/ordered_dict.py#L225-L233
panda3d/panda3d
833ad89ebad58395d0af0b7ec08538e5e4308265
direct/src/cluster/ClusterServer.py
python
ClusterServer.listenerPollTask
(self, task)
return Task.cont
Task to listen for a new connection from the client
Task to listen for a new connection from the client
[ "Task", "to", "listen", "for", "a", "new", "connection", "from", "the", "client" ]
def listenerPollTask(self, task): """ Task to listen for a new connection from the client """ # Run this task after the dataLoop if self.qcl.newConnectionAvailable(): self.notify.info("New connection is available") rendezvous = PointerToConnection() netAddress...
[ "def", "listenerPollTask", "(", "self", ",", "task", ")", ":", "# Run this task after the dataLoop", "if", "self", ".", "qcl", ".", "newConnectionAvailable", "(", ")", ":", "self", ".", "notify", ".", "info", "(", "\"New connection is available\"", ")", "rendezvou...
https://github.com/panda3d/panda3d/blob/833ad89ebad58395d0af0b7ec08538e5e4308265/direct/src/cluster/ClusterServer.py#L85-L101
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Gems/CloudGemMetric/v1/AWS/common-code/Lib/numba/types/containers.py
python
_HomogeneousTuple.__getitem__
(self, i)
return self.dtype
Return element at position i
Return element at position i
[ "Return", "element", "at", "position", "i" ]
def __getitem__(self, i): """ Return element at position i """ return self.dtype
[ "def", "__getitem__", "(", "self", ",", "i", ")", ":", "return", "self", ".", "dtype" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Gems/CloudGemMetric/v1/AWS/common-code/Lib/numba/types/containers.py#L180-L184
windystrife/UnrealEngine_NVIDIAGameWorks
b50e6338a7c5b26374d66306ebc7807541ff815e
Engine/Extras/Maya_AnimationRiggingTools/MayaTools/General/Scripts/ART_skeletonBuilder_UI.py
python
SkeletonBuilder_UI.lock_phase2
(self, deleteProxy, skinWeight, *args)
#CRA NEW CODE ################### self.assumeRigPose() import Tools.ART_OrientJointWithUp as ornt # This section will set the LRA values on the arms to be correctly pointing at the child joints for the arms. # It is currently hard-coded for just the uparm, lowarm, and twists. ...
#CRA NEW CODE ################### self.assumeRigPose() import Tools.ART_OrientJointWithUp as ornt # This section will set the LRA values on the arms to be correctly pointing at the child joints for the arms. # It is currently hard-coded for just the uparm, lowarm, and twists. ...
[ "#CRA", "NEW", "CODE", "###################", "self", ".", "assumeRigPose", "()", "import", "Tools", ".", "ART_OrientJointWithUp", "as", "ornt", "#", "This", "section", "will", "set", "the", "LRA", "values", "on", "the", "arms", "to", "be", "correctly", "point...
def lock_phase2(self, deleteProxy, skinWeight, *args): #set joint mover and skeleton to model pose constraints = [] for mover in self.geoMovers: mover = mover.partition("|")[0] children = cmds.listRelatives(mover, children = True, type = "transform") if child...
[ "def", "lock_phase2", "(", "self", ",", "deleteProxy", ",", "skinWeight", ",", "*", "args", ")", ":", "#set joint mover and skeleton to model pose", "constraints", "=", "[", "]", "for", "mover", "in", "self", ".", "geoMovers", ":", "mover", "=", "mover", ".", ...
https://github.com/windystrife/UnrealEngine_NVIDIAGameWorks/blob/b50e6338a7c5b26374d66306ebc7807541ff815e/Engine/Extras/Maya_AnimationRiggingTools/MayaTools/General/Scripts/ART_skeletonBuilder_UI.py#L6944-L7189
google/earthenterprise
0fe84e29be470cd857e3a0e52e5d0afd5bb8cee9
earth_enterprise/src/server/wsgi/wms/ogc/implementation/impl_v111.py
python
GetCapabilitiesRequest._Xml
(self)
return xml_text.getvalue()
Generates the xml response. Returns: The XML response.
Generates the xml response.
[ "Generates", "the", "xml", "response", "." ]
def _Xml(self): """Generates the xml response. Returns: The XML response. """ logger.debug("Begin XML response for GetCapabilities for WMS v1.1.1") xml_text = StringIO.StringIO() xml_text.write(_XML_HEADER) xml_text.write("<!DOCTYPE WMT_MS_Capabilities SYSTEM") xml_text.write('\...
[ "def", "_Xml", "(", "self", ")", ":", "logger", ".", "debug", "(", "\"Begin XML response for GetCapabilities for WMS v1.1.1\"", ")", "xml_text", "=", "StringIO", ".", "StringIO", "(", ")", "xml_text", ".", "write", "(", "_XML_HEADER", ")", "xml_text", ".", "writ...
https://github.com/google/earthenterprise/blob/0fe84e29be470cd857e3a0e52e5d0afd5bb8cee9/earth_enterprise/src/server/wsgi/wms/ogc/implementation/impl_v111.py#L239-L266
synfig/synfig
a5ec91db5b751dc12e4400ccfb5c063fd6d2d928
synfig-studio/plugins/lottie-exporter/common/Param.py
python
Param.add_convert_link
(self, val)
Private method for inserting <add></add>, given a offset
Private method for inserting <add></add>, given a offset
[ "Private", "method", "for", "inserting", "<add", ">", "<", "/", "add", ">", "given", "a", "offset" ]
def add_convert_link(self, val): """ Private method for inserting <add></add>, given a offset """ st = "<add type='vector'><lhs></lhs><rhs></rhs><scalar><real value='1.00'/></scalar></add>" root = etree.fromstring(st) first = copy.deepcopy(self.param[0]) root[0].a...
[ "def", "add_convert_link", "(", "self", ",", "val", ")", ":", "st", "=", "\"<add type='vector'><lhs></lhs><rhs></rhs><scalar><real value='1.00'/></scalar></add>\"", "root", "=", "etree", ".", "fromstring", "(", "st", ")", "first", "=", "copy", ".", "deepcopy", "(", ...
https://github.com/synfig/synfig/blob/a5ec91db5b751dc12e4400ccfb5c063fd6d2d928/synfig-studio/plugins/lottie-exporter/common/Param.py#L1164-L1180
pytorch/xla
93174035e8149d5d03cee446486de861f56493e1
torch_xla/utils/gcsfs.py
python
write
(path, content)
Write a string/bytes or file into a GCS blob. Args: path (string): The GCS path of the file. Must be "gs://BUCKET_NAME/PATH" where ``BUCKET_NAME`` is the name of the GCS bucket, and ``PATH`` is a `/` delimited path. content (string, bytes or file object): The content to be written into ``pa...
Write a string/bytes or file into a GCS blob.
[ "Write", "a", "string", "/", "bytes", "or", "file", "into", "a", "GCS", "blob", "." ]
def write(path, content): """Write a string/bytes or file into a GCS blob. Args: path (string): The GCS path of the file. Must be "gs://BUCKET_NAME/PATH" where ``BUCKET_NAME`` is the name of the GCS bucket, and ``PATH`` is a `/` delimited path. content (string, bytes or file object): The conten...
[ "def", "write", "(", "path", ",", "content", ")", ":", "if", "not", "isinstance", "(", "content", ",", "(", "bytes", ",", "str", ")", ")", ":", "content", "=", "content", ".", "read", "(", ")", "gcs_file", "=", "torch_xla", ".", "_XLAC", ".", "_xla...
https://github.com/pytorch/xla/blob/93174035e8149d5d03cee446486de861f56493e1/torch_xla/utils/gcsfs.py#L238-L252
rapidsai/cudf
d5b2448fc69f17509304d594f029d0df56984962
python/cudf/cudf/core/_base_index.py
python
BaseIndex.append
(self, other)
return self._concat(to_concat)
Append a collection of Index options together. Parameters ---------- other : Index or list/tuple of indices Returns ------- appended : Index Examples -------- >>> import cudf >>> idx = cudf.Index([1, 2, 10, 100]) >>> idx ...
Append a collection of Index options together.
[ "Append", "a", "collection", "of", "Index", "options", "together", "." ]
def append(self, other): """ Append a collection of Index options together. Parameters ---------- other : Index or list/tuple of indices Returns ------- appended : Index Examples -------- >>> import cudf >>> idx = cudf.In...
[ "def", "append", "(", "self", ",", "other", ")", ":", "if", "is_list_like", "(", "other", ")", ":", "to_concat", "=", "[", "self", "]", "to_concat", ".", "extend", "(", "other", ")", "else", ":", "this", "=", "self", "if", "len", "(", "other", ")",...
https://github.com/rapidsai/cudf/blob/d5b2448fc69f17509304d594f029d0df56984962/python/cudf/cudf/core/_base_index.py#L571-L638
hughperkins/tf-coriander
970d3df6c11400ad68405f22b0c42a52374e94ca
tensorflow/contrib/learn/python/learn/estimators/svm.py
python
SVM.fit
(self, x=None, y=None, input_fn=None, steps=None, batch_size=None, monitors=None, max_steps=None)
return self._estimator.fit(x=x, y=y, input_fn=input_fn, steps=steps, batch_size=batch_size, monitors=monitors, max_steps=max_steps)
See trainable.Trainable.
See trainable.Trainable.
[ "See", "trainable", ".", "Trainable", "." ]
def fit(self, x=None, y=None, input_fn=None, steps=None, batch_size=None, monitors=None, max_steps=None): """See trainable.Trainable.""" return self._estimator.fit(x=x, y=y, input_fn=input_fn, steps=steps, batch_size=batch_size, monitors=monitors, ...
[ "def", "fit", "(", "self", ",", "x", "=", "None", ",", "y", "=", "None", ",", "input_fn", "=", "None", ",", "steps", "=", "None", ",", "batch_size", "=", "None", ",", "monitors", "=", "None", ",", "max_steps", "=", "None", ")", ":", "return", "se...
https://github.com/hughperkins/tf-coriander/blob/970d3df6c11400ad68405f22b0c42a52374e94ca/tensorflow/contrib/learn/python/learn/estimators/svm.py#L161-L166
hanpfei/chromium-net
392cc1fa3a8f92f42e4071ab6e674d8e0482f83f
tools/checkperms/checkperms.py
python
has_shebang_or_is_elf
(full_path)
Returns if the file starts with #!/ or is an ELF binary. full_path is the absolute path to the file.
Returns if the file starts with #!/ or is an ELF binary.
[ "Returns", "if", "the", "file", "starts", "with", "#!", "/", "or", "is", "an", "ELF", "binary", "." ]
def has_shebang_or_is_elf(full_path): """Returns if the file starts with #!/ or is an ELF binary. full_path is the absolute path to the file. """ with open(full_path, 'rb') as f: data = f.read(4) return (data[:3] == '#!/' or data == '#! /', data == '\x7fELF')
[ "def", "has_shebang_or_is_elf", "(", "full_path", ")", ":", "with", "open", "(", "full_path", ",", "'rb'", ")", "as", "f", ":", "data", "=", "f", ".", "read", "(", "4", ")", "return", "(", "data", "[", ":", "3", "]", "==", "'#!/'", "or", "data", ...
https://github.com/hanpfei/chromium-net/blob/392cc1fa3a8f92f42e4071ab6e674d8e0482f83f/tools/checkperms/checkperms.py#L274-L281
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/osx_carbon/_windows.py
python
Printout.GetPageSizePixels
(*args, **kwargs)
return _windows_.Printout_GetPageSizePixels(*args, **kwargs)
GetPageSizePixels() -> (w, h)
GetPageSizePixels() -> (w, h)
[ "GetPageSizePixels", "()", "-", ">", "(", "w", "h", ")" ]
def GetPageSizePixels(*args, **kwargs): """GetPageSizePixels() -> (w, h)""" return _windows_.Printout_GetPageSizePixels(*args, **kwargs)
[ "def", "GetPageSizePixels", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_windows_", ".", "Printout_GetPageSizePixels", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_carbon/_windows.py#L5335-L5337
ValveSoftware/source-sdk-2013
0d8dceea4310fde5706b3ce1c70609d72a38efdf
sp/src/thirdparty/protobuf-2.3.0/python/google/protobuf/service_reflection.py
python
_ServiceBuilder.BuildService
(self, cls)
Constructs the service class. Args: cls: The class that will be constructed.
Constructs the service class.
[ "Constructs", "the", "service", "class", "." ]
def BuildService(self, cls): """Constructs the service class. Args: cls: The class that will be constructed. """ # CallMethod needs to operate with an instance of the Service class. This # internal wrapper function exists only to be able to pass the service # instance to the method that ...
[ "def", "BuildService", "(", "self", ",", "cls", ")", ":", "# CallMethod needs to operate with an instance of the Service class. This", "# internal wrapper function exists only to be able to pass the service", "# instance to the method that does the real CallMethod work.", "def", "_WrapCallMe...
https://github.com/ValveSoftware/source-sdk-2013/blob/0d8dceea4310fde5706b3ce1c70609d72a38efdf/sp/src/thirdparty/protobuf-2.3.0/python/google/protobuf/service_reflection.py#L133-L154
wlanjie/AndroidFFmpeg
7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf
tools/fdk-aac-build/armeabi/toolchain/lib/python2.7/threading.py
python
Thread.daemon
(self)
return self.__daemonic
A boolean value indicating whether this thread is a daemon thread (True) or not (False). This must be set before start() is called, otherwise RuntimeError is raised. Its initial value is inherited from the creating thread; the main thread is not a daemon thread and therefore all threads created...
A boolean value indicating whether this thread is a daemon thread (True) or not (False).
[ "A", "boolean", "value", "indicating", "whether", "this", "thread", "is", "a", "daemon", "thread", "(", "True", ")", "or", "not", "(", "False", ")", "." ]
def daemon(self): """A boolean value indicating whether this thread is a daemon thread (True) or not (False). This must be set before start() is called, otherwise RuntimeError is raised. Its initial value is inherited from the creating thread; the main thread is not a daemon thread and ...
[ "def", "daemon", "(", "self", ")", ":", "assert", "self", ".", "__initialized", ",", "\"Thread.__init__() not called\"", "return", "self", ".", "__daemonic" ]
https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/armeabi/toolchain/lib/python2.7/threading.py#L1007-L1020
intel/linux-sgx
2ee53db4e8fd25437a817612d3bcb94b66a28373
sdk/debugger_interface/linux/gdb-sgx-plugin/gdb_sgx_plugin.py
python
get_inferior
()
Get current inferior
Get current inferior
[ "Get", "current", "inferior" ]
def get_inferior(): """Get current inferior""" try: if len(gdb.inferiors()) == 0: print ("No gdb inferior could be found.") return -1 else: inferior = gdb.inferiors()[0] return inferior except AttributeError: print ("This gdb's python s...
[ "def", "get_inferior", "(", ")", ":", "try", ":", "if", "len", "(", "gdb", ".", "inferiors", "(", ")", ")", "==", "0", ":", "print", "(", "\"No gdb inferior could be found.\"", ")", "return", "-", "1", "else", ":", "inferior", "=", "gdb", ".", "inferio...
https://github.com/intel/linux-sgx/blob/2ee53db4e8fd25437a817612d3bcb94b66a28373/sdk/debugger_interface/linux/gdb-sgx-plugin/gdb_sgx_plugin.py#L68-L79
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/gtk/stc.py
python
StyledTextCtrl.RegisterRGBAImage
(*args, **kwargs)
return _stc.StyledTextCtrl_RegisterRGBAImage(*args, **kwargs)
RegisterRGBAImage(self, int type, unsigned char pixels)
RegisterRGBAImage(self, int type, unsigned char pixels)
[ "RegisterRGBAImage", "(", "self", "int", "type", "unsigned", "char", "pixels", ")" ]
def RegisterRGBAImage(*args, **kwargs): """RegisterRGBAImage(self, int type, unsigned char pixels)""" return _stc.StyledTextCtrl_RegisterRGBAImage(*args, **kwargs)
[ "def", "RegisterRGBAImage", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_stc", ".", "StyledTextCtrl_RegisterRGBAImage", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/gtk/stc.py#L6373-L6375
husixu1/HUST-Homeworks
fbf6ed749eacab6e14bffea83703aadaf9324828
DataMining/src/itemBasedCF.py
python
preProcess
(table)
return table
do pre-processing :param table: original table :return: preprocessed table
do pre-processing :param table: original table :return: preprocessed table
[ "do", "pre", "-", "processing", ":", "param", "table", ":", "original", "table", ":", "return", ":", "preprocessed", "table" ]
def preProcess(table): """ do pre-processing :param table: original table :return: preprocessed table """ table[table == 99] = 0 return table
[ "def", "preProcess", "(", "table", ")", ":", "table", "[", "table", "==", "99", "]", "=", "0", "return", "table" ]
https://github.com/husixu1/HUST-Homeworks/blob/fbf6ed749eacab6e14bffea83703aadaf9324828/DataMining/src/itemBasedCF.py#L77-L84
Smorodov/Multitarget-tracker
bee300e8bfd660c86cbeb6892c65a5b7195c9381
thirdparty/pybind11/tools/clang/cindex.py
python
SourceRange.start
(self)
return conf.lib.clang_getRangeStart(self)
Return a SourceLocation representing the first character within a source range.
Return a SourceLocation representing the first character within a source range.
[ "Return", "a", "SourceLocation", "representing", "the", "first", "character", "within", "a", "source", "range", "." ]
def start(self): """ Return a SourceLocation representing the first character within a source range. """ return conf.lib.clang_getRangeStart(self)
[ "def", "start", "(", "self", ")", ":", "return", "conf", ".", "lib", ".", "clang_getRangeStart", "(", "self", ")" ]
https://github.com/Smorodov/Multitarget-tracker/blob/bee300e8bfd660c86cbeb6892c65a5b7195c9381/thirdparty/pybind11/tools/clang/cindex.py#L248-L253
mindspore-ai/mindspore
fb8fd3338605bb34fa5cea054e535a8b1d753fab
mindspore/python/mindspore/ops/_op_impl/akg/gpu/logical_or.py
python
_logical_or_akg
()
return
LogicalOr register
LogicalOr register
[ "LogicalOr", "register" ]
def _logical_or_akg(): """LogicalOr register""" return
[ "def", "_logical_or_akg", "(", ")", ":", "return" ]
https://github.com/mindspore-ai/mindspore/blob/fb8fd3338605bb34fa5cea054e535a8b1d753fab/mindspore/python/mindspore/ops/_op_impl/akg/gpu/logical_or.py#L28-L30
mantidproject/mantid
03deeb89254ec4289edb8771e0188c2090a02f32
qt/python/mantidqtinterfaces/mantidqtinterfaces/Muon/GUI/Common/fitting_widgets/tf_asymmetry_fitting/tf_asymmetry_fitting_model.py
python
TFAsymmetryFittingModel.get_domain_tf_asymmetry_fit_function
(self, tf_simultaneous_function: IFunction, dataset_index: int)
return tf_simultaneous_function.getFunction(index)
Returns the fit function in the TF Asymmetry simultaneous function corresponding to the specified index.
Returns the fit function in the TF Asymmetry simultaneous function corresponding to the specified index.
[ "Returns", "the", "fit", "function", "in", "the", "TF", "Asymmetry", "simultaneous", "function", "corresponding", "to", "the", "specified", "index", "." ]
def get_domain_tf_asymmetry_fit_function(self, tf_simultaneous_function: IFunction, dataset_index: int) -> IFunction: """Returns the fit function in the TF Asymmetry simultaneous function corresponding to the specified index.""" if self.fitting_context.number_of_datasets < 2 or tf_simultaneous_function ...
[ "def", "get_domain_tf_asymmetry_fit_function", "(", "self", ",", "tf_simultaneous_function", ":", "IFunction", ",", "dataset_index", ":", "int", ")", "->", "IFunction", ":", "if", "self", ".", "fitting_context", ".", "number_of_datasets", "<", "2", "or", "tf_simulta...
https://github.com/mantidproject/mantid/blob/03deeb89254ec4289edb8771e0188c2090a02f32/qt/python/mantidqtinterfaces/mantidqtinterfaces/Muon/GUI/Common/fitting_widgets/tf_asymmetry_fitting/tf_asymmetry_fitting_model.py#L112-L118
PaddlePaddle/PaddleOCR
b756bf5f8c90142e0d89d3db0163965c686b6ffe
ppocr/data/__init__.py
python
term_mp
(sig_num, frame)
kill all child processes
kill all child processes
[ "kill", "all", "child", "processes" ]
def term_mp(sig_num, frame): """ kill all child processes """ pid = os.getpid() pgid = os.getpgid(os.getpid()) print("main proc {} exit, kill process group " "{}".format(pid, pgid)) os.killpg(pgid, signal.SIGKILL)
[ "def", "term_mp", "(", "sig_num", ",", "frame", ")", ":", "pid", "=", "os", ".", "getpid", "(", ")", "pgid", "=", "os", ".", "getpgid", "(", "os", ".", "getpid", "(", ")", ")", "print", "(", "\"main proc {} exit, kill process group \"", "\"{}\"", ".", ...
https://github.com/PaddlePaddle/PaddleOCR/blob/b756bf5f8c90142e0d89d3db0163965c686b6ffe/ppocr/data/__init__.py#L43-L49
krishauser/Klampt
972cc83ea5befac3f653c1ba20f80155768ad519
Python/python2_version/klampt/src/motionplanning.py
python
CSpaceInterface.setProperty
(self, key, value)
return _motionplanning.CSpaceInterface_setProperty(self, key, value)
setProperty(CSpaceInterface self, char const * key, char const * value)
setProperty(CSpaceInterface self, char const * key, char const * value)
[ "setProperty", "(", "CSpaceInterface", "self", "char", "const", "*", "key", "char", "const", "*", "value", ")" ]
def setProperty(self, key, value): """ setProperty(CSpaceInterface self, char const * key, char const * value) """ return _motionplanning.CSpaceInterface_setProperty(self, key, value)
[ "def", "setProperty", "(", "self", ",", "key", ",", "value", ")", ":", "return", "_motionplanning", ".", "CSpaceInterface_setProperty", "(", "self", ",", "key", ",", "value", ")" ]
https://github.com/krishauser/Klampt/blob/972cc83ea5befac3f653c1ba20f80155768ad519/Python/python2_version/klampt/src/motionplanning.py#L426-L433
albertz/openlierox
d316c14a8eb57848ef56e9bfa7b23a56f694a51b
tools/DedicatedServerVideo/gdata/client.py
python
GDClient.get_access_token
(self, request_token, url=gdata.gauth.ACCESS_TOKEN_URL)
return gdata.gauth.upgrade_to_access_token(request_token, response_body)
Exchanges an authorized OAuth request token for an access token. Contacts the Google OAuth server to upgrade a previously authorized request token. Once the request token is upgraded to an access token, the access token may be used to access the user's data. For more details, see the Google Accounts O...
Exchanges an authorized OAuth request token for an access token.
[ "Exchanges", "an", "authorized", "OAuth", "request", "token", "for", "an", "access", "token", "." ]
def get_access_token(self, request_token, url=gdata.gauth.ACCESS_TOKEN_URL): """Exchanges an authorized OAuth request token for an access token. Contacts the Google OAuth server to upgrade a previously authorized request token. Once the request token is upgraded to an access token, ...
[ "def", "get_access_token", "(", "self", ",", "request_token", ",", "url", "=", "gdata", ".", "gauth", ".", "ACCESS_TOKEN_URL", ")", ":", "http_request", "=", "gdata", ".", "gauth", ".", "generate_request_for_access_token", "(", "request_token", ",", "auth_server_u...
https://github.com/albertz/openlierox/blob/d316c14a8eb57848ef56e9bfa7b23a56f694a51b/tools/DedicatedServerVideo/gdata/client.py#L552-L577
mantidproject/mantid
03deeb89254ec4289edb8771e0188c2090a02f32
scripts/SANS/isis_reducer.py
python
ISISReducer.add_dark_run_setting
(self, dark_run_setting)
Adds a dark run setting to the dark run subtraction @param dark_run_setting: a dark run setting
Adds a dark run setting to the dark run subtraction
[ "Adds", "a", "dark", "run", "setting", "to", "the", "dark", "run", "subtraction" ]
def add_dark_run_setting(self, dark_run_setting): ''' Adds a dark run setting to the dark run subtraction @param dark_run_setting: a dark run setting ''' self.dark_run_subtraction.add_setting(dark_run_setting)
[ "def", "add_dark_run_setting", "(", "self", ",", "dark_run_setting", ")", ":", "self", ".", "dark_run_subtraction", ".", "add_setting", "(", "dark_run_setting", ")" ]
https://github.com/mantidproject/mantid/blob/03deeb89254ec4289edb8771e0188c2090a02f32/scripts/SANS/isis_reducer.py#L929-L934
Polidea/SiriusObfuscator
b0e590d8130e97856afe578869b83a209e2b19be
SymbolExtractorAndRenamer/lldb/scripts/Python/static-binding/lldb.py
python
SBModule.get_compile_units_access_object
(self)
return self.compile_units_access (self)
An accessor function that returns a compile_units_access() object which allows lazy compile unit access from a lldb.SBModule object.
An accessor function that returns a compile_units_access() object which allows lazy compile unit access from a lldb.SBModule object.
[ "An", "accessor", "function", "that", "returns", "a", "compile_units_access", "()", "object", "which", "allows", "lazy", "compile", "unit", "access", "from", "a", "lldb", ".", "SBModule", "object", "." ]
def get_compile_units_access_object (self): '''An accessor function that returns a compile_units_access() object which allows lazy compile unit access from a lldb.SBModule object.''' return self.compile_units_access (self)
[ "def", "get_compile_units_access_object", "(", "self", ")", ":", "return", "self", ".", "compile_units_access", "(", "self", ")" ]
https://github.com/Polidea/SiriusObfuscator/blob/b0e590d8130e97856afe578869b83a209e2b19be/SymbolExtractorAndRenamer/lldb/scripts/Python/static-binding/lldb.py#L6327-L6329
mindspore-ai/mindspore
fb8fd3338605bb34fa5cea054e535a8b1d753fab
mindspore/python/mindspore/ops/_op_impl/akg/ascend/exp.py
python
_exp_akg
()
return
Exp Akg register
Exp Akg register
[ "Exp", "Akg", "register" ]
def _exp_akg(): """Exp Akg register""" return
[ "def", "_exp_akg", "(", ")", ":", "return" ]
https://github.com/mindspore-ai/mindspore/blob/fb8fd3338605bb34fa5cea054e535a8b1d753fab/mindspore/python/mindspore/ops/_op_impl/akg/ascend/exp.py#L33-L35
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/gtk/_controls.py
python
ListCtrl.GetItemPosition
(*args, **kwargs)
return _controls_.ListCtrl_GetItemPosition(*args, **kwargs)
GetItemPosition(self, long item) -> Point
GetItemPosition(self, long item) -> Point
[ "GetItemPosition", "(", "self", "long", "item", ")", "-", ">", "Point" ]
def GetItemPosition(*args, **kwargs): """GetItemPosition(self, long item) -> Point""" return _controls_.ListCtrl_GetItemPosition(*args, **kwargs)
[ "def", "GetItemPosition", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_controls_", ".", "ListCtrl_GetItemPosition", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/gtk/_controls.py#L4555-L4557
Slicer/SlicerGitSVNArchive
65e92bb16c2b32ea47a1a66bee71f238891ee1ca
Modules/Scripted/EditorLib/LabelStructureListWidget.py
python
LabelStructureListWidget.selectStructure
(self, idx)
programmatically select the specified structure
programmatically select the specified structure
[ "programmatically", "select", "the", "specified", "structure" ]
def selectStructure(self, idx): """programmatically select the specified structure""" selectionModel = self.structuresView.selectionModel() selectionModel.select(qt.QItemSelection(self.structures.index(idx,0), self.structures.index(idx,4)), ...
[ "def", "selectStructure", "(", "self", ",", "idx", ")", ":", "selectionModel", "=", "self", ".", "structuresView", ".", "selectionModel", "(", ")", "selectionModel", ".", "select", "(", "qt", ".", "QItemSelection", "(", "self", ".", "structures", ".", "index...
https://github.com/Slicer/SlicerGitSVNArchive/blob/65e92bb16c2b32ea47a1a66bee71f238891ee1ca/Modules/Scripted/EditorLib/LabelStructureListWidget.py#L232-L239
baidu-research/tensorflow-allreduce
66d5b855e90b0949e9fa5cca5599fd729a70e874
tensorflow/python/client/session_benchmark.py
python
SessionBenchmark._benchmarkFeed
(self, name, target, size, iters)
Runs a microbenchmark to measure the cost of feeding a tensor. Reports the median cost of feeding a tensor of `size` * `sizeof(float)` bytes. Args: name: A human-readable name for logging the output. target: The session target to use for the benchmark. size: The number of floating-point ...
Runs a microbenchmark to measure the cost of feeding a tensor.
[ "Runs", "a", "microbenchmark", "to", "measure", "the", "cost", "of", "feeding", "a", "tensor", "." ]
def _benchmarkFeed(self, name, target, size, iters): """Runs a microbenchmark to measure the cost of feeding a tensor. Reports the median cost of feeding a tensor of `size` * `sizeof(float)` bytes. Args: name: A human-readable name for logging the output. target: The session target to use ...
[ "def", "_benchmarkFeed", "(", "self", ",", "name", ",", "target", ",", "size", ",", "iters", ")", ":", "feed_val", "=", "np", ".", "random", ".", "rand", "(", "size", ")", ".", "astype", "(", "np", ".", "float32", ")", "times", "=", "[", "]", "wi...
https://github.com/baidu-research/tensorflow-allreduce/blob/66d5b855e90b0949e9fa5cca5599fd729a70e874/tensorflow/python/client/session_benchmark.py#L38-L65
intel/llvm
e6d0547e9d99b5a56430c4749f6c7e328bf221ab
mlir/python/mlir/dialects/linalg/opdsl/lang/comprehension.py
python
TensorExpression.collect_dim_uses
(self, uses: Set["DimDef"])
Collects all DimDefs reachable through this expression.
Collects all DimDefs reachable through this expression.
[ "Collects", "all", "DimDefs", "reachable", "through", "this", "expression", "." ]
def collect_dim_uses(self, uses: Set["DimDef"]): """Collects all DimDefs reachable through this expression.""" results = set() def visit_dim_def(dim_def): if isinstance(dim_def, DimDef): uses.add(dim_def) def visit_affine_exprs(expr): if isinstance(expr, TensorUse): for ind...
[ "def", "collect_dim_uses", "(", "self", ",", "uses", ":", "Set", "[", "\"DimDef\"", "]", ")", ":", "results", "=", "set", "(", ")", "def", "visit_dim_def", "(", "dim_def", ")", ":", "if", "isinstance", "(", "dim_def", ",", "DimDef", ")", ":", "uses", ...
https://github.com/intel/llvm/blob/e6d0547e9d99b5a56430c4749f6c7e328bf221ab/mlir/python/mlir/dialects/linalg/opdsl/lang/comprehension.py#L34-L50
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/gtk/_core.py
python
PyApp_GetTraitsIfExists
(*args)
return _core_.PyApp_GetTraitsIfExists(*args)
PyApp_GetTraitsIfExists() -> wxAppTraits This function provides safer access to traits object than wx.GetApp().GetTraits() during startup or termination when the global application object itself may be unavailable.
PyApp_GetTraitsIfExists() -> wxAppTraits
[ "PyApp_GetTraitsIfExists", "()", "-", ">", "wxAppTraits" ]
def PyApp_GetTraitsIfExists(*args): """ PyApp_GetTraitsIfExists() -> wxAppTraits This function provides safer access to traits object than wx.GetApp().GetTraits() during startup or termination when the global application object itself may be unavailable. """ return _core_.PyApp_GetTraitsIfExist...
[ "def", "PyApp_GetTraitsIfExists", "(", "*", "args", ")", ":", "return", "_core_", ".", "PyApp_GetTraitsIfExists", "(", "*", "args", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/gtk/_core.py#L8255-L8263
bristolcrypto/SPDZ-2
721abfae849625a02ea49aabc534f9cf41ca643f
Compiler/oram.py
python
get_log_value_size
(value_type)
Return log of element size.
Return log of element size.
[ "Return", "log", "of", "element", "size", "." ]
def get_log_value_size(value_type): """ Return log of element size. """ if value_type == sgf2n: return 5 else: return sint_bit_length
[ "def", "get_log_value_size", "(", "value_type", ")", ":", "if", "value_type", "==", "sgf2n", ":", "return", "5", "else", ":", "return", "sint_bit_length" ]
https://github.com/bristolcrypto/SPDZ-2/blob/721abfae849625a02ea49aabc534f9cf41ca643f/Compiler/oram.py#L1312-L1317
thalium/icebox
99d147d5b9269222225443ce171b4fd46d8985d4
third_party/virtualbox/src/VBox/Main/glue/vboxapi.py
python
PerfCollector.enable
(self, names, objects)
Resumes metric collection for the specified metrics.
Resumes metric collection for the specified metrics.
[ "Resumes", "metric", "collection", "for", "the", "specified", "metrics", "." ]
def enable(self, names, objects): """ Resumes metric collection for the specified metrics. """ self.collector.enableMetrics(names, objects)
[ "def", "enable", "(", "self", ",", "names", ",", "objects", ")", ":", "self", ".", "collector", ".", "enableMetrics", "(", "names", ",", "objects", ")" ]
https://github.com/thalium/icebox/blob/99d147d5b9269222225443ce171b4fd46d8985d4/third_party/virtualbox/src/VBox/Main/glue/vboxapi.py#L106-L109
krishauser/Klampt
972cc83ea5befac3f653c1ba20f80155768ad519
Python/klampt/io/resource.py
python
thumbnail
(value,size,type='auto',world=None,frame=None)
return plugin.image
Retrieves an image of the given item, resized to the given size. Args: value: a resource type. size (pair of ints): the (width,height) of the thumbnail, in pixels. type (str, optional): the type of value world (WorldModel, optional): if given, the resource will be drawn with ...
Retrieves an image of the given item, resized to the given size.
[ "Retrieves", "an", "image", "of", "the", "given", "item", "resized", "to", "the", "given", "size", "." ]
def thumbnail(value,size,type='auto',world=None,frame=None): """Retrieves an image of the given item, resized to the given size. Args: value: a resource type. size (pair of ints): the (width,height) of the thumbnail, in pixels. type (str, optional): the type of value world (Worl...
[ "def", "thumbnail", "(", "value", ",", "size", ",", "type", "=", "'auto'", ",", "world", "=", "None", ",", "frame", "=", "None", ")", ":", "global", "_thumbnail_window", "world", "=", "_get_world", "(", "world", ")", "if", "isinstance", "(", "value", "...
https://github.com/krishauser/Klampt/blob/972cc83ea5befac3f653c1ba20f80155768ad519/Python/klampt/io/resource.py#L424-L506
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/numpy/distutils/command/config.py
python
config.check_inline
(self)
return check_inline(self)
Return the inline keyword recognized by the compiler, empty string otherwise.
Return the inline keyword recognized by the compiler, empty string otherwise.
[ "Return", "the", "inline", "keyword", "recognized", "by", "the", "compiler", "empty", "string", "otherwise", "." ]
def check_inline(self): """Return the inline keyword recognized by the compiler, empty string otherwise.""" return check_inline(self)
[ "def", "check_inline", "(", "self", ")", ":", "return", "check_inline", "(", "self", ")" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/numpy/distutils/command/config.py#L412-L415
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/msw/grid.py
python
Grid.DeselectRow
(*args, **kwargs)
return _grid.Grid_DeselectRow(*args, **kwargs)
DeselectRow(self, int row)
DeselectRow(self, int row)
[ "DeselectRow", "(", "self", "int", "row", ")" ]
def DeselectRow(*args, **kwargs): """DeselectRow(self, int row)""" return _grid.Grid_DeselectRow(*args, **kwargs)
[ "def", "DeselectRow", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_grid", ".", "Grid_DeselectRow", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/msw/grid.py#L2077-L2079
ricardoquesada/Spidermonkey
4a75ea2543408bd1b2c515aa95901523eeef7858
media/webrtc/trunk/tools/gyp/pylib/gyp/generator/ninja.py
python
NinjaWriter.WriteWinIdlFiles
(self, spec, prebuild)
return outputs
Writes rules to match MSVS's implicit idl handling.
Writes rules to match MSVS's implicit idl handling.
[ "Writes", "rules", "to", "match", "MSVS", "s", "implicit", "idl", "handling", "." ]
def WriteWinIdlFiles(self, spec, prebuild): """Writes rules to match MSVS's implicit idl handling.""" assert self.flavor == 'win' if self.msvs_settings.HasExplicitIdlRules(spec): return [] outputs = [] for source in filter(lambda x: x.endswith('.idl'), spec['sources']): self._WinIdlRule(...
[ "def", "WriteWinIdlFiles", "(", "self", ",", "spec", ",", "prebuild", ")", ":", "assert", "self", ".", "flavor", "==", "'win'", "if", "self", ".", "msvs_settings", ".", "HasExplicitIdlRules", "(", "spec", ")", ":", "return", "[", "]", "outputs", "=", "["...
https://github.com/ricardoquesada/Spidermonkey/blob/4a75ea2543408bd1b2c515aa95901523eeef7858/media/webrtc/trunk/tools/gyp/pylib/gyp/generator/ninja.py#L486-L494
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/osx_carbon/_core.py
python
Window.NavigateIn
(*args, **kwargs)
return _core_.Window_NavigateIn(*args, **kwargs)
NavigateIn(self, int flags=NavigationKeyEvent.IsForward) -> bool Navigates inside this window.
NavigateIn(self, int flags=NavigationKeyEvent.IsForward) -> bool
[ "NavigateIn", "(", "self", "int", "flags", "=", "NavigationKeyEvent", ".", "IsForward", ")", "-", ">", "bool" ]
def NavigateIn(*args, **kwargs): """ NavigateIn(self, int flags=NavigationKeyEvent.IsForward) -> bool Navigates inside this window. """ return _core_.Window_NavigateIn(*args, **kwargs)
[ "def", "NavigateIn", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_core_", ".", "Window_NavigateIn", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_carbon/_core.py#L10196-L10202
mongodb/mongo
d8ff665343ad29cf286ee2cf4a1960d29371937b
buildscripts/resmokelib/selector.py
python
filter_tests
(test_kind, selector_config, test_file_explorer=_DEFAULT_TEST_FILE_EXPLORER)
return selector.select(selector_config)
Filter the tests according to a specified configuration. Args: test_kind: the test kind, from _SELECTOR_REGISTRY. selector_config: a dict containing the selector configuration. test_file_explorer: the TestFileExplorer to use. Using a TestFileExplorer other than the default one shoul...
Filter the tests according to a specified configuration.
[ "Filter", "the", "tests", "according", "to", "a", "specified", "configuration", "." ]
def filter_tests(test_kind, selector_config, test_file_explorer=_DEFAULT_TEST_FILE_EXPLORER): """Filter the tests according to a specified configuration. Args: test_kind: the test kind, from _SELECTOR_REGISTRY. selector_config: a dict containing the selector configuration. test_file_exp...
[ "def", "filter_tests", "(", "test_kind", ",", "selector_config", ",", "test_file_explorer", "=", "_DEFAULT_TEST_FILE_EXPLORER", ")", ":", "if", "test_kind", "not", "in", "_SELECTOR_REGISTRY", ":", "raise", "ValueError", "(", "\"Unknown test kind '{}'\"", ".", "format", ...
https://github.com/mongodb/mongo/blob/d8ff665343ad29cf286ee2cf4a1960d29371937b/buildscripts/resmokelib/selector.py#L737-L751
wlanjie/AndroidFFmpeg
7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf
tools/fdk-aac-build/x86/toolchain/lib/python2.7/distutils/cmd.py
python
Command.set_undefined_options
(self, src_cmd, *option_pairs)
Set the values of any "undefined" options from corresponding option values in some other command object. "Undefined" here means "is None", which is the convention used to indicate that an option has not been changed between 'initialize_options()' and 'finalize_options()'. Usually calle...
Set the values of any "undefined" options from corresponding option values in some other command object. "Undefined" here means "is None", which is the convention used to indicate that an option has not been changed between 'initialize_options()' and 'finalize_options()'. Usually calle...
[ "Set", "the", "values", "of", "any", "undefined", "options", "from", "corresponding", "option", "values", "in", "some", "other", "command", "object", ".", "Undefined", "here", "means", "is", "None", "which", "is", "the", "convention", "used", "to", "indicate",...
def set_undefined_options(self, src_cmd, *option_pairs): """Set the values of any "undefined" options from corresponding option values in some other command object. "Undefined" here means "is None", which is the convention used to indicate that an option has not been changed between 'in...
[ "def", "set_undefined_options", "(", "self", ",", "src_cmd", ",", "*", "option_pairs", ")", ":", "# Option_pairs: list of (src_option, dst_option) tuples", "src_cmd_obj", "=", "self", ".", "distribution", ".", "get_command_obj", "(", "src_cmd", ")", "src_cmd_obj", ".", ...
https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/x86/toolchain/lib/python2.7/distutils/cmd.py#L280-L302
ricardoquesada/Spidermonkey
4a75ea2543408bd1b2c515aa95901523eeef7858
python/mozbuild/mozbuild/frontend/sandbox.py
python
alphabetical_sorted
(iterable, cmp=None, key=lambda x: x.lower(), reverse=False)
return sorted(iterable, cmp, key, reverse)
sorted() replacement for the sandbox, ordering alphabetically by default.
sorted() replacement for the sandbox, ordering alphabetically by default.
[ "sorted", "()", "replacement", "for", "the", "sandbox", "ordering", "alphabetically", "by", "default", "." ]
def alphabetical_sorted(iterable, cmp=None, key=lambda x: x.lower(), reverse=False): """sorted() replacement for the sandbox, ordering alphabetically by default. """ return sorted(iterable, cmp, key, reverse)
[ "def", "alphabetical_sorted", "(", "iterable", ",", "cmp", "=", "None", ",", "key", "=", "lambda", "x", ":", "x", ".", "lower", "(", ")", ",", "reverse", "=", "False", ")", ":", "return", "sorted", "(", "iterable", ",", "cmp", ",", "key", ",", "rev...
https://github.com/ricardoquesada/Spidermonkey/blob/4a75ea2543408bd1b2c515aa95901523eeef7858/python/mozbuild/mozbuild/frontend/sandbox.py#L32-L37
CRYTEK/CRYENGINE
232227c59a220cbbd311576f0fbeba7bb53b2a8c
Editor/Python/windows/Lib/site-packages/setuptools/_vendor/pyparsing.py
python
withClass
(classname, namespace='')
return withAttribute(**{classattr : classname})
Simplified version of C{L{withAttribute}} when matching on a div class - made difficult because C{class} is a reserved word in Python. Example:: html = ''' <div> Some text <div class="grid">1 4 0 1 0</div> <div class="graph">1,3 2,3 1,1</div> ...
Simplified version of C{L{withAttribute}} when matching on a div class - made difficult because C{class} is a reserved word in Python.
[ "Simplified", "version", "of", "C", "{", "L", "{", "withAttribute", "}}", "when", "matching", "on", "a", "div", "class", "-", "made", "difficult", "because", "C", "{", "class", "}", "is", "a", "reserved", "word", "in", "Python", "." ]
def withClass(classname, namespace=''): """ Simplified version of C{L{withAttribute}} when matching on a div class - made difficult because C{class} is a reserved word in Python. Example:: html = ''' <div> Some text <div class="grid">1 4 0 1 0</div> ...
[ "def", "withClass", "(", "classname", ",", "namespace", "=", "''", ")", ":", "classattr", "=", "\"%s:class\"", "%", "namespace", "if", "namespace", "else", "\"class\"", "return", "withAttribute", "(", "*", "*", "{", "classattr", ":", "classname", "}", ")" ]
https://github.com/CRYTEK/CRYENGINE/blob/232227c59a220cbbd311576f0fbeba7bb53b2a8c/Editor/Python/windows/Lib/site-packages/setuptools/_vendor/pyparsing.py#L4997-L5030
mantidproject/mantid
03deeb89254ec4289edb8771e0188c2090a02f32
qt/python/mantidqt/mantidqt/widgets/colorbar/colorbar.py
python
ColorbarWidget.update_clim_text
(self)
Update displayed limit values based on stored ones
Update displayed limit values based on stored ones
[ "Update", "displayed", "limit", "values", "based", "on", "stored", "ones" ]
def update_clim_text(self): """ Update displayed limit values based on stored ones """ self.cmin.setText("{:.4}".format(self.cmin_value)) self.cmax.setText("{:.4}".format(self.cmax_value))
[ "def", "update_clim_text", "(", "self", ")", ":", "self", ".", "cmin", ".", "setText", "(", "\"{:.4}\"", ".", "format", "(", "self", ".", "cmin_value", ")", ")", "self", ".", "cmax", ".", "setText", "(", "\"{:.4}\"", ".", "format", "(", "self", ".", ...
https://github.com/mantidproject/mantid/blob/03deeb89254ec4289edb8771e0188c2090a02f32/qt/python/mantidqt/mantidqt/widgets/colorbar/colorbar.py#L271-L276
homenc/HElib
f0e3e010009c592cd411ba96baa8376eb485247a
misc/algen/algen.py
python
printTable
( headers, data, colwidths=None )
Print a nice table of possible algebras. Args: headers: A list/tuple of strings of column headers. data: An iterable of list/tuple to print as the row data. colwidths: A list/tuple of column widths to be used (forced min. of 8 spaces). Default 12 spaces if None given. Returns: ...
Print a nice table of possible algebras.
[ "Print", "a", "nice", "table", "of", "possible", "algebras", "." ]
def printTable( headers, data, colwidths=None ): """ Print a nice table of possible algebras. Args: headers: A list/tuple of strings of column headers. data: An iterable of list/tuple to print as the row data. colwidths: A list/tuple of column widths to be used (forced min. of 8 spaces). ...
[ "def", "printTable", "(", "headers", ",", "data", ",", "colwidths", "=", "None", ")", ":", "if", "colwidths", "==", "None", ":", "colwidths", "=", "[", "12", "]", "*", "len", "(", "headers", ")", "else", ":", "colwidths", "=", "[", "width", "+", "2...
https://github.com/homenc/HElib/blob/f0e3e010009c592cd411ba96baa8376eb485247a/misc/algen/algen.py#L140-L169
RLBot/RLBot
34332b12cf158b3ef8dbf174ae67c53683368a9d
src/main/python/rlbot/utils/file_util.py
python
get_python_root
()
return os.path.dirname(get_rlbot_directory())
Gets the path of the python root directory that rlbot lives in.
Gets the path of the python root directory that rlbot lives in.
[ "Gets", "the", "path", "of", "the", "python", "root", "directory", "that", "rlbot", "lives", "in", "." ]
def get_python_root() -> str: """Gets the path of the python root directory that rlbot lives in.""" return os.path.dirname(get_rlbot_directory())
[ "def", "get_python_root", "(", ")", "->", "str", ":", "return", "os", ".", "path", ".", "dirname", "(", "get_rlbot_directory", "(", ")", ")" ]
https://github.com/RLBot/RLBot/blob/34332b12cf158b3ef8dbf174ae67c53683368a9d/src/main/python/rlbot/utils/file_util.py#L8-L10
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Gems/CloudGemDefectReporter/v1/AWS/common-code/Lib/urllib3/poolmanager.py
python
ProxyManager.urlopen
(self, method, url, redirect=True, **kw)
return super(ProxyManager, self).urlopen(method, url, redirect=redirect, **kw)
Same as HTTP(S)ConnectionPool.urlopen, ``url`` must be absolute.
Same as HTTP(S)ConnectionPool.urlopen, ``url`` must be absolute.
[ "Same", "as", "HTTP", "(", "S", ")", "ConnectionPool", ".", "urlopen", "url", "must", "be", "absolute", "." ]
def urlopen(self, method, url, redirect=True, **kw): "Same as HTTP(S)ConnectionPool.urlopen, ``url`` must be absolute." u = parse_url(url) if u.scheme == "http": # For proxied HTTPS requests, httplib sets the necessary headers # on the CONNECT to the proxy. For HTTP, we'...
[ "def", "urlopen", "(", "self", ",", "method", ",", "url", ",", "redirect", "=", "True", ",", "*", "*", "kw", ")", ":", "u", "=", "parse_url", "(", "url", ")", "if", "u", ".", "scheme", "==", "\"http\"", ":", "# For proxied HTTPS requests, httplib sets th...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Gems/CloudGemDefectReporter/v1/AWS/common-code/Lib/urllib3/poolmanager.py#L425-L436
koth/kcws
88efbd36a7022de4e6e90f5a1fb880cf87cfae9f
third_party/python/cpplint/cpplint.py
python
_CppLintState.SetVerboseLevel
(self, level)
return last_verbose_level
Sets the module's verbosity, and returns the previous setting.
Sets the module's verbosity, and returns the previous setting.
[ "Sets", "the", "module", "s", "verbosity", "and", "returns", "the", "previous", "setting", "." ]
def SetVerboseLevel(self, level): """Sets the module's verbosity, and returns the previous setting.""" last_verbose_level = self.verbose_level self.verbose_level = level return last_verbose_level
[ "def", "SetVerboseLevel", "(", "self", ",", "level", ")", ":", "last_verbose_level", "=", "self", ".", "verbose_level", "self", ".", "verbose_level", "=", "level", "return", "last_verbose_level" ]
https://github.com/koth/kcws/blob/88efbd36a7022de4e6e90f5a1fb880cf87cfae9f/third_party/python/cpplint/cpplint.py#L779-L783
hfinkel/llvm-project-cxxjit
91084ef018240bbb8e24235ff5cd8c355a9c1a1e
llvm/utils/docker/scripts/llvm_checksum/project_tree.py
python
CreateLLVMProjects
(single_tree_checkout)
return projects
Returns a list of LLVMProject instances, describing relative paths of a typical LLVM checkout. Args: single_tree_checkout: When True, relative paths for each project points to a typical single source tree checkout. When False, relative paths for each projects points to a separate dire...
Returns a list of LLVMProject instances, describing relative paths of a typical LLVM checkout.
[ "Returns", "a", "list", "of", "LLVMProject", "instances", "describing", "relative", "paths", "of", "a", "typical", "LLVM", "checkout", "." ]
def CreateLLVMProjects(single_tree_checkout): """Returns a list of LLVMProject instances, describing relative paths of a typical LLVM checkout. Args: single_tree_checkout: When True, relative paths for each project points to a typical single source tree checkout. When False, relative paths ...
[ "def", "CreateLLVMProjects", "(", "single_tree_checkout", ")", ":", "# FIXME: cover all of llvm projects.", "# Projects that reside inside 'projects/' in a single source tree checkout.", "ORDINARY_PROJECTS", "=", "[", "\"compiler-rt\"", ",", "\"dragonegg\"", ",", "\"libcxx\"", ",", ...
https://github.com/hfinkel/llvm-project-cxxjit/blob/91084ef018240bbb8e24235ff5cd8c355a9c1a1e/llvm/utils/docker/scripts/llvm_checksum/project_tree.py#L56-L95
bumptop/BumpTop
466d23597a07ae738f4265262fa01087fc6e257c
trunk/win/Source/bin/jinja2/lexer.py
python
count_newlines
(value)
return len(newline_re.findall(value))
Count the number of newline characters in the string. This is useful for extensions that filter a stream.
Count the number of newline characters in the string. This is useful for extensions that filter a stream.
[ "Count", "the", "number", "of", "newline", "characters", "in", "the", "string", ".", "This", "is", "useful", "for", "extensions", "that", "filter", "a", "stream", "." ]
def count_newlines(value): """Count the number of newline characters in the string. This is useful for extensions that filter a stream. """ return len(newline_re.findall(value))
[ "def", "count_newlines", "(", "value", ")", ":", "return", "len", "(", "newline_re", ".", "findall", "(", "value", ")", ")" ]
https://github.com/bumptop/BumpTop/blob/466d23597a07ae738f4265262fa01087fc6e257c/trunk/win/Source/bin/jinja2/lexer.py#L142-L146
mantidproject/mantid
03deeb89254ec4289edb8771e0188c2090a02f32
qt/python/mantidqtinterfaces/mantidqtinterfaces/Muon/GUI/Common/corrections_tab_widget/dead_time_corrections_view.py
python
DeadTimeCorrectionsView.__init__
(self, parent: QWidget = None)
Initializes the DeadTimeCorrectionsView.
Initializes the DeadTimeCorrectionsView.
[ "Initializes", "the", "DeadTimeCorrectionsView", "." ]
def __init__(self, parent: QWidget = None): """Initializes the DeadTimeCorrectionsView.""" super(DeadTimeCorrectionsView, self).__init__(parent) self.setupUi(self) self.set_dead_time_workspace_selector_visible(False) self.set_dead_time_other_file_visible(False)
[ "def", "__init__", "(", "self", ",", "parent", ":", "QWidget", "=", "None", ")", ":", "super", "(", "DeadTimeCorrectionsView", ",", "self", ")", ".", "__init__", "(", "parent", ")", "self", ".", "setupUi", "(", "self", ")", "self", ".", "set_dead_time_wo...
https://github.com/mantidproject/mantid/blob/03deeb89254ec4289edb8771e0188c2090a02f32/qt/python/mantidqtinterfaces/mantidqtinterfaces/Muon/GUI/Common/corrections_tab_widget/dead_time_corrections_view.py#L24-L30
KratosMultiphysics/Kratos
0000833054ed0503424eb28205d6508d9ca6cbbc
applications/FluidDynamicsApplication/python_scripts/symbolic_generation/compressible_navier_stokes/src/symbolic_geometry.py
python
GeometryData.N_gauss
(self, i_gauss)
Returns the shape functions at a gauss point as a vertical vector
Returns the shape functions at a gauss point as a vertical vector
[ "Returns", "the", "shape", "functions", "at", "a", "gauss", "point", "as", "a", "vertical", "vector" ]
def N_gauss(self, i_gauss): "Returns the shape functions at a gauss point as a vertical vector" if self.symbolic_integration: return sympy.Matrix(self.N()[i_gauss, :]).T else: return self.N()
[ "def", "N_gauss", "(", "self", ",", "i_gauss", ")", ":", "if", "self", ".", "symbolic_integration", ":", "return", "sympy", ".", "Matrix", "(", "self", ".", "N", "(", ")", "[", "i_gauss", ",", ":", "]", ")", ".", "T", "else", ":", "return", "self",...
https://github.com/KratosMultiphysics/Kratos/blob/0000833054ed0503424eb28205d6508d9ca6cbbc/applications/FluidDynamicsApplication/python_scripts/symbolic_generation/compressible_navier_stokes/src/symbolic_geometry.py#L56-L61
cms-sw/cmssw
fd9de012d503d3405420bcbeec0ec879baa57cf2
FWCore/ParameterSet/python/Mixins.py
python
_TypedParameterizable.dumpPythonAttributes
(self, myname, options)
return result
dumps the object with all attributes declared after the constructor
dumps the object with all attributes declared after the constructor
[ "dumps", "the", "object", "with", "all", "attributes", "declared", "after", "the", "constructor" ]
def dumpPythonAttributes(self, myname, options): """ dumps the object with all attributes declared after the constructor""" result = "" for name in sorted(self.parameterNames_()): param = self.__dict__[name] result += options.indentation() + myname + "." + name + " = " + ...
[ "def", "dumpPythonAttributes", "(", "self", ",", "myname", ",", "options", ")", ":", "result", "=", "\"\"", "for", "name", "in", "sorted", "(", "self", ".", "parameterNames_", "(", ")", ")", ":", "param", "=", "self", ".", "__dict__", "[", "name", "]",...
https://github.com/cms-sw/cmssw/blob/fd9de012d503d3405420bcbeec0ec879baa57cf2/FWCore/ParameterSet/python/Mixins.py#L493-L499