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
mindspore-ai/mindspore
fb8fd3338605bb34fa5cea054e535a8b1d753fab
mindspore/python/mindspore/ops/_grad/grad_nn_ops.py
python
get_bprop_log_softmax
(self)
return bprop
Grad definition for `LogSoftmax` operation.
Grad definition for `LogSoftmax` operation.
[ "Grad", "definition", "for", "LogSoftmax", "operation", "." ]
def get_bprop_log_softmax(self): """Grad definition for `LogSoftmax` operation.""" logsoftmax_grad = G.LogSoftmaxGrad(self.axis) def bprop(x, out, dout): dx = logsoftmax_grad(out, dout) return (dx,) return bprop
[ "def", "get_bprop_log_softmax", "(", "self", ")", ":", "logsoftmax_grad", "=", "G", ".", "LogSoftmaxGrad", "(", "self", ".", "axis", ")", "def", "bprop", "(", "x", ",", "out", ",", "dout", ")", ":", "dx", "=", "logsoftmax_grad", "(", "out", ",", "dout"...
https://github.com/mindspore-ai/mindspore/blob/fb8fd3338605bb34fa5cea054e535a8b1d753fab/mindspore/python/mindspore/ops/_grad/grad_nn_ops.py#L578-L586
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/osx_cocoa/_core.py
python
GBPosition.SetRow
(*args, **kwargs)
return _core_.GBPosition_SetRow(*args, **kwargs)
SetRow(self, int row)
SetRow(self, int row)
[ "SetRow", "(", "self", "int", "row", ")" ]
def SetRow(*args, **kwargs): """SetRow(self, int row)""" return _core_.GBPosition_SetRow(*args, **kwargs)
[ "def", "SetRow", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_core_", ".", "GBPosition_SetRow", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_cocoa/_core.py#L15584-L15586
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/difflib.py
python
SequenceMatcher.get_grouped_opcodes
(self, n=3)
Isolate change clusters by eliminating ranges with no changes. Return a generator of groups with up to n lines of context. Each group is in the same format as returned by get_opcodes(). >>> from pprint import pprint >>> a = list(map(str, range(1,40))) >>> b = a[:] >>> b...
Isolate change clusters by eliminating ranges with no changes.
[ "Isolate", "change", "clusters", "by", "eliminating", "ranges", "with", "no", "changes", "." ]
def get_grouped_opcodes(self, n=3): """ Isolate change clusters by eliminating ranges with no changes. Return a generator of groups with up to n lines of context. Each group is in the same format as returned by get_opcodes(). >>> from pprint import pprint >>> a = list(map(str, ...
[ "def", "get_grouped_opcodes", "(", "self", ",", "n", "=", "3", ")", ":", "codes", "=", "self", ".", "get_opcodes", "(", ")", "if", "not", "codes", ":", "codes", "=", "[", "(", "\"equal\"", ",", "0", ",", "1", ",", "0", ",", "1", ")", "]", "# Fi...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/difflib.py#L572-L620
hpi-xnor/BMXNet-v2
af2b1859eafc5c721b1397cef02f946aaf2ce20d
example/cnn_chinese_text_classification/data_helpers.py
python
clean_str
(string)
return string.strip().lower()
Tokenization/string cleaning for all datasets except for SST. Original taken from https://github.com/yoonkim/CNN_sentence/blob/master/process_data.py
Tokenization/string cleaning for all datasets except for SST. Original taken from https://github.com/yoonkim/CNN_sentence/blob/master/process_data.py
[ "Tokenization", "/", "string", "cleaning", "for", "all", "datasets", "except", "for", "SST", ".", "Original", "taken", "from", "https", ":", "//", "github", ".", "com", "/", "yoonkim", "/", "CNN_sentence", "/", "blob", "/", "master", "/", "process_data", "...
def clean_str(string): """Tokenization/string cleaning for all datasets except for SST. Original taken from https://github.com/yoonkim/CNN_sentence/blob/master/process_data.py """ string = re.sub(r"[^A-Za-z0-9(),!?\'\`]", " ", string) string = re.sub(r"\'s", " \'s", string) string = re.sub(r"\'v...
[ "def", "clean_str", "(", "string", ")", ":", "string", "=", "re", ".", "sub", "(", "r\"[^A-Za-z0-9(),!?\\'\\`]\"", ",", "\" \"", ",", "string", ")", "string", "=", "re", ".", "sub", "(", "r\"\\'s\"", ",", "\" \\'s\"", ",", "string", ")", "string", "=", ...
https://github.com/hpi-xnor/BMXNet-v2/blob/af2b1859eafc5c721b1397cef02f946aaf2ce20d/example/cnn_chinese_text_classification/data_helpers.py#L31-L48
apple/swift-lldb
d74be846ef3e62de946df343e8c234bde93a8912
scripts/Python/static-binding/lldb.py
python
SBBreakpointLocation.GetBreakpoint
(self)
return _lldb.SBBreakpointLocation_GetBreakpoint(self)
GetBreakpoint(SBBreakpointLocation self) -> SBBreakpoint
GetBreakpoint(SBBreakpointLocation self) -> SBBreakpoint
[ "GetBreakpoint", "(", "SBBreakpointLocation", "self", ")", "-", ">", "SBBreakpoint" ]
def GetBreakpoint(self): """GetBreakpoint(SBBreakpointLocation self) -> SBBreakpoint""" return _lldb.SBBreakpointLocation_GetBreakpoint(self)
[ "def", "GetBreakpoint", "(", "self", ")", ":", "return", "_lldb", ".", "SBBreakpointLocation_GetBreakpoint", "(", "self", ")" ]
https://github.com/apple/swift-lldb/blob/d74be846ef3e62de946df343e8c234bde93a8912/scripts/Python/static-binding/lldb.py#L2133-L2135
LiquidPlayer/LiquidCore
9405979363f2353ac9a71ad8ab59685dd7f919c9
deps/node-10.15.3/tools/gyp/pylib/gyp/msvs_emulation.py
python
MsvsSettings.GetCompilerPdbName
(self, config, expand_special)
return pdbname
Get the pdb file name that should be used for compiler invocations, or None if there's no explicit name specified.
Get the pdb file name that should be used for compiler invocations, or None if there's no explicit name specified.
[ "Get", "the", "pdb", "file", "name", "that", "should", "be", "used", "for", "compiler", "invocations", "or", "None", "if", "there", "s", "no", "explicit", "name", "specified", "." ]
def GetCompilerPdbName(self, config, expand_special): """Get the pdb file name that should be used for compiler invocations, or None if there's no explicit name specified.""" config = self._TargetConfig(config) pdbname = self._Setting( ('VCCLCompilerTool', 'ProgramDataBaseFileName'), config) ...
[ "def", "GetCompilerPdbName", "(", "self", ",", "config", ",", "expand_special", ")", ":", "config", "=", "self", ".", "_TargetConfig", "(", "config", ")", "pdbname", "=", "self", ".", "_Setting", "(", "(", "'VCCLCompilerTool'", ",", "'ProgramDataBaseFileName'", ...
https://github.com/LiquidPlayer/LiquidCore/blob/9405979363f2353ac9a71ad8ab59685dd7f919c9/deps/node-10.15.3/tools/gyp/pylib/gyp/msvs_emulation.py#L371-L379
GoSSIP-SJTU/TripleDoggy
03648d6b19c812504b14e8b98c8c7b3f443f4e54
tools/clang/bindings/python/clang/cindex.py
python
Type.translation_unit
(self)
return self._tu
The TranslationUnit to which this Type is associated.
The TranslationUnit to which this Type is associated.
[ "The", "TranslationUnit", "to", "which", "this", "Type", "is", "associated", "." ]
def translation_unit(self): """The TranslationUnit to which this Type is associated.""" # If this triggers an AttributeError, the instance was not properly # instantiated. return self._tu
[ "def", "translation_unit", "(", "self", ")", ":", "# If this triggers an AttributeError, the instance was not properly", "# instantiated.", "return", "self", ".", "_tu" ]
https://github.com/GoSSIP-SJTU/TripleDoggy/blob/03648d6b19c812504b14e8b98c8c7b3f443f4e54/tools/clang/bindings/python/clang/cindex.py#L2230-L2234
metashell/metashell
f4177e4854ea00c8dbc722cadab26ef413d798ea
3rd/templight/clang/bindings/python/clang/cindex.py
python
Type.is_pod
(self)
return conf.lib.clang_isPODType(self)
Determine whether this Type represents plain old data (POD).
Determine whether this Type represents plain old data (POD).
[ "Determine", "whether", "this", "Type", "represents", "plain", "old", "data", "(", "POD", ")", "." ]
def is_pod(self): """Determine whether this Type represents plain old data (POD).""" return conf.lib.clang_isPODType(self)
[ "def", "is_pod", "(", "self", ")", ":", "return", "conf", ".", "lib", ".", "clang_isPODType", "(", "self", ")" ]
https://github.com/metashell/metashell/blob/f4177e4854ea00c8dbc722cadab26ef413d798ea/3rd/templight/clang/bindings/python/clang/cindex.py#L2332-L2334
tiann/android-native-debug
198903ed9346dc4a74327a63cb98d449b97d8047
app/source/art/tools/cpplint.py
python
CleanseComments
(line)
return _RE_PATTERN_CLEANSE_LINE_C_COMMENTS.sub('', line)
Removes //-comments and single-line C-style /* */ comments. Args: line: A line of C++ source. Returns: The line with single-line comments removed.
Removes //-comments and single-line C-style /* */ comments.
[ "Removes", "//", "-", "comments", "and", "single", "-", "line", "C", "-", "style", "/", "*", "*", "/", "comments", "." ]
def CleanseComments(line): """Removes //-comments and single-line C-style /* */ comments. Args: line: A line of C++ source. Returns: The line with single-line comments removed. """ commentpos = line.find('//') if commentpos != -1 and not IsCppString(line[:commentpos]): line = line[:commentpos]...
[ "def", "CleanseComments", "(", "line", ")", ":", "commentpos", "=", "line", ".", "find", "(", "'//'", ")", "if", "commentpos", "!=", "-", "1", "and", "not", "IsCppString", "(", "line", "[", ":", "commentpos", "]", ")", ":", "line", "=", "line", "[", ...
https://github.com/tiann/android-native-debug/blob/198903ed9346dc4a74327a63cb98d449b97d8047/app/source/art/tools/cpplint.py#L977-L990
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/osx_cocoa/_core.py
python
Window.GetThemeEnabled
(*args, **kwargs)
return _core_.Window_GetThemeEnabled(*args, **kwargs)
GetThemeEnabled(self) -> bool Return the themeEnabled flag.
GetThemeEnabled(self) -> bool
[ "GetThemeEnabled", "(", "self", ")", "-", ">", "bool" ]
def GetThemeEnabled(*args, **kwargs): """ GetThemeEnabled(self) -> bool Return the themeEnabled flag. """ return _core_.Window_GetThemeEnabled(*args, **kwargs)
[ "def", "GetThemeEnabled", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_core_", ".", "Window_GetThemeEnabled", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_cocoa/_core.py#L10115-L10121
zhaoweicai/hwgq
ebc706bee3e2d145de1da4be446ce8de8740738f
python/caffe/io.py
python
Transformer.deprocess
(self, in_, data)
return decaf_in
Invert Caffe formatting; see preprocess().
Invert Caffe formatting; see preprocess().
[ "Invert", "Caffe", "formatting", ";", "see", "preprocess", "()", "." ]
def deprocess(self, in_, data): """ Invert Caffe formatting; see preprocess(). """ self.__check_input(in_) decaf_in = data.copy().squeeze() transpose = self.transpose.get(in_) channel_swap = self.channel_swap.get(in_) raw_scale = self.raw_scale.get(in_) ...
[ "def", "deprocess", "(", "self", ",", "in_", ",", "data", ")", ":", "self", ".", "__check_input", "(", "in_", ")", "decaf_in", "=", "data", ".", "copy", "(", ")", ".", "squeeze", "(", ")", "transpose", "=", "self", ".", "transpose", ".", "get", "("...
https://github.com/zhaoweicai/hwgq/blob/ebc706bee3e2d145de1da4be446ce8de8740738f/python/caffe/io.py#L164-L185
SFTtech/openage
d6a08c53c48dc1e157807471df92197f6ca9e04d
openage/convert/processor/conversion/aoc/media_subprocessor.py
python
AoCMediaSubprocessor.create_sound_requests
(full_data_set)
Create export requests for sounds referenced by CombinedSound objects.
Create export requests for sounds referenced by CombinedSound objects.
[ "Create", "export", "requests", "for", "sounds", "referenced", "by", "CombinedSound", "objects", "." ]
def create_sound_requests(full_data_set): """ Create export requests for sounds referenced by CombinedSound objects. """ combined_sounds = full_data_set.combined_sounds.values() for sound in combined_sounds: sound_id = sound.get_file_id() targetdir = sou...
[ "def", "create_sound_requests", "(", "full_data_set", ")", ":", "combined_sounds", "=", "full_data_set", ".", "combined_sounds", ".", "values", "(", ")", "for", "sound", "in", "combined_sounds", ":", "sound_id", "=", "sound", ".", "get_file_id", "(", ")", "targe...
https://github.com/SFTtech/openage/blob/d6a08c53c48dc1e157807471df92197f6ca9e04d/openage/convert/processor/conversion/aoc/media_subprocessor.py#L129-L147
echronos/echronos
c996f1d2c8af6c6536205eb319c1bf1d4d84569c
prj/app/prj.py
python
pystache_render
(file_in, file_out, config)
Render a pystache template. file_in is the input file path. file_out is the output file path. config is a dictionary with the context data. Note: this function will create any directories neccessary to enable writing of the output file.
Render a pystache template. file_in is the input file path. file_out is the output file path. config is a dictionary with the context data.
[ "Render", "a", "pystache", "template", ".", "file_in", "is", "the", "input", "file", "path", ".", "file_out", "is", "the", "output", "file", "path", ".", "config", "is", "a", "dictionary", "with", "the", "context", "data", "." ]
def pystache_render(file_in, file_out, config): """Render a pystache template. file_in is the input file path. file_out is the output file path. config is a dictionary with the context data. Note: this function will create any directories neccessary to enable writing of the output file. """ ...
[ "def", "pystache_render", "(", "file_in", ",", "file_out", ",", "config", ")", ":", "renderer", "=", "pystache", ".", "renderer", ".", "Renderer", "(", ")", "renderer", ".", "register_formatter", "(", "'u'", ",", "lambda", "x", ":", "x", ".", "upper", "(...
https://github.com/echronos/echronos/blob/c996f1d2c8af6c6536205eb319c1bf1d4d84569c/prj/app/prj.py#L110-L136
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/pandas/py3/pandas/io/pytables.py
python
HDFStore.get
(self, key: str)
Retrieve pandas object stored in file. Parameters ---------- key : str Returns ------- object Same type as object stored in file.
Retrieve pandas object stored in file.
[ "Retrieve", "pandas", "object", "stored", "in", "file", "." ]
def get(self, key: str): """ Retrieve pandas object stored in file. Parameters ---------- key : str Returns ------- object Same type as object stored in file. """ with patch_pickle(): # GH#31167 Without this patch,...
[ "def", "get", "(", "self", ",", "key", ":", "str", ")", ":", "with", "patch_pickle", "(", ")", ":", "# GH#31167 Without this patch, pickle doesn't know how to unpickle", "# old DateOffset objects now that they are cdef classes.", "group", "=", "self", ".", "get_node", "(...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/pandas/py3/pandas/io/pytables.py#L781-L800
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/tools/python/src/Parser/asdl_c.py
python
get_c_type
(name)
Return a string for the C name of the type. This function special cases the default types provided by asdl: identifier, string, int, bool.
Return a string for the C name of the type.
[ "Return", "a", "string", "for", "the", "C", "name", "of", "the", "type", "." ]
def get_c_type(name): """Return a string for the C name of the type. This function special cases the default types provided by asdl: identifier, string, int, bool. """ # XXX ack! need to figure out where Id is useful and where string if isinstance(name, asdl.Id): name = name.value ...
[ "def", "get_c_type", "(", "name", ")", ":", "# XXX ack! need to figure out where Id is useful and where string", "if", "isinstance", "(", "name", ",", "asdl", ".", "Id", ")", ":", "name", "=", "name", ".", "value", "if", "name", "in", "asdl", ".", "builtin_type...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/tools/python/src/Parser/asdl_c.py#L14-L26
mongodb/mongo
d8ff665343ad29cf286ee2cf4a1960d29371937b
buildscripts/resmokelib/powercycle/powercycle.py
python
print_uptime
()
Print the last time the system was booted, and the uptime (in seconds).
Print the last time the system was booted, and the uptime (in seconds).
[ "Print", "the", "last", "time", "the", "system", "was", "booted", "and", "the", "uptime", "(", "in", "seconds", ")", "." ]
def print_uptime(): """Print the last time the system was booted, and the uptime (in seconds).""" boot_time_epoch = psutil.boot_time() boot_time = datetime.datetime.fromtimestamp(boot_time_epoch).strftime('%Y-%m-%d %H:%M:%S.%f') uptime = int(time.time() - boot_time_epoch) LOGGER.info("System was las...
[ "def", "print_uptime", "(", ")", ":", "boot_time_epoch", "=", "psutil", ".", "boot_time", "(", ")", "boot_time", "=", "datetime", ".", "datetime", ".", "fromtimestamp", "(", "boot_time_epoch", ")", ".", "strftime", "(", "'%Y-%m-%d %H:%M:%S.%f'", ")", "uptime", ...
https://github.com/mongodb/mongo/blob/d8ff665343ad29cf286ee2cf4a1960d29371937b/buildscripts/resmokelib/powercycle/powercycle.py#L557-L562
intel/llvm
e6d0547e9d99b5a56430c4749f6c7e328bf221ab
third-party/benchmark/setup.py
python
BuildBazelExtension.bazel_build
(self, ext)
Runs the bazel build to create the package.
Runs the bazel build to create the package.
[ "Runs", "the", "bazel", "build", "to", "create", "the", "package", "." ]
def bazel_build(self, ext): """Runs the bazel build to create the package.""" with open("WORKSPACE", "r") as workspace: workspace_contents = workspace.read() with open("WORKSPACE", "w") as workspace: workspace.write( re.sub( r'(?<=path...
[ "def", "bazel_build", "(", "self", ",", "ext", ")", ":", "with", "open", "(", "\"WORKSPACE\"", ",", "\"r\"", ")", "as", "workspace", ":", "workspace_contents", "=", "workspace", ".", "read", "(", ")", "with", "open", "(", "\"WORKSPACE\"", ",", "\"w\"", "...
https://github.com/intel/llvm/blob/e6d0547e9d99b5a56430c4749f6c7e328bf221ab/third-party/benchmark/setup.py#L64-L107
llvm/llvm-project
ffa6262cb4e2a335d26416fad39a581b4f98c5f4
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/llvm/llvm-project/blob/ffa6262cb4e2a335d26416fad39a581b4f98c5f4/llvm/utils/docker/scripts/llvm_checksum/project_tree.py#L56-L95
mantidproject/mantid
03deeb89254ec4289edb8771e0188c2090a02f32
qt/python/mantidqtinterfaces/mantidqtinterfaces/Muon/GUI/Common/corrections_tab_widget/background_corrections_model.py
python
BackgroundCorrectionsModel.is_background_mode_auto
(self)
return self._corrections_context.background_corrections_mode == BACKGROUND_MODE_AUTO
Returns true if the current background correction mode is auto.
Returns true if the current background correction mode is auto.
[ "Returns", "true", "if", "the", "current", "background", "correction", "mode", "is", "auto", "." ]
def is_background_mode_auto(self) -> bool: """Returns true if the current background correction mode is auto.""" return self._corrections_context.background_corrections_mode == BACKGROUND_MODE_AUTO
[ "def", "is_background_mode_auto", "(", "self", ")", "->", "bool", ":", "return", "self", ".", "_corrections_context", ".", "background_corrections_mode", "==", "BACKGROUND_MODE_AUTO" ]
https://github.com/mantidproject/mantid/blob/03deeb89254ec4289edb8771e0188c2090a02f32/qt/python/mantidqtinterfaces/mantidqtinterfaces/Muon/GUI/Common/corrections_tab_widget/background_corrections_model.py#L208-L210
google/syzygy
8164b24ebde9c5649c9a09e88a7fc0b0fcbd1bc5
third_party/numpy/files/numpy/ma/core.py
python
size
(obj, axis=None)
return np.size(getdata(obj), axis)
maskedarray version of the numpy function.
maskedarray version of the numpy function.
[ "maskedarray", "version", "of", "the", "numpy", "function", "." ]
def size(obj, axis=None): "maskedarray version of the numpy function." return np.size(getdata(obj), axis)
[ "def", "size", "(", "obj", ",", "axis", "=", "None", ")", ":", "return", "np", ".", "size", "(", "getdata", "(", "obj", ")", ",", "axis", ")" ]
https://github.com/google/syzygy/blob/8164b24ebde9c5649c9a09e88a7fc0b0fcbd1bc5/third_party/numpy/files/numpy/ma/core.py#L6480-L6482
Xilinx/Vitis-AI
fc74d404563d9951b57245443c73bef389f3657f
tools/Vitis-AI-Quantizer/vai_q_tensorflow1.x/tensorflow/python/autograph/operators/slices.py
python
set_item
(target, i, x)
The slice write operator (i.e. __setitem__). Note: it is unspecified whether target will be mutated or not. In general, if target is mutable (like Python lists), it will be mutated. Args: target: An entity that supports setitem semantics. i: Index to modify. x: The new element value. Returns: ...
The slice write operator (i.e. __setitem__).
[ "The", "slice", "write", "operator", "(", "i", ".", "e", ".", "__setitem__", ")", "." ]
def set_item(target, i, x): """The slice write operator (i.e. __setitem__). Note: it is unspecified whether target will be mutated or not. In general, if target is mutable (like Python lists), it will be mutated. Args: target: An entity that supports setitem semantics. i: Index to modify. x: The n...
[ "def", "set_item", "(", "target", ",", "i", ",", "x", ")", ":", "if", "isinstance", "(", "target", ",", "tensor_array_ops", ".", "TensorArray", ")", ":", "return", "_tf_tensorarray_set_item", "(", "target", ",", "i", ",", "x", ")", "elif", "tensor_util", ...
https://github.com/Xilinx/Vitis-AI/blob/fc74d404563d9951b57245443c73bef389f3657f/tools/Vitis-AI-Quantizer/vai_q_tensorflow1.x/tensorflow/python/autograph/operators/slices.py#L100-L125
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/windows/Lib/site-packages/pip/_vendor/distlib/database.py
python
DependencyGraph.to_dot
(self, f, skip_disconnected=True)
Writes a DOT output for the graph to the provided file *f*. If *skip_disconnected* is set to ``True``, then all distributions that are not dependent on any other distribution are skipped. :type f: has to support ``file``-like operations :type skip_disconnected: ``bool``
Writes a DOT output for the graph to the provided file *f*.
[ "Writes", "a", "DOT", "output", "for", "the", "graph", "to", "the", "provided", "file", "*", "f", "*", "." ]
def to_dot(self, f, skip_disconnected=True): """Writes a DOT output for the graph to the provided file *f*. If *skip_disconnected* is set to ``True``, then all distributions that are not dependent on any other distribution are skipped. :type f: has to support ``file``-like operations ...
[ "def", "to_dot", "(", "self", ",", "f", ",", "skip_disconnected", "=", "True", ")", ":", "disconnected", "=", "[", "]", "f", ".", "write", "(", "\"digraph dependencies {\\n\"", ")", "for", "dist", ",", "adjs", "in", "self", ".", "adjacency_list", ".", "i...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/windows/Lib/site-packages/pip/_vendor/distlib/database.py#L1154-L1184
google-ar/WebARonTango
e86965d2cbc652156b480e0fcf77c716745578cd
chromium/src/gpu/command_buffer/build_gles2_cmd_buffer.py
python
SplitWords
(input_string)
Split by '_' if found, otherwise split at uppercase/numeric chars. Will split "some_TEXT" into ["some", "TEXT"], "CamelCase" into ["Camel", "Case"], and "Vector3" into ["Vector", "3"].
Split by '_' if found, otherwise split at uppercase/numeric chars.
[ "Split", "by", "_", "if", "found", "otherwise", "split", "at", "uppercase", "/", "numeric", "chars", "." ]
def SplitWords(input_string): """Split by '_' if found, otherwise split at uppercase/numeric chars. Will split "some_TEXT" into ["some", "TEXT"], "CamelCase" into ["Camel", "Case"], and "Vector3" into ["Vector", "3"]. """ if input_string.find('_') > -1: # 'some_TEXT_' -> 'some TEXT' return input_stri...
[ "def", "SplitWords", "(", "input_string", ")", ":", "if", "input_string", ".", "find", "(", "'_'", ")", ">", "-", "1", ":", "# 'some_TEXT_' -> 'some TEXT'", "return", "input_string", ".", "replace", "(", "'_'", ",", "' '", ")", ".", "strip", "(", ")", "....
https://github.com/google-ar/WebARonTango/blob/e86965d2cbc652156b480e0fcf77c716745578cd/chromium/src/gpu/command_buffer/build_gles2_cmd_buffer.py#L4575-L4592
google/sling
f408a148a06bc2d62e853a292a8ba7266c642839
python/task/workflow.py
python
Task.attach_input
(self, name, resource)
Attach named input resource(s) to task.
Attach named input resource(s) to task.
[ "Attach", "named", "input", "resource", "(", "s", ")", "to", "task", "." ]
def attach_input(self, name, resource): """Attach named input resource(s) to task.""" if isinstance(resource, list): for r in resource: self.inputs.append(Binding(name, r)) else: self.inputs.append(Binding(name, resource))
[ "def", "attach_input", "(", "self", ",", "name", ",", "resource", ")", ":", "if", "isinstance", "(", "resource", ",", "list", ")", ":", "for", "r", "in", "resource", ":", "self", ".", "inputs", ".", "append", "(", "Binding", "(", "name", ",", "r", ...
https://github.com/google/sling/blob/f408a148a06bc2d62e853a292a8ba7266c642839/python/task/workflow.py#L206-L211
BlzFans/wke
b0fa21158312e40c5fbd84682d643022b6c34a93
cygwin/lib/python2.6/imaplib.py
python
IMAP4.copy
(self, message_set, new_mailbox)
return self._simple_command('COPY', message_set, new_mailbox)
Copy 'message_set' messages onto end of 'new_mailbox'. (typ, [data]) = <instance>.copy(message_set, new_mailbox)
Copy 'message_set' messages onto end of 'new_mailbox'.
[ "Copy", "message_set", "messages", "onto", "end", "of", "new_mailbox", "." ]
def copy(self, message_set, new_mailbox): """Copy 'message_set' messages onto end of 'new_mailbox'. (typ, [data]) = <instance>.copy(message_set, new_mailbox) """ return self._simple_command('COPY', message_set, new_mailbox)
[ "def", "copy", "(", "self", ",", "message_set", ",", "new_mailbox", ")", ":", "return", "self", ".", "_simple_command", "(", "'COPY'", ",", "message_set", ",", "new_mailbox", ")" ]
https://github.com/BlzFans/wke/blob/b0fa21158312e40c5fbd84682d643022b6c34a93/cygwin/lib/python2.6/imaplib.py#L381-L386
RobotLocomotion/drake
0e18a34604c45ed65bc9018a54f7610f91cdad5b
common/proto/call_python_client.py
python
default_globals
()
return _merge_dicts( globals(), plt.__dict__, pylab.__dict__, locals())
Creates default globals for code that the client side can execute. This is geared for convenient (not necessarily efficient) plotting with `matplotlib`.
Creates default globals for code that the client side can execute.
[ "Creates", "default", "globals", "for", "code", "that", "the", "client", "side", "can", "execute", "." ]
def default_globals(): """Creates default globals for code that the client side can execute. This is geared for convenient (not necessarily efficient) plotting with `matplotlib`. """ # @note This imports modules at a function-scope rather than at a # module-scope, which does not satisfy PEP8. T...
[ "def", "default_globals", "(", ")", ":", "# @note This imports modules at a function-scope rather than at a", "# module-scope, which does not satisfy PEP8. This is intentional, as it", "# allows for a cleaner scope separation between the client core code (e.g.", "# `CallPythonClient`) and the client...
https://github.com/RobotLocomotion/drake/blob/0e18a34604c45ed65bc9018a54f7610f91cdad5b/common/proto/call_python_client.py#L172-L279
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/scipy/scipy/signal/ltisys.py
python
StateSpace.__repr__
(self)
return '{0}(\n{1},\n{2},\n{3},\n{4},\ndt: {5}\n)'.format( self.__class__.__name__, repr(self.A), repr(self.B), repr(self.C), repr(self.D), repr(self.dt), )
Return representation of the `StateSpace` system.
Return representation of the `StateSpace` system.
[ "Return", "representation", "of", "the", "StateSpace", "system", "." ]
def __repr__(self): """Return representation of the `StateSpace` system.""" return '{0}(\n{1},\n{2},\n{3},\n{4},\ndt: {5}\n)'.format( self.__class__.__name__, repr(self.A), repr(self.B), repr(self.C), repr(self.D), repr(self.dt), ...
[ "def", "__repr__", "(", "self", ")", ":", "return", "'{0}(\\n{1},\\n{2},\\n{3},\\n{4},\\ndt: {5}\\n)'", ".", "format", "(", "self", ".", "__class__", ".", "__name__", ",", "repr", "(", "self", ".", "A", ")", ",", "repr", "(", "self", ".", "B", ")", ",", ...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/scipy/scipy/signal/ltisys.py#L1499-L1508
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Gems/CloudGemFramework/v1/AWS/common-code/lib/OpenSSL/crypto.py
python
X509.set_pubkey
(self, pkey)
Set the public key of the certificate. :param pkey: The public key. :type pkey: :py:class:`PKey` :return: :py:data:`None`
Set the public key of the certificate.
[ "Set", "the", "public", "key", "of", "the", "certificate", "." ]
def set_pubkey(self, pkey): """ Set the public key of the certificate. :param pkey: The public key. :type pkey: :py:class:`PKey` :return: :py:data:`None` """ if not isinstance(pkey, PKey): raise TypeError("pkey must be a PKey instance") set_...
[ "def", "set_pubkey", "(", "self", ",", "pkey", ")", ":", "if", "not", "isinstance", "(", "pkey", ",", "PKey", ")", ":", "raise", "TypeError", "(", "\"pkey must be a PKey instance\"", ")", "set_result", "=", "_lib", ".", "X509_set_pubkey", "(", "self", ".", ...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Gems/CloudGemFramework/v1/AWS/common-code/lib/OpenSSL/crypto.py#L1141-L1154
Komnomnomnom/swigibpy
cfd307fdbfaffabc69a2dc037538d7e34a8b8daf
swigibpy.py
python
EWrapper.tickPrice
(self, tickerId, field, price, canAutoExecute)
return _swigibpy.EWrapper_tickPrice(self, tickerId, field, price, canAutoExecute)
tickPrice(EWrapper self, TickerId tickerId, TickType field, double price, int canAutoExecute)
tickPrice(EWrapper self, TickerId tickerId, TickType field, double price, int canAutoExecute)
[ "tickPrice", "(", "EWrapper", "self", "TickerId", "tickerId", "TickType", "field", "double", "price", "int", "canAutoExecute", ")" ]
def tickPrice(self, tickerId, field, price, canAutoExecute): """tickPrice(EWrapper self, TickerId tickerId, TickType field, double price, int canAutoExecute)""" return _swigibpy.EWrapper_tickPrice(self, tickerId, field, price, canAutoExecute)
[ "def", "tickPrice", "(", "self", ",", "tickerId", ",", "field", ",", "price", ",", "canAutoExecute", ")", ":", "return", "_swigibpy", ".", "EWrapper_tickPrice", "(", "self", ",", "tickerId", ",", "field", ",", "price", ",", "canAutoExecute", ")" ]
https://github.com/Komnomnomnom/swigibpy/blob/cfd307fdbfaffabc69a2dc037538d7e34a8b8daf/swigibpy.py#L2421-L2423
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/msw/_gdi.py
python
DC.DrawLineList
(self, lines, pens=None)
return self._DrawLineList(lines, pens, [])
Draw a list of lines as quickly as possible. :param lines: A sequence of 4-element sequences representing each line to draw, (x1,y1, x2,y2). :param pens: If None, then the current pen is used. If a single pen then it will be used for ...
Draw a list of lines as quickly as possible.
[ "Draw", "a", "list", "of", "lines", "as", "quickly", "as", "possible", "." ]
def DrawLineList(self, lines, pens=None): """ Draw a list of lines as quickly as possible. :param lines: A sequence of 4-element sequences representing each line to draw, (x1,y1, x2,y2). :param pens: If None, then the current pen is used. If a ...
[ "def", "DrawLineList", "(", "self", ",", "lines", ",", "pens", "=", "None", ")", ":", "if", "pens", "is", "None", ":", "pens", "=", "[", "]", "elif", "isinstance", "(", "pens", ",", "wx", ".", "Pen", ")", ":", "pens", "=", "[", "pens", "]", "el...
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/msw/_gdi.py#L4784-L4801
zhaoweicai/hwgq
ebc706bee3e2d145de1da4be446ce8de8740738f
scripts/cpp_lint.py
python
_NestingState.CheckCompletedBlocks
(self, filename, error)
Checks that all classes and namespaces have been completely parsed. Call this when all lines in a file have been processed. Args: filename: The name of the current file. error: The function to call with any errors found.
Checks that all classes and namespaces have been completely parsed.
[ "Checks", "that", "all", "classes", "and", "namespaces", "have", "been", "completely", "parsed", "." ]
def CheckCompletedBlocks(self, filename, error): """Checks that all classes and namespaces have been completely parsed. Call this when all lines in a file have been processed. Args: filename: The name of the current file. error: The function to call with any errors found. """ # Note: Th...
[ "def", "CheckCompletedBlocks", "(", "self", ",", "filename", ",", "error", ")", ":", "# Note: This test can result in false positives if #ifdef constructs", "# get in the way of brace matching. See the testBuildClass test in", "# cpplint_unittest.py for an example of this.", "for", "obj"...
https://github.com/zhaoweicai/hwgq/blob/ebc706bee3e2d145de1da4be446ce8de8740738f/scripts/cpp_lint.py#L2172-L2191
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/scipy/py2/scipy/stats/stats.py
python
weightedtau
(x, y, rank=True, weigher=None, additive=True)
return WeightedTauResult(_weightedrankedtau(x, y, rank, weigher, additive), np.nan)
r""" Compute a weighted version of Kendall's :math:`\tau`. The weighted :math:`\tau` is a weighted version of Kendall's :math:`\tau` in which exchanges of high weight are more influential than exchanges of low weight. The default parameters compute the additive hyperbolic version of the index, :mat...
r""" Compute a weighted version of Kendall's :math:`\tau`.
[ "r", "Compute", "a", "weighted", "version", "of", "Kendall", "s", ":", "math", ":", "\\", "tau", "." ]
def weightedtau(x, y, rank=True, weigher=None, additive=True): r""" Compute a weighted version of Kendall's :math:`\tau`. The weighted :math:`\tau` is a weighted version of Kendall's :math:`\tau` in which exchanges of high weight are more influential than exchanges of low weight. The default parame...
[ "def", "weightedtau", "(", "x", ",", "y", ",", "rank", "=", "True", ",", "weigher", "=", "None", ",", "additive", "=", "True", ")", ":", "x", "=", "np", ".", "asarray", "(", "x", ")", ".", "ravel", "(", ")", "y", "=", "np", ".", "asarray", "(...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/scipy/py2/scipy/stats/stats.py#L3700-L3872
bh107/bohrium
5b83e7117285fefc7779ed0e9acb0f8e74c7e068
bridge/npbackend/bohrium/disk_io.py
python
load
(file, mmap_mode=None, allow_pickle=True, fix_imports=True, encoding='ASCII', bohrium=True)
Load arrays or pickled objects from ``.npy``, ``.npz`` or pickled files. Parameters ---------- file : file-like object or string The file to read. File-like objects must support the ``seek()`` and ``read()`` methods. Pickled files require that the file-like object support the ``read...
Load arrays or pickled objects from ``.npy``, ``.npz`` or pickled files.
[ "Load", "arrays", "or", "pickled", "objects", "from", ".", "npy", ".", "npz", "or", "pickled", "files", "." ]
def load(file, mmap_mode=None, allow_pickle=True, fix_imports=True, encoding='ASCII', bohrium=True): """ Load arrays or pickled objects from ``.npy``, ``.npz`` or pickled files. Parameters ---------- file : file-like object or string The file to read. File-like objects must support the ...
[ "def", "load", "(", "file", ",", "mmap_mode", "=", "None", ",", "allow_pickle", "=", "True", ",", "fix_imports", "=", "True", ",", "encoding", "=", "'ASCII'", ",", "bohrium", "=", "True", ")", ":", "f", "=", "numpy", ".", "load", "(", "file", ",", ...
https://github.com/bh107/bohrium/blob/5b83e7117285fefc7779ed0e9acb0f8e74c7e068/bridge/npbackend/bohrium/disk_io.py#L13-L120
hanpfei/chromium-net
392cc1fa3a8f92f42e4071ab6e674d8e0482f83f
third_party/catapult/third_party/gsutil/third_party/boto/boto/mws/connection.py
python
MWSConnection.get_recommendations_service_status
(self, request, response, **kw)
return self._post_request(request, kw, response)
Returns the operational status of the Recommendations API section.
Returns the operational status of the Recommendations API section.
[ "Returns", "the", "operational", "status", "of", "the", "Recommendations", "API", "section", "." ]
def get_recommendations_service_status(self, request, response, **kw): """Returns the operational status of the Recommendations API section. """ return self._post_request(request, kw, response)
[ "def", "get_recommendations_service_status", "(", "self", ",", "request", ",", "response", ",", "*", "*", "kw", ")", ":", "return", "self", ".", "_post_request", "(", "request", ",", "kw", ",", "response", ")" ]
https://github.com/hanpfei/chromium-net/blob/392cc1fa3a8f92f42e4071ab6e674d8e0482f83f/third_party/catapult/third_party/gsutil/third_party/boto/boto/mws/connection.py#L919-L922
facebook/fboss
60063db1df37c2ec0e7dcd0955c54885ea9bf7f0
build/fbcode_builder/getdeps/dyndeps.py
python
WinDeps.compute_dependency_paths
(self, build_dir)
return sorted(dep_dirs)
Return a list of all directories that need to be added to $PATH to ensure that library dependencies can be found correctly. This is computed by scanning binaries to determine exactly the right list of dependencies. The compute_dependency_paths_fast() is a alternative function that runs faster ...
Return a list of all directories that need to be added to $PATH to ensure that library dependencies can be found correctly. This is computed by scanning binaries to determine exactly the right list of dependencies.
[ "Return", "a", "list", "of", "all", "directories", "that", "need", "to", "be", "added", "to", "$PATH", "to", "ensure", "that", "library", "dependencies", "can", "be", "found", "correctly", ".", "This", "is", "computed", "by", "scanning", "binaries", "to", ...
def compute_dependency_paths(self, build_dir): """Return a list of all directories that need to be added to $PATH to ensure that library dependencies can be found correctly. This is computed by scanning binaries to determine exactly the right list of dependencies. The compute_dependenc...
[ "def", "compute_dependency_paths", "(", "self", ",", "build_dir", ")", ":", "dep_dirs", "=", "set", "(", ")", "# Find paths by scanning the binaries.", "for", "dep", "in", "self", ".", "find_all_dependencies", "(", "build_dir", ")", ":", "dep_dirs", ".", "add", ...
https://github.com/facebook/fboss/blob/60063db1df37c2ec0e7dcd0955c54885ea9bf7f0/build/fbcode_builder/getdeps/dyndeps.py#L249-L263
NREL/EnergyPlus
fadc5973b85c70e8cc923efb69c144e808a26078
src/EnergyPlus/api/datatransfer.py
python
DataExchange.tomorrow_weather_wind_direction_at_time
(self, state: c_void_p, hour: int, time_step_number: int)
return self.api.tomorrowWeatherWindDirectionAtTime(state, hour, time_step_number)
Gets the specified weather data at the specified hour and time step index within that hour :param state: An active EnergyPlus "state" that is returned from a call to `api.state_manager.new_state()`. :param hour: Integer hour of day (0 to 23) :param time_step_number: Time step index in hour, fro...
Gets the specified weather data at the specified hour and time step index within that hour
[ "Gets", "the", "specified", "weather", "data", "at", "the", "specified", "hour", "and", "time", "step", "index", "within", "that", "hour" ]
def tomorrow_weather_wind_direction_at_time(self, state: c_void_p, hour: int, time_step_number: int) -> float: """ Gets the specified weather data at the specified hour and time step index within that hour :param state: An active EnergyPlus "state" that is returned from a call to `api.state_man...
[ "def", "tomorrow_weather_wind_direction_at_time", "(", "self", ",", "state", ":", "c_void_p", ",", "hour", ":", "int", ",", "time_step_number", ":", "int", ")", "->", "float", ":", "return", "self", ".", "api", ".", "tomorrowWeatherWindDirectionAtTime", "(", "st...
https://github.com/NREL/EnergyPlus/blob/fadc5973b85c70e8cc923efb69c144e808a26078/src/EnergyPlus/api/datatransfer.py#L1354-L1363
wlanjie/AndroidFFmpeg
7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf
tools/fdk-aac-build/armeabi/toolchain/lib/python2.7/ftplib.py
python
FTP.connect
(self, host='', port=0, timeout=-999)
return self.welcome
Connect to host. Arguments are: - host: hostname to connect to (string, default previous host) - port: port to connect to (integer, default previous port)
Connect to host. Arguments are: - host: hostname to connect to (string, default previous host) - port: port to connect to (integer, default previous port)
[ "Connect", "to", "host", ".", "Arguments", "are", ":", "-", "host", ":", "hostname", "to", "connect", "to", "(", "string", "default", "previous", "host", ")", "-", "port", ":", "port", "to", "connect", "to", "(", "integer", "default", "previous", "port",...
def connect(self, host='', port=0, timeout=-999): '''Connect to host. Arguments are: - host: hostname to connect to (string, default previous host) - port: port to connect to (integer, default previous port) ''' if host != '': self.host = host if port > 0: ...
[ "def", "connect", "(", "self", ",", "host", "=", "''", ",", "port", "=", "0", ",", "timeout", "=", "-", "999", ")", ":", "if", "host", "!=", "''", ":", "self", ".", "host", "=", "host", "if", "port", ">", "0", ":", "self", ".", "port", "=", ...
https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/armeabi/toolchain/lib/python2.7/ftplib.py#L121-L136
SFTtech/openage
d6a08c53c48dc1e157807471df92197f6ca9e04d
openage/convert/processor/conversion/aoc/ability_subprocessor.py
python
AoCAbilitySubprocessor.los_ability
(line)
return ability_forward_ref
Adds the LineOfSight ability to a line. :param line: Unit/Building line that gets the ability. :type line: ...dataformat.converter_object.ConverterObjectGroup :returns: The forward reference for the ability. :rtype: ...dataformat.forward_ref.ForwardRef
Adds the LineOfSight ability to a line.
[ "Adds", "the", "LineOfSight", "ability", "to", "a", "line", "." ]
def los_ability(line): """ Adds the LineOfSight ability to a line. :param line: Unit/Building line that gets the ability. :type line: ...dataformat.converter_object.ConverterObjectGroup :returns: The forward reference for the ability. :rtype: ...dataformat.forward_ref.Fo...
[ "def", "los_ability", "(", "line", ")", ":", "current_unit", "=", "line", ".", "get_head_unit", "(", ")", "current_unit_id", "=", "line", ".", "get_head_unit_id", "(", ")", "dataset", "=", "line", ".", "data", "api_objects", "=", "dataset", ".", "nyan_api_ob...
https://github.com/SFTtech/openage/blob/d6a08c53c48dc1e157807471df92197f6ca9e04d/openage/convert/processor/conversion/aoc/ability_subprocessor.py#L4212-L4268
jeog/TDAmeritradeAPI
91c738afd7d57b54f6231170bd64c2550fafd34d
python/tdma_api/get.py
python
OptionStrategy.COVERED
()
return OptionStrategy(OPTION_STRATEGY_TYPE_COVERED, 0.0)
Build a 'Covered' strategy object.
Build a 'Covered' strategy object.
[ "Build", "a", "Covered", "strategy", "object", "." ]
def COVERED(): """Build a 'Covered' strategy object.""" return OptionStrategy(OPTION_STRATEGY_TYPE_COVERED, 0.0)
[ "def", "COVERED", "(", ")", ":", "return", "OptionStrategy", "(", "OPTION_STRATEGY_TYPE_COVERED", ",", "0.0", ")" ]
https://github.com/jeog/TDAmeritradeAPI/blob/91c738afd7d57b54f6231170bd64c2550fafd34d/python/tdma_api/get.py#L736-L738
echronos/echronos
c996f1d2c8af6c6536205eb319c1bf1d4d84569c
external_tools/ply_info/example/ansic/cparse.py
python
p_declaration_specifiers_2
(t)
declaration_specifiers : type_specifier declaration_specifiers
declaration_specifiers : type_specifier declaration_specifiers
[ "declaration_specifiers", ":", "type_specifier", "declaration_specifiers" ]
def p_declaration_specifiers_2(t): 'declaration_specifiers : type_specifier declaration_specifiers' pass
[ "def", "p_declaration_specifiers_2", "(", "t", ")", ":", "pass" ]
https://github.com/echronos/echronos/blob/c996f1d2c8af6c6536205eb319c1bf1d4d84569c/external_tools/ply_info/example/ansic/cparse.py#L77-L79
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/windows/Lib/tkinter/__init__.py
python
Button.__init__
(self, master=None, cnf={}, **kw)
Construct a button widget with the parent MASTER. STANDARD OPTIONS activebackground, activeforeground, anchor, background, bitmap, borderwidth, cursor, disabledforeground, font, foreground highlightbackground, highlightcolor, highlightthickness, imag...
Construct a button widget with the parent MASTER.
[ "Construct", "a", "button", "widget", "with", "the", "parent", "MASTER", "." ]
def __init__(self, master=None, cnf={}, **kw): """Construct a button widget with the parent MASTER. STANDARD OPTIONS activebackground, activeforeground, anchor, background, bitmap, borderwidth, cursor, disabledforeground, font, foreground highlightbackgr...
[ "def", "__init__", "(", "self", ",", "master", "=", "None", ",", "cnf", "=", "{", "}", ",", "*", "*", "kw", ")", ":", "Widget", ".", "__init__", "(", "self", ",", "master", ",", "'button'", ",", "cnf", ",", "kw", ")" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/windows/Lib/tkinter/__init__.py#L2350-L2369
weolar/miniblink49
1c4678db0594a4abde23d3ebbcc7cd13c3170777
third_party/WebKit/Tools/Scripts/webkitpy/common/find_files.py
python
_normalized_find
(filesystem, paths, skipped_directories, file_filter, directory_sort_key)
return all_files
Finds the set of tests under the list of paths. Args: paths: a list of absolute path expressions to search. Glob patterns are ok.
Finds the set of tests under the list of paths.
[ "Finds", "the", "set", "of", "tests", "under", "the", "list", "of", "paths", "." ]
def _normalized_find(filesystem, paths, skipped_directories, file_filter, directory_sort_key): """Finds the set of tests under the list of paths. Args: paths: a list of absolute path expressions to search. Glob patterns are ok. """ paths_to_walk = itertools.chain(*(filesystem.glob(path...
[ "def", "_normalized_find", "(", "filesystem", ",", "paths", ",", "skipped_directories", ",", "file_filter", ",", "directory_sort_key", ")", ":", "paths_to_walk", "=", "itertools", ".", "chain", "(", "*", "(", "filesystem", ".", "glob", "(", "path", ")", "for",...
https://github.com/weolar/miniblink49/blob/1c4678db0594a4abde23d3ebbcc7cd13c3170777/third_party/WebKit/Tools/Scripts/webkitpy/common/find_files.py#L68-L84
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/site-packages/pip/_vendor/distlib/index.py
python
PackageIndex._get_pypirc_command
(self)
return PyPIRCCommand(d)
Get the distutils command for interacting with PyPI configurations. :return: the command.
[]
def _get_pypirc_command(self): """ Get the distutils command for interacting with PyPI configurations. :return: the command. """ from distutils.core import Distribution from distutils.config import PyPIRCCommand d = Distribution() return PyPIRCComm...
[ "def", "_get_pypirc_command", "(", "self", ")", ":", "from", "distutils", ".", "core", "import", "Distribution", "from", "distutils", ".", "config", "import", "PyPIRCCommand", "d", "=", "Distribution", "(", ")", "return", "PyPIRCCommand", "(", "d", ")" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/site-packages/pip/_vendor/distlib/index.py#L129-L145
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/site-packages/setuptools/_vendor/ordered_set.py
python
OrderedSet.intersection_update
(self, other)
Update this OrderedSet to keep only items in another set, preserving their order in this set. Example: >>> this = OrderedSet([1, 4, 3, 5, 7]) >>> other = OrderedSet([9, 7, 1, 3, 2]) >>> this.intersection_update(other) >>> print(this) OrderedSe...
Update this OrderedSet to keep only items in another set, preserving their order in this set.
[ "Update", "this", "OrderedSet", "to", "keep", "only", "items", "in", "another", "set", "preserving", "their", "order", "in", "this", "set", "." ]
def intersection_update(self, other): """ Update this OrderedSet to keep only items in another set, preserving their order in this set. Example: >>> this = OrderedSet([1, 4, 3, 5, 7]) >>> other = OrderedSet([9, 7, 1, 3, 2]) >>> this.intersection_updat...
[ "def", "intersection_update", "(", "self", ",", "other", ")", ":", "other", "=", "set", "(", "other", ")", "self", ".", "_update_items", "(", "[", "item", "for", "item", "in", "self", ".", "items", "if", "item", "in", "other", "]", ")" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/site-packages/setuptools/_vendor/ordered_set.py#L457-L470
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/msw/_core.py
python
Rect.GetWidth
(*args, **kwargs)
return _core_.Rect_GetWidth(*args, **kwargs)
GetWidth(self) -> int
GetWidth(self) -> int
[ "GetWidth", "(", "self", ")", "-", ">", "int" ]
def GetWidth(*args, **kwargs): """GetWidth(self) -> int""" return _core_.Rect_GetWidth(*args, **kwargs)
[ "def", "GetWidth", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_core_", ".", "Rect_GetWidth", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/msw/_core.py#L1285-L1287
kismetwireless/kismet
a7c0dc270c960fb1f58bd9cec4601c201885fd4e
capture_freaklabs_zigbee/KismetCaptureFreaklabsZigbee/kismetexternal/__init__.py
python
ExternalInterface.add_handler
(self, command, handler)
Register a command handler; this handler will be called when a command is received. :param command: Command (string, case sensitive) :param handler: Handler function which will be called with (sequence number, payload) :return: None
Register a command handler; this handler will be called when a command is received.
[ "Register", "a", "command", "handler", ";", "this", "handler", "will", "be", "called", "when", "a", "command", "is", "received", "." ]
def add_handler(self, command, handler): """ Register a command handler; this handler will be called when a command is received. :param command: Command (string, case sensitive) :param handler: Handler function which will be called with (sequence number, payload) :return...
[ "def", "add_handler", "(", "self", ",", "command", ",", "handler", ")", ":", "self", ".", "handlers", "[", "command", "]", "=", "handler" ]
https://github.com/kismetwireless/kismet/blob/a7c0dc270c960fb1f58bd9cec4601c201885fd4e/capture_freaklabs_zigbee/KismetCaptureFreaklabsZigbee/kismetexternal/__init__.py#L310-L319
wlanjie/AndroidFFmpeg
7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf
tools/fdk-aac-build/armeabi/toolchain/lib/python2.7/idlelib/EditorWindow.py
python
EditorWindow.update_recent_files_list
(self, new_file=None)
Load and update the recent files list and menus
Load and update the recent files list and menus
[ "Load", "and", "update", "the", "recent", "files", "list", "and", "menus" ]
def update_recent_files_list(self, new_file=None): "Load and update the recent files list and menus" rf_list = [] if os.path.exists(self.recent_files_path): rf_list_file = open(self.recent_files_path,'r') try: rf_list = rf_list_file.readlines() ...
[ "def", "update_recent_files_list", "(", "self", ",", "new_file", "=", "None", ")", ":", "rf_list", "=", "[", "]", "if", "os", ".", "path", ".", "exists", "(", "self", ".", "recent_files_path", ")", ":", "rf_list_file", "=", "open", "(", "self", ".", "r...
https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/armeabi/toolchain/lib/python2.7/idlelib/EditorWindow.py#L860-L903
moderngl/moderngl
32fe79927e02b0fa893b3603d677bdae39771e14
moderngl/compute_shader.py
python
ComputeShader.glo
(self)
return self._glo
int: The internal OpenGL object. This values is provided for debug purposes only.
int: The internal OpenGL object. This values is provided for debug purposes only.
[ "int", ":", "The", "internal", "OpenGL", "object", ".", "This", "values", "is", "provided", "for", "debug", "purposes", "only", "." ]
def glo(self) -> int: ''' int: The internal OpenGL object. This values is provided for debug purposes only. ''' return self._glo
[ "def", "glo", "(", "self", ")", "->", "int", ":", "return", "self", ".", "_glo" ]
https://github.com/moderngl/moderngl/blob/32fe79927e02b0fa893b3603d677bdae39771e14/moderngl/compute_shader.py#L104-L110
PlatformLab/Arachne
e67391471007174dd4002dc2c160628e19c284e8
scripts/cpplint.py
python
CleansedLines._CollapseStrings
(elided)
return collapsed
Collapses strings and chars on a line to simple "" or '' blocks. We nix strings first so we're not fooled by text like '"http://"' Args: elided: The line being processed. Returns: The line with collapsed strings.
Collapses strings and chars on a line to simple "" or '' blocks.
[ "Collapses", "strings", "and", "chars", "on", "a", "line", "to", "simple", "or", "blocks", "." ]
def _CollapseStrings(elided): """Collapses strings and chars on a line to simple "" or '' blocks. We nix strings first so we're not fooled by text like '"http://"' Args: elided: The line being processed. Returns: The line with collapsed strings. """ if _RE_PATTERN_INCLUDE.match(el...
[ "def", "_CollapseStrings", "(", "elided", ")", ":", "if", "_RE_PATTERN_INCLUDE", ".", "match", "(", "elided", ")", ":", "return", "elided", "# Remove escaped characters first to make quote/single quote collapsing", "# basic. Things that look like escaped characters shouldn't occur...
https://github.com/PlatformLab/Arachne/blob/e67391471007174dd4002dc2c160628e19c284e8/scripts/cpplint.py#L1425-L1489
wesnoth/wesnoth
6ccac5a5e8ff75303c9190c0da60580925cb32c0
data/tools/unit_tree/html_output.py
python
HTMLOutput.analyze_units
(self, grouper, add_parents)
return len(forest.lookup)
This takes all units belonging to a campaign, then groups them either by race or faction, and creates an advancements tree out of it.
This takes all units belonging to a campaign, then groups them either by race or faction, and creates an advancements tree out of it.
[ "This", "takes", "all", "units", "belonging", "to", "a", "campaign", "then", "groups", "them", "either", "by", "race", "or", "faction", "and", "creates", "an", "advancements", "tree", "out", "of", "it", "." ]
def analyze_units(self, grouper, add_parents): """ This takes all units belonging to a campaign, then groups them either by race or faction, and creates an advancements tree out of it. """ # Build an advancement tree forest of all units. forest = self.forest = helpers.Un...
[ "def", "analyze_units", "(", "self", ",", "grouper", ",", "add_parents", ")", ":", "# Build an advancement tree forest of all units.", "forest", "=", "self", ".", "forest", "=", "helpers", ".", "UnitForest", "(", ")", "units_added", "=", "{", "}", "for", "uid", ...
https://github.com/wesnoth/wesnoth/blob/6ccac5a5e8ff75303c9190c0da60580925cb32c0/data/tools/unit_tree/html_output.py#L365-L470
kismetwireless/kismet
a7c0dc270c960fb1f58bd9cec4601c201885fd4e
capture_proxy_adsb/KismetCaptureProxyAdsb/__init__.py
python
KismetProxyAdsb.adsb_msg_get_airborne_velocity
(self, data)
return velocity
Airborne velocity from message 17, synthesized from EW/NS velocities
Airborne velocity from message 17, synthesized from EW/NS velocities
[ "Airborne", "velocity", "from", "message", "17", "synthesized", "from", "EW", "/", "NS", "velocities" ]
def adsb_msg_get_airborne_velocity(self, data): """ Airborne velocity from message 17, synthesized from EW/NS velocities """ ew_dir = (data[5] & 4) >> 2 ew_velocity = ((data[5] & 3) << 8) | data[6] ns_dir = (data[7] & 0x80) >> 7 ns_velocity = ((data[7] & 0x7f...
[ "def", "adsb_msg_get_airborne_velocity", "(", "self", ",", "data", ")", ":", "ew_dir", "=", "(", "data", "[", "5", "]", "&", "4", ")", ">>", "2", "ew_velocity", "=", "(", "(", "data", "[", "5", "]", "&", "3", ")", "<<", "8", ")", "|", "data", "...
https://github.com/kismetwireless/kismet/blob/a7c0dc270c960fb1f58bd9cec4601c201885fd4e/capture_proxy_adsb/KismetCaptureProxyAdsb/__init__.py#L623-L636
apache/incubator-mxnet
f03fb23f1d103fec9541b5ae59ee06b1734a51d9
python/mxnet/util.py
python
is_np_shape
()
return curr.value
Checks whether the NumPy shape semantics is currently turned on. In NumPy shape semantics, `()` represents the shape of scalar tensors, and tuples with `0` elements, for example, `(0,)`, `(1, 0, 2)`, represent the shapes of zero-size tensors. This is turned off by default for keeping backward compatibil...
Checks whether the NumPy shape semantics is currently turned on. In NumPy shape semantics, `()` represents the shape of scalar tensors, and tuples with `0` elements, for example, `(0,)`, `(1, 0, 2)`, represent the shapes of zero-size tensors. This is turned off by default for keeping backward compatibil...
[ "Checks", "whether", "the", "NumPy", "shape", "semantics", "is", "currently", "turned", "on", ".", "In", "NumPy", "shape", "semantics", "()", "represents", "the", "shape", "of", "scalar", "tensors", "and", "tuples", "with", "0", "elements", "for", "example", ...
def is_np_shape(): """Checks whether the NumPy shape semantics is currently turned on. In NumPy shape semantics, `()` represents the shape of scalar tensors, and tuples with `0` elements, for example, `(0,)`, `(1, 0, 2)`, represent the shapes of zero-size tensors. This is turned off by default for keepi...
[ "def", "is_np_shape", "(", ")", ":", "curr", "=", "ctypes", ".", "c_bool", "(", ")", "check_call", "(", "_LIB", ".", "MXIsNumpyShape", "(", "ctypes", ".", "byref", "(", "curr", ")", ")", ")", "return", "curr", ".", "value" ]
https://github.com/apache/incubator-mxnet/blob/f03fb23f1d103fec9541b5ae59ee06b1734a51d9/python/mxnet/util.py#L105-L136
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/osx_carbon/aui.py
python
AuiToolBar.SetOverflowVisible
(*args, **kwargs)
return _aui.AuiToolBar_SetOverflowVisible(*args, **kwargs)
SetOverflowVisible(self, bool visible)
SetOverflowVisible(self, bool visible)
[ "SetOverflowVisible", "(", "self", "bool", "visible", ")" ]
def SetOverflowVisible(*args, **kwargs): """SetOverflowVisible(self, bool visible)""" return _aui.AuiToolBar_SetOverflowVisible(*args, **kwargs)
[ "def", "SetOverflowVisible", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_aui", ".", "AuiToolBar_SetOverflowVisible", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_carbon/aui.py#L2134-L2136
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/pandas/py3/pandas/core/generic.py
python
NDFrame.flags
(self)
return self._flags
Get the properties associated with this pandas object. The available flags are * :attr:`Flags.allows_duplicate_labels` See Also -------- Flags : Flags that apply to pandas objects. DataFrame.attrs : Global metadata applying to this dataset. Notes -----...
Get the properties associated with this pandas object.
[ "Get", "the", "properties", "associated", "with", "this", "pandas", "object", "." ]
def flags(self) -> Flags: """ Get the properties associated with this pandas object. The available flags are * :attr:`Flags.allows_duplicate_labels` See Also -------- Flags : Flags that apply to pandas objects. DataFrame.attrs : Global metadata applying...
[ "def", "flags", "(", "self", ")", "->", "Flags", ":", "return", "self", ".", "_flags" ]
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/pandas/py3/pandas/core/generic.py#L347-L384
ricardoquesada/Spidermonkey
4a75ea2543408bd1b2c515aa95901523eeef7858
python/psutil/psutil/_pslinux.py
python
wrap_exceptions
(fun)
return wrapper
Decorator which translates bare OSError and IOError exceptions into NoSuchProcess and AccessDenied.
Decorator which translates bare OSError and IOError exceptions into NoSuchProcess and AccessDenied.
[ "Decorator", "which", "translates", "bare", "OSError", "and", "IOError", "exceptions", "into", "NoSuchProcess", "and", "AccessDenied", "." ]
def wrap_exceptions(fun): """Decorator which translates bare OSError and IOError exceptions into NoSuchProcess and AccessDenied. """ @wraps(fun) def wrapper(self, *args, **kwargs): try: return fun(self, *args, **kwargs) except EnvironmentError: # ENOENT (no su...
[ "def", "wrap_exceptions", "(", "fun", ")", ":", "@", "wraps", "(", "fun", ")", "def", "wrapper", "(", "self", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "try", ":", "return", "fun", "(", "self", ",", "*", "args", ",", "*", "*", "kwarg...
https://github.com/ricardoquesada/Spidermonkey/blob/4a75ea2543408bd1b2c515aa95901523eeef7858/python/psutil/psutil/_pslinux.py#L430-L448
adobe/chromium
cfe5bf0b51b1f6b9fe239c2a3c2f2364da9967d7
third_party/protobuf/python/mox.py
python
Mox.ReplayAll
(self)
Set all mock objects to replay mode.
Set all mock objects to replay mode.
[ "Set", "all", "mock", "objects", "to", "replay", "mode", "." ]
def ReplayAll(self): """Set all mock objects to replay mode.""" for mock_obj in self._mock_objects: mock_obj._Replay()
[ "def", "ReplayAll", "(", "self", ")", ":", "for", "mock_obj", "in", "self", ".", "_mock_objects", ":", "mock_obj", ".", "_Replay", "(", ")" ]
https://github.com/adobe/chromium/blob/cfe5bf0b51b1f6b9fe239c2a3c2f2364da9967d7/third_party/protobuf/python/mox.py#L189-L193
google/earthenterprise
0fe84e29be470cd857e3a0e52e5d0afd5bb8cee9
earth_enterprise/src/server/wsgi/serve/snippets/util/sparse_tree.py
python
_RemoveAbstractPathFromRepeatedPartOfSparse
(parts, store)
return store_lives
Remove path parts from store, when store's top-layer is repeated. Args: parts: broken-up list of elements of the path. store: multi-level dict representing the protobuf dbroot. Returns: True if the store is non-empty afterward.
Remove path parts from store, when store's top-layer is repeated.
[ "Remove", "path", "parts", "from", "store", "when", "store", "s", "top", "-", "layer", "is", "repeated", "." ]
def _RemoveAbstractPathFromRepeatedPartOfSparse(parts, store): """Remove path parts from store, when store's top-layer is repeated. Args: parts: broken-up list of elements of the path. store: multi-level dict representing the protobuf dbroot. Returns: True if the store is non-empty afterward. ...
[ "def", "_RemoveAbstractPathFromRepeatedPartOfSparse", "(", "parts", ",", "store", ")", ":", "assert", "isinstance", "(", "store", ",", "dict", ")", "indices_to_be_deleted", "=", "[", "]", "for", "index", "in", "store", ":", "assert", "index", ".", "isdigit", "...
https://github.com/google/earthenterprise/blob/0fe84e29be470cd857e3a0e52e5d0afd5bb8cee9/earth_enterprise/src/server/wsgi/serve/snippets/util/sparse_tree.py#L133-L164
miyosuda/TensorFlowAndroidMNIST
7b5a4603d2780a8a2834575706e9001977524007
jni-build/jni/include/tensorflow/python/training/input.py
python
input_producer
(input_tensor, element_shape=None, num_epochs=None, shuffle=True, seed=None, capacity=32, shared_name=None, summary_name=None, name=None)
Output the rows of `input_tensor` to a queue for an input pipeline. Args: input_tensor: A tensor with the rows to produce. Must be at least one-dimensional. Must either have a fully-defined shape, or `element_shape` must be defined. element_shape: (Optional.) A `TensorShape` representing the shap...
Output the rows of `input_tensor` to a queue for an input pipeline.
[ "Output", "the", "rows", "of", "input_tensor", "to", "a", "queue", "for", "an", "input", "pipeline", "." ]
def input_producer(input_tensor, element_shape=None, num_epochs=None, shuffle=True, seed=None, capacity=32, shared_name=None, summary_name=None, name=None): """Output the rows of `input_tensor` to a queue for an input pipeline. Args: input_tensor: A tensor with the rows to...
[ "def", "input_producer", "(", "input_tensor", ",", "element_shape", "=", "None", ",", "num_epochs", "=", "None", ",", "shuffle", "=", "True", ",", "seed", "=", "None", ",", "capacity", "=", "32", ",", "shared_name", "=", "None", ",", "summary_name", "=", ...
https://github.com/miyosuda/TensorFlowAndroidMNIST/blob/7b5a4603d2780a8a2834575706e9001977524007/jni-build/jni/include/tensorflow/python/training/input.py#L89-L145
albertz/openlierox
d316c14a8eb57848ef56e9bfa7b23a56f694a51b
tools/DedicatedServerVideo/gdata/photos/service.py
python
PhotosService.__init__
(self, email=None, password=None, source=None, server='picasaweb.google.com', additional_headers=None, **kwargs)
Creates a client for the Google Photos service. Args: email: string (optional) The user's email address, used for authentication. password: string (optional) The user's password. source: string (optional) The name of the user's application. server: string (optional) The name of th...
Creates a client for the Google Photos service.
[ "Creates", "a", "client", "for", "the", "Google", "Photos", "service", "." ]
def __init__(self, email=None, password=None, source=None, server='picasaweb.google.com', additional_headers=None, **kwargs): """Creates a client for the Google Photos service. Args: email: string (optional) The user's email address, used for authentication. ...
[ "def", "__init__", "(", "self", ",", "email", "=", "None", ",", "password", "=", "None", ",", "source", "=", "None", ",", "server", "=", "'picasaweb.google.com'", ",", "additional_headers", "=", "None", ",", "*", "*", "kwargs", ")", ":", "self", ".", "...
https://github.com/albertz/openlierox/blob/d316c14a8eb57848ef56e9bfa7b23a56f694a51b/tools/DedicatedServerVideo/gdata/photos/service.py#L127-L146
tiny-dnn/tiny-dnn
c0f576f5cb7b35893f62127cb7aec18f77a3bcc5
third_party/gemmlowp/meta/generators/gemv_1xMxK.py
python
GenerateFullTempsCountersAndConsts
(emitter, result_type)
Generates all the boilerplate variables for the int32 and float gemms.
Generates all the boilerplate variables for the int32 and float gemms.
[ "Generates", "all", "the", "boilerplate", "variables", "for", "the", "int32", "and", "float", "gemms", "." ]
def GenerateFullTempsCountersAndConsts(emitter, result_type): """Generates all the boilerplate variables for the int32 and float gemms.""" GenerateCommonTempsCountersAndConsts(emitter) emitter.EmitDeclare('const std::int32_t', 'const_offset', 'lhs_offset * rhs_offset * k') emitter.EmitDecl...
[ "def", "GenerateFullTempsCountersAndConsts", "(", "emitter", ",", "result_type", ")", ":", "GenerateCommonTempsCountersAndConsts", "(", "emitter", ")", "emitter", ".", "EmitDeclare", "(", "'const std::int32_t'", ",", "'const_offset'", ",", "'lhs_offset * rhs_offset * k'", "...
https://github.com/tiny-dnn/tiny-dnn/blob/c0f576f5cb7b35893f62127cb7aec18f77a3bcc5/third_party/gemmlowp/meta/generators/gemv_1xMxK.py#L53-L59
hanpfei/chromium-net
392cc1fa3a8f92f42e4071ab6e674d8e0482f83f
third_party/catapult/third_party/gsutil/third_party/boto/boto/elasticache/layer1.py
python
ElastiCacheConnection.describe_cache_security_groups
(self, cache_security_group_name=None, max_records=None, marker=None)
return self._make_request( action='DescribeCacheSecurityGroups', verb='POST', path='/', params=params)
The DescribeCacheSecurityGroups operation returns a list of cache security group descriptions. If a cache security group name is specified, the list will contain only the description of that group. :type cache_security_group_name: string :param cache_security_group_name: The nam...
The DescribeCacheSecurityGroups operation returns a list of cache security group descriptions. If a cache security group name is specified, the list will contain only the description of that group.
[ "The", "DescribeCacheSecurityGroups", "operation", "returns", "a", "list", "of", "cache", "security", "group", "descriptions", ".", "If", "a", "cache", "security", "group", "name", "is", "specified", "the", "list", "will", "contain", "only", "the", "description", ...
def describe_cache_security_groups(self, cache_security_group_name=None, max_records=None, marker=None): """ The DescribeCacheSecurityGroups operation returns a list of cache security group descriptions. If a cache security group name is specified, ...
[ "def", "describe_cache_security_groups", "(", "self", ",", "cache_security_group_name", "=", "None", ",", "max_records", "=", "None", ",", "marker", "=", "None", ")", ":", "params", "=", "{", "}", "if", "cache_security_group_name", "is", "not", "None", ":", "p...
https://github.com/hanpfei/chromium-net/blob/392cc1fa3a8f92f42e4071ab6e674d8e0482f83f/third_party/catapult/third_party/gsutil/third_party/boto/boto/elasticache/layer1.py#L773-L811
Tokutek/mongo
0653eabe2c5b9d12b4814617cb7fb2d799937a0f
buildscripts/cpplint.py
python
_SetVerboseLevel
(level)
return _cpplint_state.SetVerboseLevel(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(level): """Sets the module's verbosity, and returns the previous setting.""" return _cpplint_state.SetVerboseLevel(level)
[ "def", "_SetVerboseLevel", "(", "level", ")", ":", "return", "_cpplint_state", ".", "SetVerboseLevel", "(", "level", ")" ]
https://github.com/Tokutek/mongo/blob/0653eabe2c5b9d12b4814617cb7fb2d799937a0f/buildscripts/cpplint.py#L586-L588
vnpy/vnpy
f50f2535ed39dd33272e0985ed40c7078e4c19f6
vnpy/trader/datafeed.py
python
BaseDatafeed.query_bar_history
(self, req: HistoryRequest)
Query history bar data.
Query history bar data.
[ "Query", "history", "bar", "data", "." ]
def query_bar_history(self, req: HistoryRequest) -> Optional[List[BarData]]: """ Query history bar data. """ pass
[ "def", "query_bar_history", "(", "self", ",", "req", ":", "HistoryRequest", ")", "->", "Optional", "[", "List", "[", "BarData", "]", "]", ":", "pass" ]
https://github.com/vnpy/vnpy/blob/f50f2535ed39dd33272e0985ed40c7078e4c19f6/vnpy/trader/datafeed.py#L20-L24
hanpfei/chromium-net
392cc1fa3a8f92f42e4071ab6e674d8e0482f83f
third_party/catapult/telemetry/third_party/pyserial/serial/tools/list_ports_osx.py
python
get_int_property
(device_t, property)
return number.value
Search the given device for the specified string property @param device_t Device to search @param property String to search for. @return Python string containing the value, or None if not found.
Search the given device for the specified string property
[ "Search", "the", "given", "device", "for", "the", "specified", "string", "property" ]
def get_int_property(device_t, property): """ Search the given device for the specified string property @param device_t Device to search @param property String to search for. @return Python string containing the value, or None if not found. """ key = cf.CFStringCreateWithCString( kCFAll...
[ "def", "get_int_property", "(", "device_t", ",", "property", ")", ":", "key", "=", "cf", ".", "CFStringCreateWithCString", "(", "kCFAllocatorDefault", ",", "property", ".", "encode", "(", "\"mac_roman\"", ")", ",", "kCFStringEncodingMacRoman", ")", "CFContainer", ...
https://github.com/hanpfei/chromium-net/blob/392cc1fa3a8f92f42e4071ab6e674d8e0482f83f/third_party/catapult/telemetry/third_party/pyserial/serial/tools/list_ports_osx.py#L94-L119
weolar/miniblink49
1c4678db0594a4abde23d3ebbcc7cd13c3170777
third_party/WebKit/Tools/Scripts/webkitpy/style/optparser.py
python
ArgumentParser._parse_filter_flag
(self, flag_value)
return filters
Parse the --filter flag, and return a list of filter rules. Args: flag_value: A string of comma-separated filter rules, for example "-whitespace,+whitespace/indent".
Parse the --filter flag, and return a list of filter rules.
[ "Parse", "the", "--", "filter", "flag", "and", "return", "a", "list", "of", "filter", "rules", "." ]
def _parse_filter_flag(self, flag_value): """Parse the --filter flag, and return a list of filter rules. Args: flag_value: A string of comma-separated filter rules, for example "-whitespace,+whitespace/indent". """ filters = [] for uncleaned_filt...
[ "def", "_parse_filter_flag", "(", "self", ",", "flag_value", ")", ":", "filters", "=", "[", "]", "for", "uncleaned_filter", "in", "flag_value", ".", "split", "(", "','", ")", ":", "filter", "=", "uncleaned_filter", ".", "strip", "(", ")", "if", "not", "f...
https://github.com/weolar/miniblink49/blob/1c4678db0594a4abde23d3ebbcc7cd13c3170777/third_party/WebKit/Tools/Scripts/webkitpy/style/optparser.py#L388-L402
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/gtk/_core.py
python
MouseState.MiddleIsDown
(*args, **kwargs)
return _core_.MouseState_MiddleIsDown(*args, **kwargs)
MiddleIsDown(self) -> bool
MiddleIsDown(self) -> bool
[ "MiddleIsDown", "(", "self", ")", "-", ">", "bool" ]
def MiddleIsDown(*args, **kwargs): """MiddleIsDown(self) -> bool""" return _core_.MouseState_MiddleIsDown(*args, **kwargs)
[ "def", "MiddleIsDown", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_core_", ".", "MouseState_MiddleIsDown", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/gtk/_core.py#L4458-L4460
sdhash/sdhash
b9eff63e4e5867e910f41fd69032bbb1c94a2a5e
sdhash-ui/serverui/sdhashsrv/sdhashsrv.py
python
Client.displayResultDuration
(self, resultID)
return self.recv_displayResultDuration()
Parameters: - resultID
Parameters: - resultID
[ "Parameters", ":", "-", "resultID" ]
def displayResultDuration(self, resultID): """ Parameters: - resultID """ self.send_displayResultDuration(resultID) return self.recv_displayResultDuration()
[ "def", "displayResultDuration", "(", "self", ",", "resultID", ")", ":", "self", ".", "send_displayResultDuration", "(", "resultID", ")", "return", "self", ".", "recv_displayResultDuration", "(", ")" ]
https://github.com/sdhash/sdhash/blob/b9eff63e4e5867e910f41fd69032bbb1c94a2a5e/sdhash-ui/serverui/sdhashsrv/sdhashsrv.py#L622-L628
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/AWSPythonSDK/1.5.8/boto3/dynamodb/transform.py
python
TransformationInjector.inject_attribute_value_output
(self, parsed, model, **kwargs)
Injects DynamoDB deserialization into responses
Injects DynamoDB deserialization into responses
[ "Injects", "DynamoDB", "deserialization", "into", "responses" ]
def inject_attribute_value_output(self, parsed, model, **kwargs): """Injects DynamoDB deserialization into responses""" self._transformer.transform( parsed, model.output_shape, self._deserializer.deserialize, 'AttributeValue')
[ "def", "inject_attribute_value_output", "(", "self", ",", "parsed", ",", "model", ",", "*", "*", "kwargs", ")", ":", "self", ".", "_transformer", ".", "transform", "(", "parsed", ",", "model", ".", "output_shape", ",", "self", ".", "_deserializer", ".", "d...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/AWSPythonSDK/1.5.8/boto3/dynamodb/transform.py#L199-L203
facebookresearch/mvfst-rl
778bc4259ae7277e67c2ead593a493845c93db83
third-party/gala/envs.py
python
TransposeObs.__init__
(self, env=None)
Transpose observation space (base class)
Transpose observation space (base class)
[ "Transpose", "observation", "space", "(", "base", "class", ")" ]
def __init__(self, env=None): """ Transpose observation space (base class) """ super(TransposeObs, self).__init__(env)
[ "def", "__init__", "(", "self", ",", "env", "=", "None", ")", ":", "super", "(", "TransposeObs", ",", "self", ")", ".", "__init__", "(", "env", ")" ]
https://github.com/facebookresearch/mvfst-rl/blob/778bc4259ae7277e67c2ead593a493845c93db83/third-party/gala/envs.py#L152-L156
ucbrise/clipper
9f25e3fc7f8edc891615e81c5b80d3d8aed72608
clipper_admin/clipper_admin/clipper_admin.py
python
ClipperConnection.get_current_model_version
(self, name)
return version
Get the current model version for the specified model. Parameters ---------- name : str The name of the model Returns ------- str The current model version Raises ------ :py:exc:`clipper.UnconnectedException` :py:...
Get the current model version for the specified model.
[ "Get", "the", "current", "model", "version", "for", "the", "specified", "model", "." ]
def get_current_model_version(self, name): """Get the current model version for the specified model. Parameters ---------- name : str The name of the model Returns ------- str The current model version Raises ------ ...
[ "def", "get_current_model_version", "(", "self", ",", "name", ")", ":", "if", "not", "self", ".", "connected", ":", "raise", "UnconnectedException", "(", ")", "version", "=", "None", "model_info", "=", "self", ".", "get_all_models", "(", "verbose", "=", "Tru...
https://github.com/ucbrise/clipper/blob/9f25e3fc7f8edc891615e81c5b80d3d8aed72608/clipper_admin/clipper_admin/clipper_admin.py#L726-L756
panda3d/panda3d
833ad89ebad58395d0af0b7ec08538e5e4308265
direct/src/actor/Actor.py
python
Actor.instance
(self, path, partName, jointName, lodName="lodRoot")
instance(self, NodePath, string, string, key="lodRoot") Instance a nodePath to an actor part at a joint called jointName
instance(self, NodePath, string, string, key="lodRoot") Instance a nodePath to an actor part at a joint called jointName
[ "instance", "(", "self", "NodePath", "string", "string", "key", "=", "lodRoot", ")", "Instance", "a", "nodePath", "to", "an", "actor", "part", "at", "a", "joint", "called", "jointName" ]
def instance(self, path, partName, jointName, lodName="lodRoot"): """instance(self, NodePath, string, string, key="lodRoot") Instance a nodePath to an actor part at a joint called jointName""" partBundleDict = self.__partBundleDict.get(lodName) if partBundleDict: subpartDef =...
[ "def", "instance", "(", "self", ",", "path", ",", "partName", ",", "jointName", ",", "lodName", "=", "\"lodRoot\"", ")", ":", "partBundleDict", "=", "self", ".", "__partBundleDict", ".", "get", "(", "lodName", ")", "if", "partBundleDict", ":", "subpartDef", ...
https://github.com/panda3d/panda3d/blob/833ad89ebad58395d0af0b7ec08538e5e4308265/direct/src/actor/Actor.py#L1331-L1347
y123456yz/reading-and-annotate-mongodb-3.6
93280293672ca7586dc24af18132aa61e4ed7fcf
mongo/src/third_party/scons-2.5.0/scons-local-2.5.0/SCons/Node/FS.py
python
Dir.scanner_key
(self)
return None
A directory does not get scanned.
A directory does not get scanned.
[ "A", "directory", "does", "not", "get", "scanned", "." ]
def scanner_key(self): """A directory does not get scanned.""" return None
[ "def", "scanner_key", "(", "self", ")", ":", "return", "None" ]
https://github.com/y123456yz/reading-and-annotate-mongodb-3.6/blob/93280293672ca7586dc24af18132aa61e4ed7fcf/mongo/src/third_party/scons-2.5.0/scons-local-2.5.0/SCons/Node/FS.py#L1848-L1850
Xilinx/Vitis-AI
fc74d404563d9951b57245443c73bef389f3657f
tools/Vitis-AI-Quantizer/vai_q_tensorflow1.x/tensorflow/python/ops/distributions/transformed_distribution.py
python
_pick_scalar_condition
(pred, cond_true, cond_false)
return cond_true if pred_ else cond_false
Convenience function which chooses the condition based on the predicate.
Convenience function which chooses the condition based on the predicate.
[ "Convenience", "function", "which", "chooses", "the", "condition", "based", "on", "the", "predicate", "." ]
def _pick_scalar_condition(pred, cond_true, cond_false): """Convenience function which chooses the condition based on the predicate.""" # Note: This function is only valid if all of pred, cond_true, and cond_false # are scalars. This means its semantics are arguably more like tf.cond than # tf.select even thoug...
[ "def", "_pick_scalar_condition", "(", "pred", ",", "cond_true", ",", "cond_false", ")", ":", "# Note: This function is only valid if all of pred, cond_true, and cond_false", "# are scalars. This means its semantics are arguably more like tf.cond than", "# tf.select even though we use tf.sele...
https://github.com/Xilinx/Vitis-AI/blob/fc74d404563d9951b57245443c73bef389f3657f/tools/Vitis-AI-Quantizer/vai_q_tensorflow1.x/tensorflow/python/ops/distributions/transformed_distribution.py#L87-L95
gnuradio/gnuradio
09c3c4fa4bfb1a02caac74cb5334dfe065391e3b
gr-utils/modtool/templates/gr-newmod/docs/doxygen/update_pydoc.py
python
make_block_entry
(di, block)
return output
Create class and function docstrings of a gnuradio block
Create class and function docstrings of a gnuradio block
[ "Create", "class", "and", "function", "docstrings", "of", "a", "gnuradio", "block" ]
def make_block_entry(di, block): """ Create class and function docstrings of a gnuradio block """ descriptions = [] # Get the documentation associated with the class. class_desc = combine_descriptions(block) if class_desc: descriptions.append(class_desc) # Get the documentation a...
[ "def", "make_block_entry", "(", "di", ",", "block", ")", ":", "descriptions", "=", "[", "]", "# Get the documentation associated with the class.", "class_desc", "=", "combine_descriptions", "(", "block", ")", "if", "class_desc", ":", "descriptions", ".", "append", "...
https://github.com/gnuradio/gnuradio/blob/09c3c4fa4bfb1a02caac74cb5334dfe065391e3b/gr-utils/modtool/templates/gr-newmod/docs/doxygen/update_pydoc.py#L160-L191
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/windows/Lib/turtle.py
python
TPen.pensize
(self, width=None)
Set or return the line thickness. Aliases: pensize | width Argument: width -- positive number Set the line thickness to width or return it. If resizemode is set to "auto" and turtleshape is a polygon, that polygon is drawn with the same line thickness. If no argument ...
Set or return the line thickness.
[ "Set", "or", "return", "the", "line", "thickness", "." ]
def pensize(self, width=None): """Set or return the line thickness. Aliases: pensize | width Argument: width -- positive number Set the line thickness to width or return it. If resizemode is set to "auto" and turtleshape is a polygon, that polygon is drawn with ...
[ "def", "pensize", "(", "self", ",", "width", "=", "None", ")", ":", "if", "width", "is", "None", ":", "return", "self", ".", "_pensize", "self", ".", "pen", "(", "pensize", "=", "width", ")" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/windows/Lib/turtle.py#L2072-L2092
Xilinx/Vitis-AI
fc74d404563d9951b57245443c73bef389f3657f
tools/RNN/rnn_quantizer/pytorch_binding/pytorch_nndct/utils/logging.py
python
get_verbosity
()
return get_logger().getEffectiveLevel()
Return how much logging output will be produced.
Return how much logging output will be produced.
[ "Return", "how", "much", "logging", "output", "will", "be", "produced", "." ]
def get_verbosity(): """Return how much logging output will be produced.""" return get_logger().getEffectiveLevel()
[ "def", "get_verbosity", "(", ")", ":", "return", "get_logger", "(", ")", ".", "getEffectiveLevel", "(", ")" ]
https://github.com/Xilinx/Vitis-AI/blob/fc74d404563d9951b57245443c73bef389f3657f/tools/RNN/rnn_quantizer/pytorch_binding/pytorch_nndct/utils/logging.py#L214-L216
apple/turicreate
cce55aa5311300e3ce6af93cb45ba791fd1bdf49
deps/src/libxml2-2.9.1/python/libxml2class.py
python
catalogCleanup
()
Free up all the memory associated with catalogs
Free up all the memory associated with catalogs
[ "Free", "up", "all", "the", "memory", "associated", "with", "catalogs" ]
def catalogCleanup(): """Free up all the memory associated with catalogs """ libxml2mod.xmlCatalogCleanup()
[ "def", "catalogCleanup", "(", ")", ":", "libxml2mod", ".", "xmlCatalogCleanup", "(", ")" ]
https://github.com/apple/turicreate/blob/cce55aa5311300e3ce6af93cb45ba791fd1bdf49/deps/src/libxml2-2.9.1/python/libxml2class.py#L125-L127
hpi-xnor/BMXNet-v2
af2b1859eafc5c721b1397cef02f946aaf2ce20d
python/mxnet/recordio.py
python
MXRecordIO.close
(self)
Closes the record file.
Closes the record file.
[ "Closes", "the", "record", "file", "." ]
def close(self): """Closes the record file.""" if not self.is_open: return if self.writable: check_call(_LIB.MXRecordIOWriterFree(self.handle)) else: check_call(_LIB.MXRecordIOReaderFree(self.handle)) self.is_open = False self.pid = Non...
[ "def", "close", "(", "self", ")", ":", "if", "not", "self", ".", "is_open", ":", "return", "if", "self", ".", "writable", ":", "check_call", "(", "_LIB", ".", "MXRecordIOWriterFree", "(", "self", ".", "handle", ")", ")", "else", ":", "check_call", "(",...
https://github.com/hpi-xnor/BMXNet-v2/blob/af2b1859eafc5c721b1397cef02f946aaf2ce20d/python/mxnet/recordio.py#L127-L136
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/gtk/_core.py
python
Window.SetScrollPos
(*args, **kwargs)
return _core_.Window_SetScrollPos(*args, **kwargs)
SetScrollPos(self, int orientation, int pos, bool refresh=True) Sets the position of one of the built-in scrollbars.
SetScrollPos(self, int orientation, int pos, bool refresh=True)
[ "SetScrollPos", "(", "self", "int", "orientation", "int", "pos", "bool", "refresh", "=", "True", ")" ]
def SetScrollPos(*args, **kwargs): """ SetScrollPos(self, int orientation, int pos, bool refresh=True) Sets the position of one of the built-in scrollbars. """ return _core_.Window_SetScrollPos(*args, **kwargs)
[ "def", "SetScrollPos", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_core_", ".", "Window_SetScrollPos", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/gtk/_core.py#L11228-L11234
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/pandas/core/indexes/range.py
python
RangeIndex.max
(self, axis=None, skipna=True, *args, **kwargs)
return self._minmax("max")
The maximum value of the RangeIndex
The maximum value of the RangeIndex
[ "The", "maximum", "value", "of", "the", "RangeIndex" ]
def max(self, axis=None, skipna=True, *args, **kwargs): """The maximum value of the RangeIndex""" nv.validate_minmax_axis(axis) nv.validate_max(args, kwargs) return self._minmax("max")
[ "def", "max", "(", "self", ",", "axis", "=", "None", ",", "skipna", "=", "True", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "nv", ".", "validate_minmax_axis", "(", "axis", ")", "nv", ".", "validate_max", "(", "args", ",", "kwargs", ")", ...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/pandas/core/indexes/range.py#L418-L422
FreeCAD/FreeCAD
ba42231b9c6889b89e064d6d563448ed81e376ec
src/Mod/Fem/femtaskpanels/task_mesh_gmsh.py
python
_TaskPanel.update
(self)
fills the widgets
fills the widgets
[ "fills", "the", "widgets" ]
def update(self): "fills the widgets" self.form.if_max.setText(self.clmax.UserString) self.form.if_min.setText(self.clmin.UserString) index_dimension = self.form.cb_dimension.findText(self.dimension) self.form.cb_dimension.setCurrentIndex(index_dimension) index_order = se...
[ "def", "update", "(", "self", ")", ":", "self", ".", "form", ".", "if_max", ".", "setText", "(", "self", ".", "clmax", ".", "UserString", ")", "self", ".", "form", ".", "if_min", ".", "setText", "(", "self", ".", "clmin", ".", "UserString", ")", "i...
https://github.com/FreeCAD/FreeCAD/blob/ba42231b9c6889b89e064d6d563448ed81e376ec/src/Mod/Fem/femtaskpanels/task_mesh_gmsh.py#L146-L153
apache/singa
93fd9da72694e68bfe3fb29d0183a65263d238a1
python/singa/autograd.py
python
DepthToSpace.__init__
(self, blocksize, mode="DCR")
Args: blocksize (int): Blocks of [blocksize, blocksize] are moved. mode (string): DCR (default) for depth-column-row order re- arrangement. Use CRD for column-row-depth order.
Args: blocksize (int): Blocks of [blocksize, blocksize] are moved. mode (string): DCR (default) for depth-column-row order re- arrangement. Use CRD for column-row-depth order.
[ "Args", ":", "blocksize", "(", "int", ")", ":", "Blocks", "of", "[", "blocksize", "blocksize", "]", "are", "moved", ".", "mode", "(", "string", ")", ":", "DCR", "(", "default", ")", "for", "depth", "-", "column", "-", "row", "order", "re", "-", "ar...
def __init__(self, blocksize, mode="DCR"): """ Args: blocksize (int): Blocks of [blocksize, blocksize] are moved. mode (string): DCR (default) for depth-column-row order re- arrangement. Use CRD for column-row-depth order. """ super(DepthToSpace, s...
[ "def", "__init__", "(", "self", ",", "blocksize", ",", "mode", "=", "\"DCR\"", ")", ":", "super", "(", "DepthToSpace", ",", "self", ")", ".", "__init__", "(", ")", "self", ".", "blocksize", "=", "blocksize", "self", ".", "mode", "=", "mode", ".", "up...
https://github.com/apache/singa/blob/93fd9da72694e68bfe3fb29d0183a65263d238a1/python/singa/autograd.py#L5394-L5403
tensorflow/tensorflow
419e3a6b650ea4bd1b0cba23c4348f8a69f3272e
tensorflow/python/data/util/nest.py
python
flatten_up_to
(shallow_tree, input_tree)
return list(_yield_flat_up_to(shallow_tree, input_tree))
Flattens `input_tree` up to `shallow_tree`. Any further depth in structure in `input_tree` is retained as elements in the partially flatten output. If `shallow_tree` and `input_tree` are not sequences, this returns a single-element list: `[input_tree]`. Use Case: Sometimes we may wish to partially flatt...
Flattens `input_tree` up to `shallow_tree`.
[ "Flattens", "input_tree", "up", "to", "shallow_tree", "." ]
def flatten_up_to(shallow_tree, input_tree): """Flattens `input_tree` up to `shallow_tree`. Any further depth in structure in `input_tree` is retained as elements in the partially flatten output. If `shallow_tree` and `input_tree` are not sequences, this returns a single-element list: `[input_tree]`. Use...
[ "def", "flatten_up_to", "(", "shallow_tree", ",", "input_tree", ")", ":", "assert_shallow_structure", "(", "shallow_tree", ",", "input_tree", ")", "return", "list", "(", "_yield_flat_up_to", "(", "shallow_tree", ",", "input_tree", ")", ")" ]
https://github.com/tensorflow/tensorflow/blob/419e3a6b650ea4bd1b0cba23c4348f8a69f3272e/tensorflow/python/data/util/nest.py#L310-L380
hanpfei/chromium-net
392cc1fa3a8f92f42e4071ab6e674d8e0482f83f
third_party/catapult/telemetry/third_party/pyserial/serial/serialutil.py
python
SerialBase.__init__
(self, port = None, # number of device, numbering starts at # zero. if everything fails, the user # can specify a device string, note # that this isn't portable anymore ...
Initialize comm port object. If a port is given, then the port will be opened immediately. Otherwise a Serial port object in closed state is returned.
Initialize comm port object. If a port is given, then the port will be opened immediately. Otherwise a Serial port object in closed state is returned.
[ "Initialize", "comm", "port", "object", ".", "If", "a", "port", "is", "given", "then", "the", "port", "will", "be", "opened", "immediately", ".", "Otherwise", "a", "Serial", "port", "object", "in", "closed", "state", "is", "returned", "." ]
def __init__(self, port = None, # number of device, numbering starts at # zero. if everything fails, the user # can specify a device string, note # that this isn't portable ...
[ "def", "__init__", "(", "self", ",", "port", "=", "None", ",", "# number of device, numbering starts at", "# zero. if everything fails, the user", "# can specify a device string, note", "# that this isn't portable anymore", "# port will be opened if one is specified", "baudrate", "=", ...
https://github.com/hanpfei/chromium-net/blob/392cc1fa3a8f92f42e4071ab6e674d8e0482f83f/third_party/catapult/telemetry/third_party/pyserial/serial/serialutil.py#L234-L282
bristolcrypto/SPDZ-2
721abfae849625a02ea49aabc534f9cf41ca643f
Compiler/comparison.py
python
PreMulC_end
(p, a, c, m, z)
Helper function for all PreMulC variants. Local operation.
Helper function for all PreMulC variants. Local operation.
[ "Helper", "function", "for", "all", "PreMulC", "variants", ".", "Local", "operation", "." ]
def PreMulC_end(p, a, c, m, z): """ Helper function for all PreMulC variants. Local operation. """ k = len(a) c[0] = m[0] for j in range(1,k): mulc(c[j], c[j-1], m[j]) if isinstance(p, list): mulm(p[j], z[j], c[j]) if isinstance(p, list): p[0] = a[0] e...
[ "def", "PreMulC_end", "(", "p", ",", "a", ",", "c", ",", "m", ",", "z", ")", ":", "k", "=", "len", "(", "a", ")", "c", "[", "0", "]", "=", "m", "[", "0", "]", "for", "j", "in", "range", "(", "1", ",", "k", ")", ":", "mulc", "(", "c", ...
https://github.com/bristolcrypto/SPDZ-2/blob/721abfae849625a02ea49aabc534f9cf41ca643f/Compiler/comparison.py#L475-L488
gimli-org/gimli
17aa2160de9b15ababd9ef99e89b1bc3277bbb23
pygimli/frameworks/modelling.py
python
JointModelling.createJacobian
(self, model)
Fill the individual Jacobian matrices.
Fill the individual Jacobian matrices.
[ "Fill", "the", "individual", "Jacobian", "matrices", "." ]
def createJacobian(self, model): """Fill the individual Jacobian matrices.""" self.initJacobian() for f in self.fops: f.createJacobian(model)
[ "def", "createJacobian", "(", "self", ",", "model", ")", ":", "self", ".", "initJacobian", "(", ")", "for", "f", "in", "self", ".", "fops", ":", "f", ".", "createJacobian", "(", "model", ")" ]
https://github.com/gimli-org/gimli/blob/17aa2160de9b15ababd9ef99e89b1bc3277bbb23/pygimli/frameworks/modelling.py#L744-L748
apple/turicreate
cce55aa5311300e3ce6af93cb45ba791fd1bdf49
src/external/coremltools_wrap/coremltools/coremltools/models/neural_network/builder.py
python
NeuralNetworkBuilder.add_get_shape
(self, name, input_name, output_name)
return spec_layer
Add a get_shape layer to the model. Refer to the **GetShapeLayerParams** message in specification (NeuralNetwork.proto) for more details. Parameters ---------- name: str The name of this layer. input_name: str The input blob name of this layer. ...
Add a get_shape layer to the model. Refer to the **GetShapeLayerParams** message in specification (NeuralNetwork.proto) for more details.
[ "Add", "a", "get_shape", "layer", "to", "the", "model", ".", "Refer", "to", "the", "**", "GetShapeLayerParams", "**", "message", "in", "specification", "(", "NeuralNetwork", ".", "proto", ")", "for", "more", "details", "." ]
def add_get_shape(self, name, input_name, output_name): """ Add a get_shape layer to the model. Refer to the **GetShapeLayerParams** message in specification (NeuralNetwork.proto) for more details. Parameters ---------- name: str The name of this laye...
[ "def", "add_get_shape", "(", "self", ",", "name", ",", "input_name", ",", "output_name", ")", ":", "spec_layer", "=", "self", ".", "_add_generic_layer", "(", "name", ",", "[", "input_name", "]", ",", "[", "output_name", "]", ")", "spec_layer", ".", "getSha...
https://github.com/apple/turicreate/blob/cce55aa5311300e3ce6af93cb45ba791fd1bdf49/src/external/coremltools_wrap/coremltools/coremltools/models/neural_network/builder.py#L6794-L6817
pytorch/pytorch
7176c92687d3cc847cc046bf002269c6949a21c2
torch/utils/tensorboard/writer.py
python
SummaryWriter._check_caffe2_blob
(self, item)
return isinstance(item, str)
Caffe2 users have the option of passing a string representing the name of a blob in the workspace instead of passing the actual Tensor/array containing the numeric values. Thus, we need to check if we received a string as input instead of an actual Tensor/array, and if so, we need to fetch the B...
Caffe2 users have the option of passing a string representing the name of a blob in the workspace instead of passing the actual Tensor/array containing the numeric values. Thus, we need to check if we received a string as input instead of an actual Tensor/array, and if so, we need to fetch the B...
[ "Caffe2", "users", "have", "the", "option", "of", "passing", "a", "string", "representing", "the", "name", "of", "a", "blob", "in", "the", "workspace", "instead", "of", "passing", "the", "actual", "Tensor", "/", "array", "containing", "the", "numeric", "valu...
def _check_caffe2_blob(self, item): """ Caffe2 users have the option of passing a string representing the name of a blob in the workspace instead of passing the actual Tensor/array containing the numeric values. Thus, we need to check if we received a string as input instead of a...
[ "def", "_check_caffe2_blob", "(", "self", ",", "item", ")", ":", "return", "isinstance", "(", "item", ",", "str", ")" ]
https://github.com/pytorch/pytorch/blob/7176c92687d3cc847cc046bf002269c6949a21c2/torch/utils/tensorboard/writer.py#L232-L245
idaholab/moose
9eeebc65e098b4c30f8205fb41591fd5b61eb6ff
python/MooseDocs/base/readers.py
python
Reader.preExecute
(self)
Called by Translator prior to beginning conversion.
Called by Translator prior to beginning conversion.
[ "Called", "by", "Translator", "prior", "to", "beginning", "conversion", "." ]
def preExecute(self): """ Called by Translator prior to beginning conversion. """ pass
[ "def", "preExecute", "(", "self", ")", ":", "pass" ]
https://github.com/idaholab/moose/blob/9eeebc65e098b4c30f8205fb41591fd5b61eb6ff/python/MooseDocs/base/readers.py#L125-L129
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/osx_carbon/html.py
python
HtmlBookRecord.SetStart
(*args, **kwargs)
return _html.HtmlBookRecord_SetStart(*args, **kwargs)
SetStart(self, String start)
SetStart(self, String start)
[ "SetStart", "(", "self", "String", "start", ")" ]
def SetStart(*args, **kwargs): """SetStart(self, String start)""" return _html.HtmlBookRecord_SetStart(*args, **kwargs)
[ "def", "SetStart", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_html", ".", "HtmlBookRecord_SetStart", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_carbon/html.py#L1447-L1449
ApolloAuto/apollo-platform
86d9dc6743b496ead18d597748ebabd34a513289
ros/ros_comm/rosmaster/src/rosmaster/master_api.py
python
ROSMasterHandler.registerSubscriber
(self, caller_id, topic, topic_type, caller_api)
return 1, "Subscribed to [%s]"%topic, pub_uris
Subscribe the caller to the specified topic. In addition to receiving a list of current publishers, the subscriber will also receive notifications of new publishers via the publisherUpdate API. @param caller_id: ROS caller id @type caller_id: str @param topic str: Fully-...
Subscribe the caller to the specified topic. In addition to receiving a list of current publishers, the subscriber will also receive notifications of new publishers via the publisherUpdate API.
[ "Subscribe", "the", "caller", "to", "the", "specified", "topic", ".", "In", "addition", "to", "receiving", "a", "list", "of", "current", "publishers", "the", "subscriber", "will", "also", "receive", "notifications", "of", "new", "publishers", "via", "the", "pu...
def registerSubscriber(self, caller_id, topic, topic_type, caller_api): """ Subscribe the caller to the specified topic. In addition to receiving a list of current publishers, the subscriber will also receive notifications of new publishers via the publisherUpdate API. @p...
[ "def", "registerSubscriber", "(", "self", ",", "caller_id", ",", "topic", ",", "topic_type", ",", "caller_api", ")", ":", "#NOTE: subscribers do not get to set topic type", "try", ":", "self", ".", "ps_lock", ".", "acquire", "(", ")", "self", ".", "reg_manager", ...
https://github.com/ApolloAuto/apollo-platform/blob/86d9dc6743b496ead18d597748ebabd34a513289/ros/ros_comm/rosmaster/src/rosmaster/master_api.py#L666-L696
apache/madlib
be297fe6beada0640f93317e8948834032718e32
src/madpack/madpack.py
python
_execute_per_module_db_create_obj_algo
(schema, maddir_mod_py, module, sqlfile, algoname, cur_tmpdir, upgrade, create_obj_handle, sc)
Perform operations that have to be done per module when _db_create_objects function is invoked
Perform operations that have to be done per module when _db_create_objects function is invoked
[ "Perform", "operations", "that", "have", "to", "be", "done", "per", "module", "when", "_db_create_objects", "function", "is", "invoked" ]
def _execute_per_module_db_create_obj_algo(schema, maddir_mod_py, module, sqlfile, algoname, cur_tmpdir, upgrade, create_obj_handle, sc): """ Perform operations that have to be done per module when _db_create_objec...
[ "def", "_execute_per_module_db_create_obj_algo", "(", "schema", ",", "maddir_mod_py", ",", "module", ",", "sqlfile", ",", "algoname", ",", "cur_tmpdir", ",", "upgrade", ",", "create_obj_handle", ",", "sc", ")", ":", "if", "not", "upgrade", ":", "_run_m4_and_append...
https://github.com/apache/madlib/blob/be297fe6beada0640f93317e8948834032718e32/src/madpack/madpack.py#L721-L737
yushroom/FishEngine
a4b9fb9b0a6dc202f7990e75f4b7d8d5163209d9
Script/reflect/clang/cindex.py
python
Type.spelling
(self)
return conf.lib.clang_getTypeSpelling(self)
Retrieve the spelling of this Type.
Retrieve the spelling of this Type.
[ "Retrieve", "the", "spelling", "of", "this", "Type", "." ]
def spelling(self): """Retrieve the spelling of this Type.""" return conf.lib.clang_getTypeSpelling(self)
[ "def", "spelling", "(", "self", ")", ":", "return", "conf", ".", "lib", ".", "clang_getTypeSpelling", "(", "self", ")" ]
https://github.com/yushroom/FishEngine/blob/a4b9fb9b0a6dc202f7990e75f4b7d8d5163209d9/Script/reflect/clang/cindex.py#L2155-L2157
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/osx_carbon/_misc.py
python
LogMessage
(*args, **kwargs)
return _misc_.LogMessage(*args, **kwargs)
LogMessage(String msg)
LogMessage(String msg)
[ "LogMessage", "(", "String", "msg", ")" ]
def LogMessage(*args, **kwargs): """LogMessage(String msg)""" return _misc_.LogMessage(*args, **kwargs)
[ "def", "LogMessage", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_misc_", ".", "LogMessage", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_carbon/_misc.py#L1859-L1861
hpi-xnor/BMXNet
ed0b201da6667887222b8e4b5f997c4f6b61943d
example/image-classification/symbols/resnet-v1.py
python
residual_unit
(data, num_filter, stride, dim_match, name, bottle_neck=True, bn_mom=0.9, workspace=256, memonger=False)
Return ResNet Unit symbol for building ResNet Parameters ---------- data : str Input data num_filter : int Number of output channels bnf : int Bottle neck channels factor with regard to num_filter stride : tuple Stride used in convolution dim_match : Boolean ...
Return ResNet Unit symbol for building ResNet Parameters ---------- data : str Input data num_filter : int Number of output channels bnf : int Bottle neck channels factor with regard to num_filter stride : tuple Stride used in convolution dim_match : Boolean ...
[ "Return", "ResNet", "Unit", "symbol", "for", "building", "ResNet", "Parameters", "----------", "data", ":", "str", "Input", "data", "num_filter", ":", "int", "Number", "of", "output", "channels", "bnf", ":", "int", "Bottle", "neck", "channels", "factor", "with...
def residual_unit(data, num_filter, stride, dim_match, name, bottle_neck=True, bn_mom=0.9, workspace=256, memonger=False): """Return ResNet Unit symbol for building ResNet Parameters ---------- data : str Input data num_filter : int Number of output channels bnf : int Bot...
[ "def", "residual_unit", "(", "data", ",", "num_filter", ",", "stride", ",", "dim_match", ",", "name", ",", "bottle_neck", "=", "True", ",", "bn_mom", "=", "0.9", ",", "workspace", "=", "256", ",", "memonger", "=", "False", ")", ":", "if", "bottle_neck", ...
https://github.com/hpi-xnor/BMXNet/blob/ed0b201da6667887222b8e4b5f997c4f6b61943d/example/image-classification/symbols/resnet-v1.py#L29-L87
apple/swift-clang
d7403439fc6641751840b723e7165fb02f52db95
bindings/python/clang/cindex.py
python
Token.location
(self)
return conf.lib.clang_getTokenLocation(self._tu, self)
The SourceLocation this Token occurs at.
The SourceLocation this Token occurs at.
[ "The", "SourceLocation", "this", "Token", "occurs", "at", "." ]
def location(self): """The SourceLocation this Token occurs at.""" return conf.lib.clang_getTokenLocation(self._tu, self)
[ "def", "location", "(", "self", ")", ":", "return", "conf", ".", "lib", ".", "clang_getTokenLocation", "(", "self", ".", "_tu", ",", "self", ")" ]
https://github.com/apple/swift-clang/blob/d7403439fc6641751840b723e7165fb02f52db95/bindings/python/clang/cindex.py#L3299-L3301
google/earthenterprise
0fe84e29be470cd857e3a0e52e5d0afd5bb8cee9
earth_enterprise/src/server/wsgi/wms/ogc/common/xform.py
python
WindowViewportMapping.LogPtToPhys
(self, log_pt)
return geom.Pair(phys_x, phys_y)
Find tilepixel space point, of <log_pt>. Args: log_pt: window point. Returns: Corresponding viewport, for us tilepixel space, point.
Find tilepixel space point, of <log_pt>.
[ "Find", "tilepixel", "space", "point", "of", "<log_pt", ">", "." ]
def LogPtToPhys(self, log_pt): """Find tilepixel space point, of <log_pt>. Args: log_pt: window point. Returns: Corresponding viewport, for us tilepixel space, point. """ utils.Assert(isinstance(log_pt, geom.Pair), "logpt is not a geom.Pair") phys_x = (log_pt.x * self._logical...
[ "def", "LogPtToPhys", "(", "self", ",", "log_pt", ")", ":", "utils", ".", "Assert", "(", "isinstance", "(", "log_pt", ",", "geom", ".", "Pair", ")", ",", "\"logpt is not a geom.Pair\"", ")", "phys_x", "=", "(", "log_pt", ".", "x", "*", "self", ".", "_l...
https://github.com/google/earthenterprise/blob/0fe84e29be470cd857e3a0e52e5d0afd5bb8cee9/earth_enterprise/src/server/wsgi/wms/ogc/common/xform.py#L71-L87
benoitsteiner/tensorflow-opencl
cb7cb40a57fde5cfd4731bc551e82a1e2fef43a5
tensorflow/python/client/session.py
python
InteractiveSession.__init__
(self, target='', graph=None, config=None)
Creates a new interactive TensorFlow session. If no `graph` argument is specified when constructing the session, the default graph will be launched in the session. If you are using more than one graph (created with `tf.Graph()` in the same process, you will have to use different sessions for each graph...
Creates a new interactive TensorFlow session.
[ "Creates", "a", "new", "interactive", "TensorFlow", "session", "." ]
def __init__(self, target='', graph=None, config=None): """Creates a new interactive TensorFlow session. If no `graph` argument is specified when constructing the session, the default graph will be launched in the session. If you are using more than one graph (created with `tf.Graph()` in the same ...
[ "def", "__init__", "(", "self", ",", "target", "=", "''", ",", "graph", "=", "None", ",", "config", "=", "None", ")", ":", "if", "not", "config", ":", "# If config is not provided, choose some reasonable defaults for", "# interactive use:", "#", "# - Grow GPU memo...
https://github.com/benoitsteiner/tensorflow-opencl/blob/cb7cb40a57fde5cfd4731bc551e82a1e2fef43a5/tensorflow/python/client/session.py#L1585-L1620
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/msw/_core.py
python
Window.ClientToScreenXY
(*args, **kwargs)
return _core_.Window_ClientToScreenXY(*args, **kwargs)
ClientToScreenXY(int x, int y) -> (x,y) Converts to screen coordinates from coordinates relative to this window.
ClientToScreenXY(int x, int y) -> (x,y)
[ "ClientToScreenXY", "(", "int", "x", "int", "y", ")", "-", ">", "(", "x", "y", ")" ]
def ClientToScreenXY(*args, **kwargs): """ ClientToScreenXY(int x, int y) -> (x,y) Converts to screen coordinates from coordinates relative to this window. """ return _core_.Window_ClientToScreenXY(*args, **kwargs)
[ "def", "ClientToScreenXY", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_core_", ".", "Window_ClientToScreenXY", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/msw/_core.py#L11048-L11054
lighttransport/nanogi
98cd6b40b8a5b0f96a62e631b51faf4b57c341b3
utils/exporters/blender/io_nanogi/yaml/__init__.py
python
add_implicit_resolver
(tag, regexp, first=None, Loader=Loader, Dumper=Dumper)
Add an implicit scalar detector. If an implicit scalar value matches the given regexp, the corresponding tag is assigned to the scalar. first is a sequence of possible initial characters or None.
Add an implicit scalar detector. If an implicit scalar value matches the given regexp, the corresponding tag is assigned to the scalar. first is a sequence of possible initial characters or None.
[ "Add", "an", "implicit", "scalar", "detector", ".", "If", "an", "implicit", "scalar", "value", "matches", "the", "given", "regexp", "the", "corresponding", "tag", "is", "assigned", "to", "the", "scalar", ".", "first", "is", "a", "sequence", "of", "possible",...
def add_implicit_resolver(tag, regexp, first=None, Loader=Loader, Dumper=Dumper): """ Add an implicit scalar detector. If an implicit scalar value matches the given regexp, the corresponding tag is assigned to the scalar. first is a sequence of possible initial characters or None. """ ...
[ "def", "add_implicit_resolver", "(", "tag", ",", "regexp", ",", "first", "=", "None", ",", "Loader", "=", "Loader", ",", "Dumper", "=", "Dumper", ")", ":", "Loader", ".", "add_implicit_resolver", "(", "tag", ",", "regexp", ",", "first", ")", "Dumper", "....
https://github.com/lighttransport/nanogi/blob/98cd6b40b8a5b0f96a62e631b51faf4b57c341b3/utils/exporters/blender/io_nanogi/yaml/__init__.py#L218-L227