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
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/numpy/py3/numpy/typing/_generic_alias.py
python
_GenericAlias.__getitem__
(self: _T, key: Any)
return _reconstruct_alias(self, key_iter)
Return ``self[key]``.
Return ``self[key]``.
[ "Return", "self", "[", "key", "]", "." ]
def __getitem__(self: _T, key: Any) -> _T: """Return ``self[key]``.""" key_tup = key if isinstance(key, tuple) else (key,) if len(self.__parameters__) == 0: raise TypeError(f"There are no type variables left in {self}") elif len(key_tup) > len(self.__parameters__): ...
[ "def", "__getitem__", "(", "self", ":", "_T", ",", "key", ":", "Any", ")", "->", "_T", ":", "key_tup", "=", "key", "if", "isinstance", "(", "key", ",", "tuple", ")", "else", "(", "key", ",", ")", "if", "len", "(", "self", ".", "__parameters__", "...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/numpy/py3/numpy/typing/_generic_alias.py#L151-L163
infinit/elle
a8154593c42743f45b9df09daf62b44630c24a02
drake/src/drake/git.py
python
Git.__init__
(self, path = None, command = GitCommand())
Create a GitVersion. path -- path to the repository; the source dir by default.
Create a GitVersion.
[ "Create", "a", "GitVersion", "." ]
def __init__(self, path = None, command = GitCommand()): """Create a GitVersion. path -- path to the repository; the source dir by default. """ if path is None: path = '.' self.__path = drake.path_source(path) self.__name = drake.path_build(path) supe...
[ "def", "__init__", "(", "self", ",", "path", "=", "None", ",", "command", "=", "GitCommand", "(", ")", ")", ":", "if", "path", "is", "None", ":", "path", "=", "'.'", "self", ".", "__path", "=", "drake", ".", "path_source", "(", "path", ")", "self",...
https://github.com/infinit/elle/blob/a8154593c42743f45b9df09daf62b44630c24a02/drake/src/drake/git.py#L54-L63
TimoSaemann/caffe-segnet-cudnn5
abcf30dca449245e101bf4ced519f716177f0885
examples/finetune_flickr_style/assemble_data.py
python
download_image
(args_tuple)
For use with multiprocessing map. Returns filename on fail.
For use with multiprocessing map. Returns filename on fail.
[ "For", "use", "with", "multiprocessing", "map", ".", "Returns", "filename", "on", "fail", "." ]
def download_image(args_tuple): "For use with multiprocessing map. Returns filename on fail." try: url, filename = args_tuple if not os.path.exists(filename): urllib.urlretrieve(url, filename) with open(filename) as f: assert hashlib.sha1(f.read()).hexdigest() != ...
[ "def", "download_image", "(", "args_tuple", ")", ":", "try", ":", "url", ",", "filename", "=", "args_tuple", "if", "not", "os", ".", "path", ".", "exists", "(", "filename", ")", ":", "urllib", ".", "urlretrieve", "(", "url", ",", "filename", ")", "with...
https://github.com/TimoSaemann/caffe-segnet-cudnn5/blob/abcf30dca449245e101bf4ced519f716177f0885/examples/finetune_flickr_style/assemble_data.py#L23-L36
krishauser/Klampt
972cc83ea5befac3f653c1ba20f80155768ad519
Python/python2_version/klampt/plan/kinetrajopt/kinetrajopt.py
python
KineTrajOpt.add_pose_constraint
(self, index, linkid, pose)
Add constraint such that at index of the trajectory, the robot link linkid is at pose
Add constraint such that at index of the trajectory, the robot link linkid is at pose
[ "Add", "constraint", "such", "that", "at", "index", "of", "the", "trajectory", "the", "robot", "link", "linkid", "is", "at", "pose" ]
def add_pose_constraint(self, index, linkid, pose): """Add constraint such that at index of the trajectory, the robot link linkid is at pose""" self.constrs.add_eq(index, PoseConstraint(self.robot, linkid, pose))
[ "def", "add_pose_constraint", "(", "self", ",", "index", ",", "linkid", ",", "pose", ")", ":", "self", ".", "constrs", ".", "add_eq", "(", "index", ",", "PoseConstraint", "(", "self", ".", "robot", ",", "linkid", ",", "pose", ")", ")" ]
https://github.com/krishauser/Klampt/blob/972cc83ea5befac3f653c1ba20f80155768ad519/Python/python2_version/klampt/plan/kinetrajopt/kinetrajopt.py#L161-L163
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/msw/_controls.py
python
StaticLine.IsVertical
(*args, **kwargs)
return _controls_.StaticLine_IsVertical(*args, **kwargs)
IsVertical(self) -> bool
IsVertical(self) -> bool
[ "IsVertical", "(", "self", ")", "-", ">", "bool" ]
def IsVertical(*args, **kwargs): """IsVertical(self) -> bool""" return _controls_.StaticLine_IsVertical(*args, **kwargs)
[ "def", "IsVertical", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_controls_", ".", "StaticLine_IsVertical", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/msw/_controls.py#L926-L928
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/prompt-toolkit/py3/prompt_toolkit/key_binding/bindings/scroll.py
python
scroll_half_page_up
(event: E)
Same as ControlB, but only scroll half a page.
Same as ControlB, but only scroll half a page.
[ "Same", "as", "ControlB", "but", "only", "scroll", "half", "a", "page", "." ]
def scroll_half_page_up(event: E) -> None: """ Same as ControlB, but only scroll half a page. """ scroll_backward(event, half=True)
[ "def", "scroll_half_page_up", "(", "event", ":", "E", ")", "->", "None", ":", "scroll_backward", "(", "event", ",", "half", "=", "True", ")" ]
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/prompt-toolkit/py3/prompt_toolkit/key_binding/bindings/scroll.py#L90-L94
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/numpy/py2/numpy/core/numeric.py
python
roll
(a, shift, axis=None)
Roll array elements along a given axis. Elements that roll beyond the last position are re-introduced at the first. Parameters ---------- a : array_like Input array. shift : int or tuple of ints The number of places by which elements are shifted. If a tuple, then `axis...
Roll array elements along a given axis.
[ "Roll", "array", "elements", "along", "a", "given", "axis", "." ]
def roll(a, shift, axis=None): """ Roll array elements along a given axis. Elements that roll beyond the last position are re-introduced at the first. Parameters ---------- a : array_like Input array. shift : int or tuple of ints The number of places by which elements a...
[ "def", "roll", "(", "a", ",", "shift", ",", "axis", "=", "None", ")", ":", "a", "=", "asanyarray", "(", "a", ")", "if", "axis", "is", "None", ":", "return", "roll", "(", "a", ".", "ravel", "(", ")", ",", "shift", ",", "0", ")", ".", "reshape"...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/numpy/py2/numpy/core/numeric.py#L1402-L1488
cms-sw/cmssw
fd9de012d503d3405420bcbeec0ec879baa57cf2
Validation/RecoTrack/python/plotting/plotting.py
python
PlotFolder.draw
(self, prefix=None, separate=False, saveFormat=".pdf", ratio=True, directory="")
return ret
Draw and save all plots using settings of a given algorithm. Arguments: prefix -- Optional string for file name prefix (default None) separate -- Save the plots of a group to separate files instead of a file per group (default False) saveFormat -- String specifying the plot format (...
Draw and save all plots using settings of a given algorithm.
[ "Draw", "and", "save", "all", "plots", "using", "settings", "of", "a", "given", "algorithm", "." ]
def draw(self, prefix=None, separate=False, saveFormat=".pdf", ratio=True, directory=""): """Draw and save all plots using settings of a given algorithm. Arguments: prefix -- Optional string for file name prefix (default None) separate -- Save the plots of a group to separate files in...
[ "def", "draw", "(", "self", ",", "prefix", "=", "None", ",", "separate", "=", "False", ",", "saveFormat", "=", "\".pdf\"", ",", "ratio", "=", "True", ",", "directory", "=", "\"\"", ")", ":", "ret", "=", "[", "]", "for", "pg", "in", "self", ".", "...
https://github.com/cms-sw/cmssw/blob/fd9de012d503d3405420bcbeec0ec879baa57cf2/Validation/RecoTrack/python/plotting/plotting.py#L2647-L2661
eclipse/sumo
7132a9b8b6eea734bdec38479026b4d8c4336d03
tools/contributed/sumopy/plugins/common/wxgui.py
python
WxGui.init_widgets
(self, mainframe)
Set mainframe and initialize widgets to various places.
Set mainframe and initialize widgets to various places.
[ "Set", "mainframe", "and", "initialize", "widgets", "to", "various", "places", "." ]
def init_widgets(self, mainframe): """ Set mainframe and initialize widgets to various places. """ self._mainframe = mainframe #self._neteditor = mainframe.add_view("Network", Neteditor) # mainframe.browse_obj(self._module) self.make_menu() self.make_tool...
[ "def", "init_widgets", "(", "self", ",", "mainframe", ")", ":", "self", ".", "_mainframe", "=", "mainframe", "#self._neteditor = mainframe.add_view(\"Network\", Neteditor)", "# mainframe.browse_obj(self._module)", "self", ".", "make_menu", "(", ")", "self", ".", "make_too...
https://github.com/eclipse/sumo/blob/7132a9b8b6eea734bdec38479026b4d8c4336d03/tools/contributed/sumopy/plugins/common/wxgui.py#L36-L45
microsoft/checkedc-clang
a173fefde5d7877b7750e7ce96dd08cf18baebf2
compiler-rt/lib/sanitizer_common/scripts/cpplint.py
python
UpdateIncludeState
(filename, include_dict, io=codecs)
return True
Fill up the include_dict with new includes found from the file. Args: filename: the name of the header to read. include_dict: a dictionary in which the headers are inserted. io: The io factory to use to read the file. Provided for testability. Returns: True if a header was successfully added. Fals...
Fill up the include_dict with new includes found from the file.
[ "Fill", "up", "the", "include_dict", "with", "new", "includes", "found", "from", "the", "file", "." ]
def UpdateIncludeState(filename, include_dict, io=codecs): """Fill up the include_dict with new includes found from the file. Args: filename: the name of the header to read. include_dict: a dictionary in which the headers are inserted. io: The io factory to use to read the file. Provided for testabilit...
[ "def", "UpdateIncludeState", "(", "filename", ",", "include_dict", ",", "io", "=", "codecs", ")", ":", "headerfile", "=", "None", "try", ":", "headerfile", "=", "io", ".", "open", "(", "filename", ",", "'r'", ",", "'utf8'", ",", "'replace'", ")", "except...
https://github.com/microsoft/checkedc-clang/blob/a173fefde5d7877b7750e7ce96dd08cf18baebf2/compiler-rt/lib/sanitizer_common/scripts/cpplint.py#L5471-L5495
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/setuptools/py3/setuptools/_distutils/text_file.py
python
TextFile.close
(self)
Close the current file and forget everything we know about it (filename, current line number).
Close the current file and forget everything we know about it (filename, current line number).
[ "Close", "the", "current", "file", "and", "forget", "everything", "we", "know", "about", "it", "(", "filename", "current", "line", "number", ")", "." ]
def close(self): """Close the current file and forget everything we know about it (filename, current line number).""" file = self.file self.file = None self.filename = None self.current_line = None file.close()
[ "def", "close", "(", "self", ")", ":", "file", "=", "self", ".", "file", "self", ".", "file", "=", "None", "self", ".", "filename", "=", "None", "self", ".", "current_line", "=", "None", "file", ".", "close", "(", ")" ]
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/setuptools/py3/setuptools/_distutils/text_file.py#L118-L125
hanpfei/chromium-net
392cc1fa3a8f92f42e4071ab6e674d8e0482f83f
build/android/pylib/remote/device/remote_device_environment.py
python
RemoteDeviceEnvironment._FindDevice
(self)
return False
Find which device to use.
Find which device to use.
[ "Find", "which", "device", "to", "use", "." ]
def _FindDevice(self): """Find which device to use.""" logging.info('Finding device to run tests on.') device_list = self._GetDeviceList() random.shuffle(device_list) for device in device_list: if device['os_name'] != self._device_type: continue if self._remote_device and device[...
[ "def", "_FindDevice", "(", "self", ")", ":", "logging", ".", "info", "(", "'Finding device to run tests on.'", ")", "device_list", "=", "self", ".", "_GetDeviceList", "(", ")", "random", ".", "shuffle", "(", "device_list", ")", "for", "device", "in", "device_l...
https://github.com/hanpfei/chromium-net/blob/392cc1fa3a8f92f42e4071ab6e674d8e0482f83f/build/android/pylib/remote/device/remote_device_environment.py#L253-L277
wlanjie/AndroidFFmpeg
7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf
tools/fdk-aac-build/armeabi-v7a/toolchain/lib/python2.7/idlelib/TreeWidget.py
python
TreeItem.IsExpandable
(self)
return 1
Return whether there are subitems.
Return whether there are subitems.
[ "Return", "whether", "there", "are", "subitems", "." ]
def IsExpandable(self): """Return whether there are subitems.""" return 1
[ "def", "IsExpandable", "(", "self", ")", ":", "return", "1" ]
https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/armeabi-v7a/toolchain/lib/python2.7/idlelib/TreeWidget.py#L330-L332
leanprover/lean
72a965986fa5aeae54062e98efb3140b2c4e79fd
src/cmake/Modules/cpplint.py
python
_SetOutputFormat
(output_format)
Sets the module's output format.
Sets the module's output format.
[ "Sets", "the", "module", "s", "output", "format", "." ]
def _SetOutputFormat(output_format): """Sets the module's output format.""" _cpplint_state.SetOutputFormat(output_format)
[ "def", "_SetOutputFormat", "(", "output_format", ")", ":", "_cpplint_state", ".", "SetOutputFormat", "(", "output_format", ")" ]
https://github.com/leanprover/lean/blob/72a965986fa5aeae54062e98efb3140b2c4e79fd/src/cmake/Modules/cpplint.py#L706-L708
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/py/py/_log/log.py
python
File.__call__
(self, msg)
write a message to the log
write a message to the log
[ "write", "a", "message", "to", "the", "log" ]
def __call__(self, msg): """ write a message to the log """ self._file.write(str(msg) + "\n") if hasattr(self._file, 'flush'): self._file.flush()
[ "def", "__call__", "(", "self", ",", "msg", ")", ":", "self", ".", "_file", ".", "write", "(", "str", "(", "msg", ")", "+", "\"\\n\"", ")", "if", "hasattr", "(", "self", ".", "_file", ",", "'flush'", ")", ":", "self", ".", "_file", ".", "flush", ...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/py/py/_log/log.py#L141-L145
ChromiumWebApps/chromium
c7361d39be8abd1574e6ce8957c8dbddd4c6ccf7
third_party/closure_linter/closure_linter/gjslint.py
python
main
(argv = None)
Main function. Args: argv: Sequence of command line arguments.
Main function.
[ "Main", "function", "." ]
def main(argv = None): """Main function. Args: argv: Sequence of command line arguments. """ if argv is None: argv = flags.FLAGS(sys.argv) if FLAGS.time: start_time = time.time() suffixes = ['.js'] if FLAGS.additional_extensions: suffixes += ['.%s' % ext for ext in FLAGS.additional_exte...
[ "def", "main", "(", "argv", "=", "None", ")", ":", "if", "argv", "is", "None", ":", "argv", "=", "flags", ".", "FLAGS", "(", "sys", ".", "argv", ")", "if", "FLAGS", ".", "time", ":", "start_time", "=", "time", ".", "time", "(", ")", "suffixes", ...
https://github.com/ChromiumWebApps/chromium/blob/c7361d39be8abd1574e6ce8957c8dbddd4c6ccf7/third_party/closure_linter/closure_linter/gjslint.py#L219-L287
dfm/celerite
62c8ce6f5816c655ad2a2d1b3eaaaf9fc7ca7908
celerite/modeling.py
python
Model.freeze_all_parameters
(self)
Freeze all parameters of the model
Freeze all parameters of the model
[ "Freeze", "all", "parameters", "of", "the", "model" ]
def freeze_all_parameters(self): """Freeze all parameters of the model""" self.unfrozen_mask[:] = False
[ "def", "freeze_all_parameters", "(", "self", ")", ":", "self", ".", "unfrozen_mask", "[", ":", "]", "=", "False" ]
https://github.com/dfm/celerite/blob/62c8ce6f5816c655ad2a2d1b3eaaaf9fc7ca7908/celerite/modeling.py#L266-L268
mantidproject/mantid
03deeb89254ec4289edb8771e0188c2090a02f32
Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/ReflectometryISISLoadAndProcess.py
python
ReflectometryISISLoadAndProcess._finalize
(self, child_alg)
Set our output properties from the results in the given child algorithm
Set our output properties from the results in the given child algorithm
[ "Set", "our", "output", "properties", "from", "the", "results", "in", "the", "given", "child", "algorithm" ]
def _finalize(self, child_alg): """Set our output properties from the results in the given child algorithm""" # Set the main workspace outputs self._setOutputProperty(Prop.OUTPUT_WS, child_alg) self._setOutputProperty(Prop.OUTPUT_WS_BINNED, child_alg) self._setOutputProperty(Prop...
[ "def", "_finalize", "(", "self", ",", "child_alg", ")", ":", "# Set the main workspace outputs", "self", ".", "_setOutputProperty", "(", "Prop", ".", "OUTPUT_WS", ",", "child_alg", ")", "self", ".", "_setOutputProperty", "(", "Prop", ".", "OUTPUT_WS_BINNED", ",", ...
https://github.com/mantidproject/mantid/blob/03deeb89254ec4289edb8771e0188c2090a02f32/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/ReflectometryISISLoadAndProcess.py#L463-L476
apple/swift-clang
d7403439fc6641751840b723e7165fb02f52db95
utils/check_cfc/obj_diff.py
python
compare_exact
(objfilea, objfileb)
return filecmp.cmp(objfilea, objfileb)
Byte for byte comparison between object files. Returns True if equal, False otherwise.
Byte for byte comparison between object files. Returns True if equal, False otherwise.
[ "Byte", "for", "byte", "comparison", "between", "object", "files", ".", "Returns", "True", "if", "equal", "False", "otherwise", "." ]
def compare_exact(objfilea, objfileb): """Byte for byte comparison between object files. Returns True if equal, False otherwise. """ return filecmp.cmp(objfilea, objfileb)
[ "def", "compare_exact", "(", "objfilea", ",", "objfileb", ")", ":", "return", "filecmp", ".", "cmp", "(", "objfilea", ",", "objfileb", ")" ]
https://github.com/apple/swift-clang/blob/d7403439fc6641751840b723e7165fb02f52db95/utils/check_cfc/obj_diff.py#L86-L90
BitMEX/api-connectors
37a3a5b806ad5d0e0fc975ab86d9ed43c3bcd812
auto-generated/python/swagger_client/api/user_api.py
python
UserApi.user_request_withdrawal
(self, currency, amount, address, **kwargs)
Request a withdrawal to an external wallet. # noqa: E501 This will send a confirmation email to the email address on record. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.user_req...
Request a withdrawal to an external wallet. # noqa: E501
[ "Request", "a", "withdrawal", "to", "an", "external", "wallet", ".", "#", "noqa", ":", "E501" ]
def user_request_withdrawal(self, currency, amount, address, **kwargs): # noqa: E501 """Request a withdrawal to an external wallet. # noqa: E501 This will send a confirmation email to the email address on record. # noqa: E501 This method makes a synchronous HTTP request by default. To make a...
[ "def", "user_request_withdrawal", "(", "self", ",", "currency", ",", "amount", ",", "address", ",", "*", "*", "kwargs", ")", ":", "# noqa: E501", "kwargs", "[", "'_return_http_data_only'", "]", "=", "True", "if", "kwargs", ".", "get", "(", "'async_req'", ")"...
https://github.com/BitMEX/api-connectors/blob/37a3a5b806ad5d0e0fc975ab86d9ed43c3bcd812/auto-generated/python/swagger_client/api/user_api.py#L1645-L1670
neoml-lib/neoml
a0d370fba05269a1b2258cef126f77bbd2054a3e
NeoML/Python/neoml/Dnn/Qrnn.py
python
Qrnn.padding_back
(self)
return self._internal.get_padding_back()
Gets the size of zero padding at the sequence end.
Gets the size of zero padding at the sequence end.
[ "Gets", "the", "size", "of", "zero", "padding", "at", "the", "sequence", "end", "." ]
def padding_back(self): """Gets the size of zero padding at the sequence end. """ return self._internal.get_padding_back()
[ "def", "padding_back", "(", "self", ")", ":", "return", "self", ".", "_internal", ".", "get_padding_back", "(", ")" ]
https://github.com/neoml-lib/neoml/blob/a0d370fba05269a1b2258cef126f77bbd2054a3e/NeoML/Python/neoml/Dnn/Qrnn.py#L202-L205
FreeCAD/FreeCAD
ba42231b9c6889b89e064d6d563448ed81e376ec
src/Mod/Arch/ArchIFCView.py
python
IfcContextUI.createMapConversionFormLayout
(self)
Creates form entries for the data being edited. Creates form entries for each of the data points being edited within the IFC complex attribute, RepresentationContexts.
Creates form entries for the data being edited.
[ "Creates", "form", "entries", "for", "the", "data", "being", "edited", "." ]
def createMapConversionFormLayout(self): """Creates form entries for the data being edited. Creates form entries for each of the data points being edited within the IFC complex attribute, RepresentationContexts. """ self.baseLayout.addWidget(self.createLabel("Target Coordinate ...
[ "def", "createMapConversionFormLayout", "(", "self", ")", ":", "self", ".", "baseLayout", ".", "addWidget", "(", "self", ".", "createLabel", "(", "\"Target Coordinate Reference System\"", ")", ")", "self", ".", "baseLayout", ".", "addLayout", "(", "self", ".", "...
https://github.com/FreeCAD/FreeCAD/blob/ba42231b9c6889b89e064d6d563448ed81e376ec/src/Mod/Arch/ArchIFCView.py#L65-L86
google-ar/WebARonTango
e86965d2cbc652156b480e0fcf77c716745578cd
chromium/src/gpu/command_buffer/build_gles2_cmd_buffer.py
python
Argument.GetValidNonCachedClientSideArg
(self, func)
return value
Returns a valid value for this argument in a GL call. Using the value will produce a command buffer service invocation. Returns None if there is no such value.
Returns a valid value for this argument in a GL call. Using the value will produce a command buffer service invocation. Returns None if there is no such value.
[ "Returns", "a", "valid", "value", "for", "this", "argument", "in", "a", "GL", "call", ".", "Using", "the", "value", "will", "produce", "a", "command", "buffer", "service", "invocation", ".", "Returns", "None", "if", "there", "is", "no", "such", "value", ...
def GetValidNonCachedClientSideArg(self, func): """Returns a valid value for this argument in a GL call. Using the value will produce a command buffer service invocation. Returns None if there is no such value.""" value = '123' if self.type == 'GLsync': return ("reinterpret_cast<GLsync>(%s)" %...
[ "def", "GetValidNonCachedClientSideArg", "(", "self", ",", "func", ")", ":", "value", "=", "'123'", "if", "self", ".", "type", "==", "'GLsync'", ":", "return", "(", "\"reinterpret_cast<GLsync>(%s)\"", "%", "value", ")", "return", "value" ]
https://github.com/google-ar/WebARonTango/blob/e86965d2cbc652156b480e0fcf77c716745578cd/chromium/src/gpu/command_buffer/build_gles2_cmd_buffer.py#L8563-L8570
windystrife/UnrealEngine_NVIDIAGameWorks
b50e6338a7c5b26374d66306ebc7807541ff815e
Engine/Extras/ThirdPartyNotUE/emsdk/Win64/python/2.7.5.3_64bit/Lib/lib-tk/Tix.py
python
Tree.autosetmode
(self)
This command calls the setmode method for all the entries in this Tree widget: if an entry has no child entries, its mode is set to none. Otherwise, if the entry has any hidden child entries, its mode is set to open; otherwise its mode is set to close.
This command calls the setmode method for all the entries in this Tree widget: if an entry has no child entries, its mode is set to none. Otherwise, if the entry has any hidden child entries, its mode is set to open; otherwise its mode is set to close.
[ "This", "command", "calls", "the", "setmode", "method", "for", "all", "the", "entries", "in", "this", "Tree", "widget", ":", "if", "an", "entry", "has", "no", "child", "entries", "its", "mode", "is", "set", "to", "none", ".", "Otherwise", "if", "the", ...
def autosetmode(self): '''This command calls the setmode method for all the entries in this Tree widget: if an entry has no child entries, its mode is set to none. Otherwise, if the entry has any hidden child entries, its mode is set to open; otherwise its mode is set to close.''' self.tk...
[ "def", "autosetmode", "(", "self", ")", ":", "self", ".", "tk", ".", "call", "(", "self", ".", "_w", ",", "'autosetmode'", ")" ]
https://github.com/windystrife/UnrealEngine_NVIDIAGameWorks/blob/b50e6338a7c5b26374d66306ebc7807541ff815e/Engine/Extras/ThirdPartyNotUE/emsdk/Win64/python/2.7.5.3_64bit/Lib/lib-tk/Tix.py#L1535-L1540
htcondor/htcondor
4829724575176d1d6c936e4693dfd78a728569b0
src/condor_contrib/condor_pigeon/src/condor_pigeon_client/skype_linux_tools/twitter.py
python
Status.__init__
(self, created_at=None, id=None, text=None, user=None, now=None)
An object to hold a Twitter status message. This class is normally instantiated by the twitter.Api class and returned in a sequence. Note: Dates are posted in the form "Sat Jan 27 04:17:38 +0000 2007" Args: created_at: The time this status message was posted id: The unique id of this stat...
An object to hold a Twitter status message.
[ "An", "object", "to", "hold", "a", "Twitter", "status", "message", "." ]
def __init__(self, created_at=None, id=None, text=None, user=None, now=None): '''An object to hold a Twitter status message. This class is normally instantiated by the twitter.Api class and returned in a sequence. Note: Dates a...
[ "def", "__init__", "(", "self", ",", "created_at", "=", "None", ",", "id", "=", "None", ",", "text", "=", "None", ",", "user", "=", "None", ",", "now", "=", "None", ")", ":", "self", ".", "created_at", "=", "created_at", "self", ".", "id", "=", "...
https://github.com/htcondor/htcondor/blob/4829724575176d1d6c936e4693dfd78a728569b0/src/condor_contrib/condor_pigeon/src/condor_pigeon_client/skype_linux_tools/twitter.py#L39-L68
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/tkinter/tix.py
python
CheckList.close
(self, entrypath)
Close the entry given by entryPath if its mode is close.
Close the entry given by entryPath if its mode is close.
[ "Close", "the", "entry", "given", "by", "entryPath", "if", "its", "mode", "is", "close", "." ]
def close(self, entrypath): '''Close the entry given by entryPath if its mode is close.''' self.tk.call(self._w, 'close', entrypath)
[ "def", "close", "(", "self", ",", "entrypath", ")", ":", "self", ".", "tk", ".", "call", "(", "self", ".", "_w", ",", "'close'", ",", "entrypath", ")" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/tkinter/tix.py#L1569-L1571
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/osx_carbon/_controls.py
python
TextAttr_Combine
(*args, **kwargs)
return _controls_.TextAttr_Combine(*args, **kwargs)
TextAttr_Combine(TextAttr attr, TextAttr attrDef, TextCtrl text) -> TextAttr
TextAttr_Combine(TextAttr attr, TextAttr attrDef, TextCtrl text) -> TextAttr
[ "TextAttr_Combine", "(", "TextAttr", "attr", "TextAttr", "attrDef", "TextCtrl", "text", ")", "-", ">", "TextAttr" ]
def TextAttr_Combine(*args, **kwargs): """TextAttr_Combine(TextAttr attr, TextAttr attrDef, TextCtrl text) -> TextAttr""" return _controls_.TextAttr_Combine(*args, **kwargs)
[ "def", "TextAttr_Combine", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_controls_", ".", "TextAttr_Combine", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_carbon/_controls.py#L1984-L1986
windystrife/UnrealEngine_NVIDIAGameWorks
b50e6338a7c5b26374d66306ebc7807541ff815e
Engine/Source/ThirdParty/CEF3/cef_source/tools/cef_parser.py
python
obj_header.get_alias_translation
(self, alias)
return None
Return a translation of alias to value based on typedef statements.
Return a translation of alias to value based on typedef statements.
[ "Return", "a", "translation", "of", "alias", "to", "value", "based", "on", "typedef", "statements", "." ]
def get_alias_translation(self, alias): """ Return a translation of alias to value based on typedef statements. """ for cls in self.typedefs: if cls.alias == alias: return cls.value return None
[ "def", "get_alias_translation", "(", "self", ",", "alias", ")", ":", "for", "cls", "in", "self", ".", "typedefs", ":", "if", "cls", ".", "alias", "==", "alias", ":", "return", "cls", ".", "value", "return", "None" ]
https://github.com/windystrife/UnrealEngine_NVIDIAGameWorks/blob/b50e6338a7c5b26374d66306ebc7807541ff815e/Engine/Source/ThirdParty/CEF3/cef_source/tools/cef_parser.py#L704-L710
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/msw/_controls.py
python
TextAttr.Init
(*args, **kwargs)
return _controls_.TextAttr_Init(*args, **kwargs)
Init(self)
Init(self)
[ "Init", "(", "self", ")" ]
def Init(*args, **kwargs): """Init(self)""" return _controls_.TextAttr_Init(*args, **kwargs)
[ "def", "Init", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_controls_", ".", "TextAttr_Init", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/msw/_controls.py#L1495-L1497
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/lzma.py
python
LZMAFile.peek
(self, size=-1)
return self._buffer.peek(size)
Return buffered data without advancing the file position. Always returns at least one byte of data, unless at EOF. The exact number of bytes returned is unspecified.
Return buffered data without advancing the file position.
[ "Return", "buffered", "data", "without", "advancing", "the", "file", "position", "." ]
def peek(self, size=-1): """Return buffered data without advancing the file position. Always returns at least one byte of data, unless at EOF. The exact number of bytes returned is unspecified. """ self._check_can_read() # Relies on the undocumented fact that BufferedRea...
[ "def", "peek", "(", "self", ",", "size", "=", "-", "1", ")", ":", "self", ".", "_check_can_read", "(", ")", "# Relies on the undocumented fact that BufferedReader.peek() always", "# returns at least one byte (except at EOF)", "return", "self", ".", "_buffer", ".", "peek...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/lzma.py#L182-L191
Xilinx/Vitis-AI
fc74d404563d9951b57245443c73bef389f3657f
tools/Vitis-AI-Quantizer/vai_q_tensorflow1.x/tensorflow/python/distribute/distribute_coordinator.py
python
_WorkerContext.has_barrier
(self)
return self._worker_barrier is not None
Whether the barrier is set or not.
Whether the barrier is set or not.
[ "Whether", "the", "barrier", "is", "set", "or", "not", "." ]
def has_barrier(self): """Whether the barrier is set or not.""" return self._worker_barrier is not None
[ "def", "has_barrier", "(", "self", ")", ":", "return", "self", ".", "_worker_barrier", "is", "not", "None" ]
https://github.com/Xilinx/Vitis-AI/blob/fc74d404563d9951b57245443c73bef389f3657f/tools/Vitis-AI-Quantizer/vai_q_tensorflow1.x/tensorflow/python/distribute/distribute_coordinator.py#L271-L273
benoitsteiner/tensorflow-opencl
cb7cb40a57fde5cfd4731bc551e82a1e2fef43a5
tensorflow/python/framework/ops.py
python
Operation.type
(self)
The type of the op (e.g. `"MatMul"`).
The type of the op (e.g. `"MatMul"`).
[ "The", "type", "of", "the", "op", "(", "e", ".", "g", ".", "MatMul", ")", "." ]
def type(self): """The type of the op (e.g. `"MatMul"`).""" if self._c_op: op_type = c_api.TF_OperationOpType(self._c_op) # TODO(iga): Remove these asserts after converting to C API by default. # Just being a bit paranoid here. # pylint: disable=unidiomatic-typecheck assert type(op...
[ "def", "type", "(", "self", ")", ":", "if", "self", ".", "_c_op", ":", "op_type", "=", "c_api", ".", "TF_OperationOpType", "(", "self", ".", "_c_op", ")", "# TODO(iga): Remove these asserts after converting to C API by default.", "# Just being a bit paranoid here.", "# ...
https://github.com/benoitsteiner/tensorflow-opencl/blob/cb7cb40a57fde5cfd4731bc551e82a1e2fef43a5/tensorflow/python/framework/ops.py#L1956-L1970
lyxok1/Tiny-DSOD
94d15450699bea0dd3720e75e2d273e476174fba
scripts/cpp_lint.py
python
FileInfo.IsSource
(self)
return self.Extension()[1:] in ('c', 'cc', 'cpp', 'cxx')
File has a source file extension.
File has a source file extension.
[ "File", "has", "a", "source", "file", "extension", "." ]
def IsSource(self): """File has a source file extension.""" return self.Extension()[1:] in ('c', 'cc', 'cpp', 'cxx')
[ "def", "IsSource", "(", "self", ")", ":", "return", "self", ".", "Extension", "(", ")", "[", "1", ":", "]", "in", "(", "'c'", ",", "'cc'", ",", "'cpp'", ",", "'cxx'", ")" ]
https://github.com/lyxok1/Tiny-DSOD/blob/94d15450699bea0dd3720e75e2d273e476174fba/scripts/cpp_lint.py#L956-L958
Bareflank/hypervisor
10af879f58a0b1d9ace17b84cd9b1e41a1cc67d0
utils/iwyu_tool.py
python
execute
(invocations, verbose, formatter, jobs)
return exit_code
Launch processes described by invocations.
Launch processes described by invocations.
[ "Launch", "processes", "described", "by", "invocations", "." ]
def execute(invocations, verbose, formatter, jobs): """ Launch processes described by invocations. """ exit_code = 0 if jobs == 1: for invocation in invocations: proc = invocation.start(verbose) print(formatter(proc.get_output()), end = "") if proc.returncode != 2...
[ "def", "execute", "(", "invocations", ",", "verbose", ",", "formatter", ",", "jobs", ")", ":", "exit_code", "=", "0", "if", "jobs", "==", "1", ":", "for", "invocation", "in", "invocations", ":", "proc", "=", "invocation", ".", "start", "(", "verbose", ...
https://github.com/Bareflank/hypervisor/blob/10af879f58a0b1d9ace17b84cd9b1e41a1cc67d0/utils/iwyu_tool.py#L353-L388
netket/netket
0d534e54ecbf25b677ea72af6b85947979420652
netket/utils/history.py
python
History.__init__
( self, values: Any = None, iters: Optional[Union[list, Array]] = None, dtype: Optional[DType] = None, iter_dtype: Optional[DType] = None, main_value_name: Optional[str] = None, )
Creates a new History object. Values should be an arbitrary type or container to initialize the History with. By default assumes that values correspond to the first iteration `0`. If `values` is a list or collection of lists, an array or range should be passed to values with the...
Creates a new History object.
[ "Creates", "a", "new", "History", "object", "." ]
def __init__( self, values: Any = None, iters: Optional[Union[list, Array]] = None, dtype: Optional[DType] = None, iter_dtype: Optional[DType] = None, main_value_name: Optional[str] = None, ): """ Creates a new History object. Values should be...
[ "def", "__init__", "(", "self", ",", "values", ":", "Any", "=", "None", ",", "iters", ":", "Optional", "[", "Union", "[", "list", ",", "Array", "]", "]", "=", "None", ",", "dtype", ":", "Optional", "[", "DType", "]", "=", "None", ",", "iter_dtype",...
https://github.com/netket/netket/blob/0d534e54ecbf25b677ea72af6b85947979420652/netket/utils/history.py#L53-L155
sigmaai/self-driving-golf-cart
8d891600af3d851add27a10ae45cf3c2108bb87c
ros/src/ros_carla_bridge/carla_ackermann_control/src/carla_ackermann_control/carla_ackermann_control_node.py
python
CarlaAckermannControl.run_accel_control_loop
(self)
Run the PID control loop for the acceleration
Run the PID control loop for the acceleration
[ "Run", "the", "PID", "control", "loop", "for", "the", "acceleration" ]
def run_accel_control_loop(self): """ Run the PID control loop for the acceleration """ # setpoint of the acceleration controller is the output of the speed controller self.accel_controller.setpoint = self.info.status.speed_control_accel_target self.info.status.accel_cont...
[ "def", "run_accel_control_loop", "(", "self", ")", ":", "# setpoint of the acceleration controller is the output of the speed controller", "self", ".", "accel_controller", ".", "setpoint", "=", "self", ".", "info", ".", "status", ".", "speed_control_accel_target", "self", "...
https://github.com/sigmaai/self-driving-golf-cart/blob/8d891600af3d851add27a10ae45cf3c2108bb87c/ros/src/ros_carla_bridge/carla_ackermann_control/src/carla_ackermann_control/carla_ackermann_control_node.py#L395-L409
GXYM/DRRG
9e074fa9052de8d131f55ca1f6ae6673c1bfeca4
dataset/TD500/Evaluation_Protocol/rrc_evaluation_funcs.py
python
main_validation
(default_evaluation_params_fn,validate_data_fn)
This process validates a method Params: default_evaluation_params_fn: points to a function that returns a dictionary with the default parameters used for the evaluation validate_data_fn: points to a method that validates the corrct format of the submission
This process validates a method Params: default_evaluation_params_fn: points to a function that returns a dictionary with the default parameters used for the evaluation validate_data_fn: points to a method that validates the corrct format of the submission
[ "This", "process", "validates", "a", "method", "Params", ":", "default_evaluation_params_fn", ":", "points", "to", "a", "function", "that", "returns", "a", "dictionary", "with", "the", "default", "parameters", "used", "for", "the", "evaluation", "validate_data_fn", ...
def main_validation(default_evaluation_params_fn,validate_data_fn): """ This process validates a method Params: default_evaluation_params_fn: points to a function that returns a dictionary with the default parameters used for the evaluation validate_data_fn: points to a method that validates the cor...
[ "def", "main_validation", "(", "default_evaluation_params_fn", ",", "validate_data_fn", ")", ":", "try", ":", "p", "=", "dict", "(", "[", "s", "[", "1", ":", "]", ".", "split", "(", "'='", ")", "for", "s", "in", "sys", ".", "argv", "[", "1", ":", "...
https://github.com/GXYM/DRRG/blob/9e074fa9052de8d131f55ca1f6ae6673c1bfeca4/dataset/TD500/Evaluation_Protocol/rrc_evaluation_funcs.py#L369-L387
mantidproject/mantid
03deeb89254ec4289edb8771e0188c2090a02f32
qt/python/mantidqtinterfaces/mantidqtinterfaces/Muon/GUI/Common/contexts/fitting_contexts/fitting_context.py
python
FitInformation.log_names
(self, filter_fn=None)
return all_names
The names of the logs on the workspaces associated with this fit. :filter_fn: An optional unary function to filter the names out. It should accept a log (e.g. a Mantid Kernel Property object) and return True if the log should be accepted. :return: A list of log names such as ["sample_temp", "sa...
The names of the logs on the workspaces associated with this fit.
[ "The", "names", "of", "the", "logs", "on", "the", "workspaces", "associated", "with", "this", "fit", "." ]
def log_names(self, filter_fn=None): """ The names of the logs on the workspaces associated with this fit. :filter_fn: An optional unary function to filter the names out. It should accept a log (e.g. a Mantid Kernel Property object) and return True if the log should be accepted. ...
[ "def", "log_names", "(", "self", ",", "filter_fn", "=", "None", ")", ":", "filter_fn", "=", "filter_fn", "if", "filter_fn", "is", "not", "None", "else", "lambda", "x", ":", "True", "all_names", "=", "[", "]", "for", "output_workspace", "in", "self", ".",...
https://github.com/mantidproject/mantid/blob/03deeb89254ec4289edb8771e0188c2090a02f32/qt/python/mantidqtinterfaces/mantidqtinterfaces/Muon/GUI/Common/contexts/fitting_contexts/fitting_context.py#L260-L275
krishauser/Klampt
972cc83ea5befac3f653c1ba20f80155768ad519
Python/klampt/control/robotinterface.py
python
RobotInterfaceBase.setControlMode
(self,mode,*args,**kwargs)
Enables a custom control mode.
Enables a custom control mode.
[ "Enables", "a", "custom", "control", "mode", "." ]
def setControlMode(self,mode,*args,**kwargs): """Enables a custom control mode.""" raise NotImplementedError()
[ "def", "setControlMode", "(", "self", ",", "mode", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "raise", "NotImplementedError", "(", ")" ]
https://github.com/krishauser/Klampt/blob/972cc83ea5befac3f653c1ba20f80155768ad519/Python/klampt/control/robotinterface.py#L417-L419
mhammond/pywin32
44afd86ba8485194df93234639243252deeb40d5
Pythonwin/pywin/framework/stdin.py
python
Stdin.readline
(self, size=-1)
return self.__extract_from_buffer(result_size)
Read one entire line from the file. A trailing newline character is kept in the string2.6 (but may be absent when a file ends with an incomplete line). If the size argument is present and non-negative, it is a maximum byte count (including the trailing newline) and an incomplete line may...
Read one entire line from the file. A trailing newline character is kept in the string2.6 (but may be absent when a file ends with an incomplete line). If the size argument is present and non-negative, it is a maximum byte count (including the trailing newline) and an incomplete line may...
[ "Read", "one", "entire", "line", "from", "the", "file", ".", "A", "trailing", "newline", "character", "is", "kept", "in", "the", "string2", ".", "6", "(", "but", "may", "be", "absent", "when", "a", "file", "ends", "with", "an", "incomplete", "line", ")...
def readline(self, size=-1): """Read one entire line from the file. A trailing newline character is kept in the string2.6 (but may be absent when a file ends with an incomplete line). If the size argument is present and non-negative, it is a maximum byte count (including the trailing ...
[ "def", "readline", "(", "self", ",", "size", "=", "-", "1", ")", ":", "maximum_result_size", "=", "self", ".", "__get_lines", "(", "size", ",", "lambda", "buffer", ":", "\"\\n\"", "in", "buffer", ")", "if", "\"\\n\"", "in", "self", ".", "buffer", "[", ...
https://github.com/mhammond/pywin32/blob/44afd86ba8485194df93234639243252deeb40d5/Pythonwin/pywin/framework/stdin.py#L54-L72
swift/swift
12d031cf8177fdec0137f9aa7e2912fa23c4416b
3rdParty/SCons/scons-3.0.1/engine/SCons/Builder.py
python
BuilderBase._create_nodes
(self, env, target = None, source = None)
return tlist, slist
Create and return lists of target and source nodes.
Create and return lists of target and source nodes.
[ "Create", "and", "return", "lists", "of", "target", "and", "source", "nodes", "." ]
def _create_nodes(self, env, target = None, source = None): """Create and return lists of target and source nodes. """ src_suf = self.get_src_suffix(env) target_factory = env.get_factory(self.target_factory) source_factory = env.get_factory(self.source_factory) source =...
[ "def", "_create_nodes", "(", "self", ",", "env", ",", "target", "=", "None", ",", "source", "=", "None", ")", ":", "src_suf", "=", "self", ".", "get_src_suffix", "(", "env", ")", "target_factory", "=", "env", ".", "get_factory", "(", "self", ".", "targ...
https://github.com/swift/swift/blob/12d031cf8177fdec0137f9aa7e2912fa23c4416b/3rdParty/SCons/scons-3.0.1/engine/SCons/Builder.py#L485-L546
yyzybb537/libgo
4af17b7c67643c4d54aa354dcc77963ea07847d0
third_party/boost.context/tools/build/src/build/virtual_target.py
python
VirtualTarget.depends
(self, d)
Adds additional instances of 'VirtualTarget' that this one depends on.
Adds additional instances of 'VirtualTarget' that this one depends on.
[ "Adds", "additional", "instances", "of", "VirtualTarget", "that", "this", "one", "depends", "on", "." ]
def depends (self, d): """ Adds additional instances of 'VirtualTarget' that this one depends on. """ self.dependencies_ = unique (self.dependencies_ + d).sort ()
[ "def", "depends", "(", "self", ",", "d", ")", ":", "self", ".", "dependencies_", "=", "unique", "(", "self", ".", "dependencies_", "+", "d", ")", ".", "sort", "(", ")" ]
https://github.com/yyzybb537/libgo/blob/4af17b7c67643c4d54aa354dcc77963ea07847d0/third_party/boost.context/tools/build/src/build/virtual_target.py#L296-L300
ROCmSoftwarePlatform/hipCaffe
4ec5d482515cce532348553b6db6d00d015675d5
scripts/cpp_lint.py
python
IsCppString
(line)
return ((line.count('"') - line.count(r'\"') - line.count("'\"'")) & 1) == 1
Does line terminate so, that the next symbol is in string constant. This function does not consider single-line nor multi-line comments. Args: line: is a partial line of code starting from the 0..n. Returns: True, if next character appended to 'line' is inside a string constant.
Does line terminate so, that the next symbol is in string constant.
[ "Does", "line", "terminate", "so", "that", "the", "next", "symbol", "is", "in", "string", "constant", "." ]
def IsCppString(line): """Does line terminate so, that the next symbol is in string constant. This function does not consider single-line nor multi-line comments. Args: line: is a partial line of code starting from the 0..n. Returns: True, if next character appended to 'line' is inside a string c...
[ "def", "IsCppString", "(", "line", ")", ":", "line", "=", "line", ".", "replace", "(", "r'\\\\'", ",", "'XX'", ")", "# after this, \\\\\" does not match to \\\"", "return", "(", "(", "line", ".", "count", "(", "'\"'", ")", "-", "line", ".", "count", "(", ...
https://github.com/ROCmSoftwarePlatform/hipCaffe/blob/4ec5d482515cce532348553b6db6d00d015675d5/scripts/cpp_lint.py#L1045-L1059
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Gems/CloudGemFramework/v1/ResourceManager/lib/Crypto/PublicKey/DSA.py
python
_import_key_der
(key_data, passphrase, params)
Import a DSA key (public or private half), encoded in DER form.
Import a DSA key (public or private half), encoded in DER form.
[ "Import", "a", "DSA", "key", "(", "public", "or", "private", "half", ")", "encoded", "in", "DER", "form", "." ]
def _import_key_der(key_data, passphrase, params): """Import a DSA key (public or private half), encoded in DER form.""" decodings = (_import_openssl_private, _import_subjectPublicKeyInfo, _import_x509_cert, _import_pkcs8) for decoding in decodings: ...
[ "def", "_import_key_der", "(", "key_data", ",", "passphrase", ",", "params", ")", ":", "decodings", "=", "(", "_import_openssl_private", ",", "_import_subjectPublicKeyInfo", ",", "_import_x509_cert", ",", "_import_pkcs8", ")", "for", "decoding", "in", "decodings", "...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Gems/CloudGemFramework/v1/ResourceManager/lib/Crypto/PublicKey/DSA.py#L584-L598
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/setuptools/py2/setuptools/config.py
python
ConfigOptionsHandler._parse_packages
(self, value)
return find_packages(**find_kwargs)
Parses `packages` option value. :param value: :rtype: list
Parses `packages` option value.
[ "Parses", "packages", "option", "value", "." ]
def _parse_packages(self, value): """Parses `packages` option value. :param value: :rtype: list """ find_directives = ['find:', 'find_namespace:'] trimmed_value = value.strip() if trimmed_value not in find_directives: return self._parse_list(value) ...
[ "def", "_parse_packages", "(", "self", ",", "value", ")", ":", "find_directives", "=", "[", "'find:'", ",", "'find_namespace:'", "]", "trimmed_value", "=", "value", ".", "strip", "(", ")", "if", "trimmed_value", "not", "in", "find_directives", ":", "return", ...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/setuptools/py2/setuptools/config.py#L562-L588
PaddlePaddle/Anakin
5fd68a6cc4c4620cd1a30794c1bf06eebd3f4730
benchmark/RNN/Tokenizer.py
python
Tokenizer.fit_on_sequences
(self, sequences)
Updates internal vocabulary based on a list of sequences. Required before using `sequences_to_matrix` (if `fit_on_texts` was never called). # Arguments sequences: A list of sequence. A "sequence" is a list of integer word indices.
Updates internal vocabulary based on a list of sequences.
[ "Updates", "internal", "vocabulary", "based", "on", "a", "list", "of", "sequences", "." ]
def fit_on_sequences(self, sequences): """Updates internal vocabulary based on a list of sequences. Required before using `sequences_to_matrix` (if `fit_on_texts` was never called). # Arguments sequences: A list of sequence. A "sequence" is a list of integer...
[ "def", "fit_on_sequences", "(", "self", ",", "sequences", ")", ":", "self", ".", "document_count", "+=", "len", "(", "sequences", ")", "for", "seq", "in", "sequences", ":", "seq", "=", "set", "(", "seq", ")", "for", "i", "in", "seq", ":", "if", "i", ...
https://github.com/PaddlePaddle/Anakin/blob/5fd68a6cc4c4620cd1a30794c1bf06eebd3f4730/benchmark/RNN/Tokenizer.py#L241-L258
rapidsai/cudf
d5b2448fc69f17509304d594f029d0df56984962
python/cudf/cudf/comm/gpuarrow.py
python
GpuArrowNodeReader.make_series
(self)
return self._series.copy(deep=False)
Make a Series object out of this node
Make a Series object out of this node
[ "Make", "a", "Series", "object", "out", "of", "this", "node" ]
def make_series(self): """Make a Series object out of this node""" return self._series.copy(deep=False)
[ "def", "make_series", "(", "self", ")", ":", "return", "self", ".", "_series", ".", "copy", "(", "deep", "=", "False", ")" ]
https://github.com/rapidsai/cudf/blob/d5b2448fc69f17509304d594f029d0df56984962/python/cudf/cudf/comm/gpuarrow.py#L131-L133
hanpfei/chromium-net
392cc1fa3a8f92f42e4071ab6e674d8e0482f83f
third_party/catapult/dashboard/dashboard/auto_bisect.py
python
_RestartFailedBisectJobs
()
return all_successful
Restarts failed bisect jobs. Bisect jobs that ran out of retries will be deleted. Returns: True if all bisect jobs that were retried were successfully triggered, and False otherwise.
Restarts failed bisect jobs.
[ "Restarts", "failed", "bisect", "jobs", "." ]
def _RestartFailedBisectJobs(): """Restarts failed bisect jobs. Bisect jobs that ran out of retries will be deleted. Returns: True if all bisect jobs that were retried were successfully triggered, and False otherwise. """ bisect_jobs = try_job.TryJob.query(try_job.TryJob.status == 'failed').fetch() ...
[ "def", "_RestartFailedBisectJobs", "(", ")", ":", "bisect_jobs", "=", "try_job", ".", "TryJob", ".", "query", "(", "try_job", ".", "TryJob", ".", "status", "==", "'failed'", ")", ".", "fetch", "(", ")", "all_successful", "=", "True", "for", "job", "in", ...
https://github.com/hanpfei/chromium-net/blob/392cc1fa3a8f92f42e4071ab6e674d8e0482f83f/third_party/catapult/dashboard/dashboard/auto_bisect.py#L45-L79
facebookincubator/katran
192eb988c398afc673620254097defb7035d669e
build/fbcode_builder/getdeps/subcmd.py
python
SubCmd.run
(self, args)
return 0
perform the command
perform the command
[ "perform", "the", "command" ]
def run(self, args): """perform the command""" return 0
[ "def", "run", "(", "self", ",", "args", ")", ":", "return", "0" ]
https://github.com/facebookincubator/katran/blob/192eb988c398afc673620254097defb7035d669e/build/fbcode_builder/getdeps/subcmd.py#L11-L13
Polidea/SiriusObfuscator
b0e590d8130e97856afe578869b83a209e2b19be
SymbolExtractorAndRenamer/lldb/scripts/Python/static-binding/lldb.py
python
SBTypeSummary.IsSummaryString
(self)
return _lldb.SBTypeSummary_IsSummaryString(self)
IsSummaryString(self) -> bool
IsSummaryString(self) -> bool
[ "IsSummaryString", "(", "self", ")", "-", ">", "bool" ]
def IsSummaryString(self): """IsSummaryString(self) -> bool""" return _lldb.SBTypeSummary_IsSummaryString(self)
[ "def", "IsSummaryString", "(", "self", ")", ":", "return", "_lldb", ".", "SBTypeSummary_IsSummaryString", "(", "self", ")" ]
https://github.com/Polidea/SiriusObfuscator/blob/b0e590d8130e97856afe578869b83a209e2b19be/SymbolExtractorAndRenamer/lldb/scripts/Python/static-binding/lldb.py#L11447-L11449
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/msw/_controls.py
python
ToolBarBase.GetToolSeparation
(*args, **kwargs)
return _controls_.ToolBarBase_GetToolSeparation(*args, **kwargs)
GetToolSeparation(self) -> int
GetToolSeparation(self) -> int
[ "GetToolSeparation", "(", "self", ")", "-", ">", "int" ]
def GetToolSeparation(*args, **kwargs): """GetToolSeparation(self) -> int""" return _controls_.ToolBarBase_GetToolSeparation(*args, **kwargs)
[ "def", "GetToolSeparation", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_controls_", ".", "ToolBarBase_GetToolSeparation", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/msw/_controls.py#L3875-L3877
hanpfei/chromium-net
392cc1fa3a8f92f42e4071ab6e674d8e0482f83f
third_party/protobuf/python/mox.py
python
StrContains.equals
(self, rhs)
Check to see if the search_string is contained in the rhs string. Args: # rhs: the right hand side of the test rhs: object Returns: bool
Check to see if the search_string is contained in the rhs string.
[ "Check", "to", "see", "if", "the", "search_string", "is", "contained", "in", "the", "rhs", "string", "." ]
def equals(self, rhs): """Check to see if the search_string is contained in the rhs string. Args: # rhs: the right hand side of the test rhs: object Returns: bool """ try: return rhs.find(self._search_string) > -1 except Exception: return False
[ "def", "equals", "(", "self", ",", "rhs", ")", ":", "try", ":", "return", "rhs", ".", "find", "(", "self", ".", "_search_string", ")", ">", "-", "1", "except", "Exception", ":", "return", "False" ]
https://github.com/hanpfei/chromium-net/blob/392cc1fa3a8f92f42e4071ab6e674d8e0482f83f/third_party/protobuf/python/mox.py#L884-L898
SonarOpenCommunity/sonar-cxx
6e1d456fdcd45d35bcdc61c980e34d85fe88971e
cxx-sensors/src/tools/vc_createrules.py
python
main
()
return 0
Main.
Main.
[ "Main", "." ]
def main(): """ Main. """ warnings = read_warnings() create_xml(warnings) return 0
[ "def", "main", "(", ")", ":", "warnings", "=", "read_warnings", "(", ")", "create_xml", "(", "warnings", ")", "return", "0" ]
https://github.com/SonarOpenCommunity/sonar-cxx/blob/6e1d456fdcd45d35bcdc61c980e34d85fe88971e/cxx-sensors/src/tools/vc_createrules.py#L505-L511
hanpfei/chromium-net
392cc1fa3a8f92f42e4071ab6e674d8e0482f83f
tools/android/loading/graph.py
python
DirectedGraph.__init__
(self, nodes, edges)
Builds a graph from a set of node and edges. Note that the edges referencing a node not in the provided list are dropped. Args: nodes: ([Node]) Sequence of Nodes. edges: ([Edge]) Sequence of Edges.
Builds a graph from a set of node and edges.
[ "Builds", "a", "graph", "from", "a", "set", "of", "node", "and", "edges", "." ]
def __init__(self, nodes, edges): """Builds a graph from a set of node and edges. Note that the edges referencing a node not in the provided list are dropped. Args: nodes: ([Node]) Sequence of Nodes. edges: ([Edge]) Sequence of Edges. """ self._nodes = set(nodes) self._edges = set(...
[ "def", "__init__", "(", "self", ",", "nodes", ",", "edges", ")", ":", "self", ".", "_nodes", "=", "set", "(", "nodes", ")", "self", ".", "_edges", "=", "set", "(", "filter", "(", "lambda", "e", ":", "e", ".", "from_node", "in", "self", ".", "_nod...
https://github.com/hanpfei/chromium-net/blob/392cc1fa3a8f92f42e4071ab6e674d8e0482f83f/tools/android/loading/graph.py#L64-L83
espressomd/espresso
7e29f9052e710fe1ebf0f5d2a8076b32921fbc6a
src/python/espressomd/io/writer/vtf.py
python
writevcf
(system, fp, types='all')
writes a VCF (VTF Coordinate Format) to a file. This can be used to write a timestep to a VTF file. Parameters ---------- system: :obj:`espressomd.system.System` types : :obj:`str` Specifies the particle types. The string 'all' will write all particles fp : file File pointer to ...
writes a VCF (VTF Coordinate Format) to a file. This can be used to write a timestep to a VTF file.
[ "writes", "a", "VCF", "(", "VTF", "Coordinate", "Format", ")", "to", "a", "file", ".", "This", "can", "be", "used", "to", "write", "a", "timestep", "to", "a", "VTF", "file", "." ]
def writevcf(system, fp, types='all'): """ writes a VCF (VTF Coordinate Format) to a file. This can be used to write a timestep to a VTF file. Parameters ---------- system: :obj:`espressomd.system.System` types : :obj:`str` Specifies the particle types. The string 'all' will write a...
[ "def", "writevcf", "(", "system", ",", "fp", ",", "types", "=", "'all'", ")", ":", "vtf_index", "=", "vtf_pid_map", "(", "system", ",", "types", ")", "fp", ".", "write", "(", "\"\\ntimestep indexed\\n\"", ")", "for", "pid", ",", "vtf_id", ",", "in", "v...
https://github.com/espressomd/espresso/blob/7e29f9052e710fe1ebf0f5d2a8076b32921fbc6a/src/python/espressomd/io/writer/vtf.py#L79-L96
windystrife/UnrealEngine_NVIDIAGameWorks
b50e6338a7c5b26374d66306ebc7807541ff815e
Engine/Source/ThirdParty/CEF3/cef_source/tools/make_distrib.py
python
get_readme_component
(name)
Loads a README file component.
Loads a README file component.
[ "Loads", "a", "README", "file", "component", "." ]
def get_readme_component(name): """ Loads a README file component. """ paths = [] # platform directory if platform == 'windows': platform_cmp = 'win' elif platform == 'macosx': platform_cmp = 'mac' elif platform == 'linux': platform_cmp = 'linux' paths.append(os.path.join(script_dir, 'distrib'...
[ "def", "get_readme_component", "(", "name", ")", ":", "paths", "=", "[", "]", "# platform directory", "if", "platform", "==", "'windows'", ":", "platform_cmp", "=", "'win'", "elif", "platform", "==", "'macosx'", ":", "platform_cmp", "=", "'mac'", "elif", "plat...
https://github.com/windystrife/UnrealEngine_NVIDIAGameWorks/blob/b50e6338a7c5b26374d66306ebc7807541ff815e/Engine/Source/ThirdParty/CEF3/cef_source/tools/make_distrib.py#L74-L95
Kitware/ParaView
f760af9124ff4634b23ebbeab95a4f56e0261955
Wrapping/Python/paraview/servermanager.py
python
_wrap_property
(proxy, smproperty)
return property
Internal function. Given a server manager property and its domains, returns the appropriate python object.
Internal function. Given a server manager property and its domains, returns the appropriate python object.
[ "Internal", "function", ".", "Given", "a", "server", "manager", "property", "and", "its", "domains", "returns", "the", "appropriate", "python", "object", "." ]
def _wrap_property(proxy, smproperty): """ Internal function. Given a server manager property and its domains, returns the appropriate python object. """ property = None if paraview.compatibility.GetVersion() >= 3.5 and \ smproperty.IsA("vtkSMStringVectorProperty"): arraySelectionD...
[ "def", "_wrap_property", "(", "proxy", ",", "smproperty", ")", ":", "property", "=", "None", "if", "paraview", ".", "compatibility", ".", "GetVersion", "(", ")", ">=", "3.5", "and", "smproperty", ".", "IsA", "(", "\"vtkSMStringVectorProperty\"", ")", ":", "a...
https://github.com/Kitware/ParaView/blob/f760af9124ff4634b23ebbeab95a4f56e0261955/Wrapping/Python/paraview/servermanager.py#L87-L133
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/msw/_core.py
python
Point2D.__init__
(self, *args, **kwargs)
__init__(self, double x=0.0, double y=0.0) -> Point2D Create a w.Point2D object.
__init__(self, double x=0.0, double y=0.0) -> Point2D
[ "__init__", "(", "self", "double", "x", "=", "0", ".", "0", "double", "y", "=", "0", ".", "0", ")", "-", ">", "Point2D" ]
def __init__(self, *args, **kwargs): """ __init__(self, double x=0.0, double y=0.0) -> Point2D Create a w.Point2D object. """ _core_.Point2D_swiginit(self,_core_.new_Point2D(*args, **kwargs))
[ "def", "__init__", "(", "self", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "_core_", ".", "Point2D_swiginit", "(", "self", ",", "_core_", ".", "new_Point2D", "(", "*", "args", ",", "*", "*", "kwargs", ")", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/msw/_core.py#L1647-L1653
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/windows/Lib/_pydecimal.py
python
_dexp
(c, e, p)
return _div_nearest(_iexp(rem, 10**p), 1000), quot - p + 3
Compute an approximation to exp(c*10**e), with p decimal places of precision. Returns integers d, f such that: 10**(p-1) <= d <= 10**p, and (d-1)*10**f < exp(c*10**e) < (d+1)*10**f In other words, d*10**f is an approximation to exp(c*10**e) with p digits of precision, and with an error in...
Compute an approximation to exp(c*10**e), with p decimal places of precision.
[ "Compute", "an", "approximation", "to", "exp", "(", "c", "*", "10", "**", "e", ")", "with", "p", "decimal", "places", "of", "precision", "." ]
def _dexp(c, e, p): """Compute an approximation to exp(c*10**e), with p decimal places of precision. Returns integers d, f such that: 10**(p-1) <= d <= 10**p, and (d-1)*10**f < exp(c*10**e) < (d+1)*10**f In other words, d*10**f is an approximation to exp(c*10**e) with p digits of prec...
[ "def", "_dexp", "(", "c", ",", "e", ",", "p", ")", ":", "# we'll call iexp with M = 10**(p+2), giving p+3 digits of precision", "p", "+=", "2", "# compute log(10) with extra precision = adjusted exponent of c*10**e", "extra", "=", "max", "(", "0", ",", "e", "+", "len", ...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/windows/Lib/_pydecimal.py#L5926-L5960
Slicer/SlicerGitSVNArchive
65e92bb16c2b32ea47a1a66bee71f238891ee1ca
Modules/Scripted/DataProbe/DataProbeLib/SliceViewAnnotations.py
python
SliceAnnotations.createScalarBar
(self, sliceViewName)
return scalarBar
scalarBarWidget = vtk.vtkScalarBarWidget() scalarBarWidget.SetScalarBarActor(scalarBar) self.scalarBarWidgets[sliceViewName] = scalarBarWidget
scalarBarWidget = vtk.vtkScalarBarWidget() scalarBarWidget.SetScalarBarActor(scalarBar) self.scalarBarWidgets[sliceViewName] = scalarBarWidget
[ "scalarBarWidget", "=", "vtk", ".", "vtkScalarBarWidget", "()", "scalarBarWidget", ".", "SetScalarBarActor", "(", "scalarBar", ")", "self", ".", "scalarBarWidgets", "[", "sliceViewName", "]", "=", "scalarBarWidget" ]
def createScalarBar(self, sliceViewName): if self.hasVTKPVScalarBarActor: scalarBar = slicer.vtkPVScalarBarActor() else: scalarBar = vtk.vtkScalarBarActor() scalarBar.SetTitle(" ") # adjust text property if self.hasVTKPVScalarBarActor: scalarBar.SetRangeLabelFormat(self.rangeLabelF...
[ "def", "createScalarBar", "(", "self", ",", "sliceViewName", ")", ":", "if", "self", ".", "hasVTKPVScalarBarActor", ":", "scalarBar", "=", "slicer", ".", "vtkPVScalarBarActor", "(", ")", "else", ":", "scalarBar", "=", "vtk", ".", "vtkScalarBarActor", "(", ")",...
https://github.com/Slicer/SlicerGitSVNArchive/blob/65e92bb16c2b32ea47a1a66bee71f238891ee1ca/Modules/Scripted/DataProbe/DataProbeLib/SliceViewAnnotations.py#L397-L413
natanielruiz/android-yolo
1ebb54f96a67a20ff83ddfc823ed83a13dc3a47f
jni-build/jni/include/tensorflow/python/training/server_lib.py
python
Server.start
(self)
Starts this server. Raises: tf.errors.OpError: Or one of its subclasses if an error occurs while starting the TensorFlow server.
Starts this server.
[ "Starts", "this", "server", "." ]
def start(self): """Starts this server. Raises: tf.errors.OpError: Or one of its subclasses if an error occurs while starting the TensorFlow server. """ with errors.raise_exception_on_not_ok_status() as status: pywrap_tensorflow.PyServer_Start(self._server, status)
[ "def", "start", "(", "self", ")", ":", "with", "errors", ".", "raise_exception_on_not_ok_status", "(", ")", "as", "status", ":", "pywrap_tensorflow", ".", "PyServer_Start", "(", "self", ".", "_server", ",", "status", ")" ]
https://github.com/natanielruiz/android-yolo/blob/1ebb54f96a67a20ff83ddfc823ed83a13dc3a47f/jni-build/jni/include/tensorflow/python/training/server_lib.py#L157-L165
NicknineTheEagle/TF2-Base
20459c5a7fbc995b6bf54fa85c2f62a101e9fb64
src/thirdparty/protobuf-2.3.0/python/google/protobuf/descriptor.py
python
MethodDescriptor.__init__
(self, name, full_name, index, containing_service, input_type, output_type, options=None)
The arguments are as described in the description of MethodDescriptor attributes above. Note that containing_service may be None, and may be set later if necessary.
The arguments are as described in the description of MethodDescriptor attributes above.
[ "The", "arguments", "are", "as", "described", "in", "the", "description", "of", "MethodDescriptor", "attributes", "above", "." ]
def __init__(self, name, full_name, index, containing_service, input_type, output_type, options=None): """The arguments are as described in the description of MethodDescriptor attributes above. Note that containing_service may be None, and may be set later if necessary. """ super(Met...
[ "def", "__init__", "(", "self", ",", "name", ",", "full_name", ",", "index", ",", "containing_service", ",", "input_type", ",", "output_type", ",", "options", "=", "None", ")", ":", "super", "(", "MethodDescriptor", ",", "self", ")", ".", "__init__", "(", ...
https://github.com/NicknineTheEagle/TF2-Base/blob/20459c5a7fbc995b6bf54fa85c2f62a101e9fb64/src/thirdparty/protobuf-2.3.0/python/google/protobuf/descriptor.py#L541-L554
generalized-intelligence/GAAS
29ab17d3e8a4ba18edef3a57c36d8db6329fac73
algorithms/src/SystemManagement/json_request_response_lib/src/third_party/nlohmann_json/third_party/cpplint/cpplint.py
python
_CppLintState.ResetErrorCounts
(self)
Sets the module's error statistic back to zero.
Sets the module's error statistic back to zero.
[ "Sets", "the", "module", "s", "error", "statistic", "back", "to", "zero", "." ]
def ResetErrorCounts(self): """Sets the module's error statistic back to zero.""" self.error_count = 0 self.errors_by_category = {}
[ "def", "ResetErrorCounts", "(", "self", ")", ":", "self", ".", "error_count", "=", "0", "self", ".", "errors_by_category", "=", "{", "}" ]
https://github.com/generalized-intelligence/GAAS/blob/29ab17d3e8a4ba18edef3a57c36d8db6329fac73/algorithms/src/SystemManagement/json_request_response_lib/src/third_party/nlohmann_json/third_party/cpplint/cpplint.py#L1078-L1081
bingwin/MicroChat
81d9a71a212c1cbca5bba497ec42659a7d25dccf
mars/lint/cpplint.py
python
CheckMakePairUsesDeduction
(filename, clean_lines, linenum, error)
Check that make_pair's template arguments are deduced. G++ 4.6 in C++11 mode fails badly if make_pair's template arguments are specified explicitly, and such use isn't intended in any case. Args: filename: The name of the current file. clean_lines: A CleansedLines instance containing the file. linen...
Check that make_pair's template arguments are deduced.
[ "Check", "that", "make_pair", "s", "template", "arguments", "are", "deduced", "." ]
def CheckMakePairUsesDeduction(filename, clean_lines, linenum, error): """Check that make_pair's template arguments are deduced. G++ 4.6 in C++11 mode fails badly if make_pair's template arguments are specified explicitly, and such use isn't intended in any case. Args: filename: The name of the current fi...
[ "def", "CheckMakePairUsesDeduction", "(", "filename", ",", "clean_lines", ",", "linenum", ",", "error", ")", ":", "line", "=", "clean_lines", ".", "elided", "[", "linenum", "]", "match", "=", "_RE_PATTERN_EXPLICIT_MAKEPAIR", ".", "search", "(", "line", ")", "i...
https://github.com/bingwin/MicroChat/blob/81d9a71a212c1cbca5bba497ec42659a7d25dccf/mars/lint/cpplint.py#L5706-L5724
benoitsteiner/tensorflow-opencl
cb7cb40a57fde5cfd4731bc551e82a1e2fef43a5
tensorflow/tools/common/public_api.py
python
PublicAPIVisitor.set_root_name
(self, root_name)
Override the default root name of 'tf'.
Override the default root name of 'tf'.
[ "Override", "the", "default", "root", "name", "of", "tf", "." ]
def set_root_name(self, root_name): """Override the default root name of 'tf'.""" self._root_name = root_name
[ "def", "set_root_name", "(", "self", ",", "root_name", ")", ":", "self", ".", "_root_name", "=", "root_name" ]
https://github.com/benoitsteiner/tensorflow-opencl/blob/cb7cb40a57fde5cfd4731bc551e82a1e2fef43a5/tensorflow/tools/common/public_api.py#L98-L100
Xilinx/Vitis-AI
fc74d404563d9951b57245443c73bef389f3657f
tools/Vitis-AI-Quantizer/vai_q_tensorflow1.x/tensorflow/python/training/tracking/util.py
python
_LoadStatus.assert_existing_objects_matched
(self)
Raises an exception unless existing Python objects have been matched.
Raises an exception unless existing Python objects have been matched.
[ "Raises", "an", "exception", "unless", "existing", "Python", "objects", "have", "been", "matched", "." ]
def assert_existing_objects_matched(self): """Raises an exception unless existing Python objects have been matched.""" pass
[ "def", "assert_existing_objects_matched", "(", "self", ")", ":", "pass" ]
https://github.com/Xilinx/Vitis-AI/blob/fc74d404563d9951b57245443c73bef389f3657f/tools/Vitis-AI-Quantizer/vai_q_tensorflow1.x/tensorflow/python/training/tracking/util.py#L619-L621
weolar/miniblink49
1c4678db0594a4abde23d3ebbcc7cd13c3170777
third_party/WebKit/Tools/Scripts/webkitpy/thirdparty/BeautifulSoup.py
python
BeautifulStoneSoup._smartPop
(self, name)
We need to pop up to the previous tag of this type, unless one of this tag's nesting reset triggers comes between this tag and the previous tag of this type, OR unless this tag is a generic nesting trigger and another generic nesting trigger comes between this tag and the previous tag of...
We need to pop up to the previous tag of this type, unless one of this tag's nesting reset triggers comes between this tag and the previous tag of this type, OR unless this tag is a generic nesting trigger and another generic nesting trigger comes between this tag and the previous tag of...
[ "We", "need", "to", "pop", "up", "to", "the", "previous", "tag", "of", "this", "type", "unless", "one", "of", "this", "tag", "s", "nesting", "reset", "triggers", "comes", "between", "this", "tag", "and", "the", "previous", "tag", "of", "this", "type", ...
def _smartPop(self, name): """We need to pop up to the previous tag of this type, unless one of this tag's nesting reset triggers comes between this tag and the previous tag of this type, OR unless this tag is a generic nesting trigger and another generic nesting trigger comes b...
[ "def", "_smartPop", "(", "self", ",", "name", ")", ":", "nestingResetTriggers", "=", "self", ".", "NESTABLE_TAGS", ".", "get", "(", "name", ")", "isNestable", "=", "nestingResetTriggers", "!=", "None", "isResetNesting", "=", "self", ".", "RESET_NESTING_TAGS", ...
https://github.com/weolar/miniblink49/blob/1c4678db0594a4abde23d3ebbcc7cd13c3170777/third_party/WebKit/Tools/Scripts/webkitpy/thirdparty/BeautifulSoup.py#L1281-L1325
deepmind/open_spiel
4ca53bea32bb2875c7385d215424048ae92f78c8
open_spiel/python/mfg/distribution.py
python
Distribution.__init__
(self, game)
Initializes a distribution. Args: game: the game for which this distribution is derives
Initializes a distribution.
[ "Initializes", "a", "distribution", "." ]
def __init__(self, game): """Initializes a distribution. Args: game: the game for which this distribution is derives """ self.game = game
[ "def", "__init__", "(", "self", ",", "game", ")", ":", "self", ".", "game", "=", "game" ]
https://github.com/deepmind/open_spiel/blob/4ca53bea32bb2875c7385d215424048ae92f78c8/open_spiel/python/mfg/distribution.py#L34-L40
cvxpy/cvxpy
5165b4fb750dfd237de8659383ef24b4b2e33aaf
cvxpy/atoms/elementwise/logistic.py
python
logistic.is_incr
(self, idx)
return True
Is the composition non-decreasing in argument idx?
Is the composition non-decreasing in argument idx?
[ "Is", "the", "composition", "non", "-", "decreasing", "in", "argument", "idx?" ]
def is_incr(self, idx) -> bool: """Is the composition non-decreasing in argument idx? """ return True
[ "def", "is_incr", "(", "self", ",", "idx", ")", "->", "bool", ":", "return", "True" ]
https://github.com/cvxpy/cvxpy/blob/5165b4fb750dfd237de8659383ef24b4b2e33aaf/cvxpy/atoms/elementwise/logistic.py#L56-L59
flexflow/FlexFlow
581fad8ba8d10a16a3102ee2b406b0319586df24
python/flexflow/torch/model.py
python
Node.parse
(self)
Parses the node to populate ``self._ir_string`` with a string representation.
Parses the node to populate ``self._ir_string`` with a string representation.
[ "Parses", "the", "node", "to", "populate", "self", ".", "_ir_string", "with", "a", "string", "representation", "." ]
def parse(self): """Parses the node to populate ``self._ir_string`` with a string representation.""" raise NotImplementedError
[ "def", "parse", "(", "self", ")", ":", "raise", "NotImplementedError" ]
https://github.com/flexflow/FlexFlow/blob/581fad8ba8d10a16a3102ee2b406b0319586df24/python/flexflow/torch/model.py#L76-L79
tensorflow/tensorflow
419e3a6b650ea4bd1b0cba23c4348f8a69f3272e
tensorflow/python/ops/image_ops_impl.py
python
generate_bounding_box_proposals
(scores, bbox_deltas, image_info, anchors, nms_threshold=0.7, pre_nms_topn=6000, min_size=16, ...
return gen_image_ops.generate_bounding_box_proposals( scores=scores, bbox_deltas=bbox_deltas, image_info=image_info, anchors=anchors, nms_threshold=nms_threshold, pre_nms_topn=pre_nms_topn, min_size=min_size, post_nms_topn=post_nms_topn, name=name)
Generate bounding box proposals from encoded bounding boxes. Args: scores: A 4-D float `Tensor` of shape `[num_images, height, width, num_achors]` containing scores of the boxes for given anchors, can be unsorted. bbox_deltas: A 4-D float `Tensor` of shape `[num_images, height, width, 4 x num...
Generate bounding box proposals from encoded bounding boxes.
[ "Generate", "bounding", "box", "proposals", "from", "encoded", "bounding", "boxes", "." ]
def generate_bounding_box_proposals(scores, bbox_deltas, image_info, anchors, nms_threshold=0.7, pre_nms_topn=6000, ...
[ "def", "generate_bounding_box_proposals", "(", "scores", ",", "bbox_deltas", ",", "image_info", ",", "anchors", ",", "nms_threshold", "=", "0.7", ",", "pre_nms_topn", "=", "6000", ",", "min_size", "=", "16", ",", "post_nms_topn", "=", "300", ",", "name", "=", ...
https://github.com/tensorflow/tensorflow/blob/419e3a6b650ea4bd1b0cba23c4348f8a69f3272e/tensorflow/python/ops/image_ops_impl.py#L5739-L5785
smilehao/xlua-framework
a03801538be2b0e92d39332d445b22caca1ef61f
ConfigData/trunk/tools/protobuf-2.5.0/protobuf-2.5.0/python/build/lib/google/protobuf/internal/cpp_message.py
python
RepeatedCompositeProperty
(cdescriptor, message_type)
return property(Getter, Setter, doc=doc)
Returns a Python property for the given repeated composite field.
Returns a Python property for the given repeated composite field.
[ "Returns", "a", "Python", "property", "for", "the", "given", "repeated", "composite", "field", "." ]
def RepeatedCompositeProperty(cdescriptor, message_type): """Returns a Python property for the given repeated composite field.""" def Getter(self): container = self._composite_fields.get(cdescriptor.name, None) if container is None: container = RepeatedCompositeContainer( self, cdescriptor,...
[ "def", "RepeatedCompositeProperty", "(", "cdescriptor", ",", "message_type", ")", ":", "def", "Getter", "(", "self", ")", ":", "container", "=", "self", ".", "_composite_fields", ".", "get", "(", "cdescriptor", ".", "name", ",", "None", ")", "if", "container...
https://github.com/smilehao/xlua-framework/blob/a03801538be2b0e92d39332d445b22caca1ef61f/ConfigData/trunk/tools/protobuf-2.5.0/protobuf-2.5.0/python/build/lib/google/protobuf/internal/cpp_message.py#L274-L290
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/osx_cocoa/grid.py
python
Grid.GetSelectionMode
(*args, **kwargs)
return _grid.Grid_GetSelectionMode(*args, **kwargs)
GetSelectionMode(self) -> WXGRIDSELECTIONMODES
GetSelectionMode(self) -> WXGRIDSELECTIONMODES
[ "GetSelectionMode", "(", "self", ")", "-", ">", "WXGRIDSELECTIONMODES" ]
def GetSelectionMode(*args, **kwargs): """GetSelectionMode(self) -> WXGRIDSELECTIONMODES""" return _grid.Grid_GetSelectionMode(*args, **kwargs)
[ "def", "GetSelectionMode", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_grid", ".", "Grid_GetSelectionMode", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_cocoa/grid.py#L1227-L1229
CRYTEK/CRYENGINE
232227c59a220cbbd311576f0fbeba7bb53b2a8c
Editor/Python/windows/Lib/site-packages/pip/_vendor/distlib/_backport/tarfile.py
python
TarFile.makefile
(self, tarinfo, targetpath)
Make a file called targetpath.
Make a file called targetpath.
[ "Make", "a", "file", "called", "targetpath", "." ]
def makefile(self, tarinfo, targetpath): """Make a file called targetpath. """ source = self.fileobj source.seek(tarinfo.offset_data) target = bltn_open(targetpath, "wb") if tarinfo.sparse is not None: for offset, size in tarinfo.sparse: target...
[ "def", "makefile", "(", "self", ",", "tarinfo", ",", "targetpath", ")", ":", "source", "=", "self", ".", "fileobj", "source", ".", "seek", "(", "tarinfo", ".", "offset_data", ")", "target", "=", "bltn_open", "(", "targetpath", ",", "\"wb\"", ")", "if", ...
https://github.com/CRYTEK/CRYENGINE/blob/232227c59a220cbbd311576f0fbeba7bb53b2a8c/Editor/Python/windows/Lib/site-packages/pip/_vendor/distlib/_backport/tarfile.py#L2296-L2310
neopenx/Dragon
0e639a7319035ddc81918bd3df059230436ee0a1
Dragon/python/dragon/vm/caffe/misc.py
python
set_mode_gpu
()
Set to the GPU mode. [**PyCaffe Style**] Returns ------- None References ---------- The implementation of `set_mode_gpu(_caffe.cpp, L52)`_.
Set to the GPU mode. [**PyCaffe Style**]
[ "Set", "to", "the", "GPU", "mode", ".", "[", "**", "PyCaffe", "Style", "**", "]" ]
def set_mode_gpu(): """Set to the GPU mode. [**PyCaffe Style**] Returns ------- None References ---------- The implementation of `set_mode_gpu(_caffe.cpp, L52)`_. """ config.EnableCUDA()
[ "def", "set_mode_gpu", "(", ")", ":", "config", ".", "EnableCUDA", "(", ")" ]
https://github.com/neopenx/Dragon/blob/0e639a7319035ddc81918bd3df059230436ee0a1/Dragon/python/dragon/vm/caffe/misc.py#L35-L47
hanpfei/chromium-net
392cc1fa3a8f92f42e4071ab6e674d8e0482f83f
third_party/catapult/third_party/mapreduce/mapreduce/output_writers.py
python
GoogleCloudStorageConsistentOutputWriter._rewrite_tmpfile
(self, mainfile, tmpfile, writer_spec)
Copies contents of tmpfile (name) to mainfile (buffer).
Copies contents of tmpfile (name) to mainfile (buffer).
[ "Copies", "contents", "of", "tmpfile", "(", "name", ")", "to", "mainfile", "(", "buffer", ")", "." ]
def _rewrite_tmpfile(self, mainfile, tmpfile, writer_spec): """Copies contents of tmpfile (name) to mainfile (buffer).""" if mainfile.closed: # can happen when finalize fails return account_id = self._get_tmp_account_id(writer_spec) f = cloudstorage_api.open(tmpfile, _account_id=account_id)...
[ "def", "_rewrite_tmpfile", "(", "self", ",", "mainfile", ",", "tmpfile", ",", "writer_spec", ")", ":", "if", "mainfile", ".", "closed", ":", "# can happen when finalize fails", "return", "account_id", "=", "self", ".", "_get_tmp_account_id", "(", "writer_spec", ")...
https://github.com/hanpfei/chromium-net/blob/392cc1fa3a8f92f42e4071ab6e674d8e0482f83f/third_party/catapult/third_party/mapreduce/mapreduce/output_writers.py#L938-L952
hanpfei/chromium-net
392cc1fa3a8f92f42e4071ab6e674d8e0482f83f
third_party/catapult/telemetry/telemetry/util/command_line.py
python
ArgParseCommand.main
(cls, args=None)
return min(cls().Run(options, extra_args), 255)
Main method to run this command as a standalone script.
Main method to run this command as a standalone script.
[ "Main", "method", "to", "run", "this", "command", "as", "a", "standalone", "script", "." ]
def main(cls, args=None): """Main method to run this command as a standalone script.""" parser = cls.CreateParser() cls.AddCommandLineArgs(parser, None) options, extra_args = parser.parse_known_args(args=args) cls.ProcessCommandLineArgs(parser, options, extra_args, None) return min(cls().Run(opt...
[ "def", "main", "(", "cls", ",", "args", "=", "None", ")", ":", "parser", "=", "cls", ".", "CreateParser", "(", ")", "cls", ".", "AddCommandLineArgs", "(", "parser", ",", "None", ")", "options", ",", "extra_args", "=", "parser", ".", "parse_known_args", ...
https://github.com/hanpfei/chromium-net/blob/392cc1fa3a8f92f42e4071ab6e674d8e0482f83f/third_party/catapult/telemetry/telemetry/util/command_line.py#L33-L39
openvinotoolkit/openvino
dedcbeafa8b84cccdc55ca64b8da516682b381c7
tools/mo/openvino/tools/mo/utils/cli_parser.py
python
readable_dirs
(paths: str)
return ','.join(paths_list)
Checks that comma separated list of paths are readable directories. :param paths: comma separated list of paths. :return: comma separated list of paths.
Checks that comma separated list of paths are readable directories. :param paths: comma separated list of paths. :return: comma separated list of paths.
[ "Checks", "that", "comma", "separated", "list", "of", "paths", "are", "readable", "directories", ".", ":", "param", "paths", ":", "comma", "separated", "list", "of", "paths", ".", ":", "return", ":", "comma", "separated", "list", "of", "paths", "." ]
def readable_dirs(paths: str): """ Checks that comma separated list of paths are readable directories. :param paths: comma separated list of paths. :return: comma separated list of paths. """ paths_list = [readable_dir(path) for path in paths.split(',')] return ','.join(paths_list)
[ "def", "readable_dirs", "(", "paths", ":", "str", ")", ":", "paths_list", "=", "[", "readable_dir", "(", "path", ")", "for", "path", "in", "paths", ".", "split", "(", "','", ")", "]", "return", "','", ".", "join", "(", "paths_list", ")" ]
https://github.com/openvinotoolkit/openvino/blob/dedcbeafa8b84cccdc55ca64b8da516682b381c7/tools/mo/openvino/tools/mo/utils/cli_parser.py#L166-L173
potassco/clingo
e0c91d8f95cc28de1c480a871f9c97c30de83d40
libpyclingo/clingo/theory.py
python
Theory.validate_options
(self)
Validate the options of the theory.
Validate the options of the theory.
[ "Validate", "the", "options", "of", "the", "theory", "." ]
def validate_options(self) -> None: ''' Validate the options of the theory. ''' self.__call0('validate_options', self._theory)
[ "def", "validate_options", "(", "self", ")", "->", "None", ":", "self", ".", "__call0", "(", "'validate_options'", ",", "self", ".", "_theory", ")" ]
https://github.com/potassco/clingo/blob/e0c91d8f95cc28de1c480a871f9c97c30de83d40/libpyclingo/clingo/theory.py#L266-L270
trailofbits/llvm-sanitizer-tutorial
d29dfeec7f51fbf234fd0080f28f2b30cd0b6e99
llvm/tools/clang/tools/scan-build-py/libscanbuild/__init__.py
python
duplicate_check
(method)
return predicate
Predicate to detect duplicated entries. Unique hash method can be use to detect duplicates. Entries are represented as dictionaries, which has no default hash method. This implementation uses a set datatype to store the unique hash values. This method returns a method which can detect the duplicate va...
Predicate to detect duplicated entries.
[ "Predicate", "to", "detect", "duplicated", "entries", "." ]
def duplicate_check(method): """ Predicate to detect duplicated entries. Unique hash method can be use to detect duplicates. Entries are represented as dictionaries, which has no default hash method. This implementation uses a set datatype to store the unique hash values. This method returns a met...
[ "def", "duplicate_check", "(", "method", ")", ":", "def", "predicate", "(", "entry", ")", ":", "entry_hash", "=", "predicate", ".", "unique", "(", "entry", ")", "if", "entry_hash", "not", "in", "predicate", ".", "state", ":", "predicate", ".", "state", "...
https://github.com/trailofbits/llvm-sanitizer-tutorial/blob/d29dfeec7f51fbf234fd0080f28f2b30cd0b6e99/llvm/tools/clang/tools/scan-build-py/libscanbuild/__init__.py#L26-L44
benoitsteiner/tensorflow-opencl
cb7cb40a57fde5cfd4731bc551e82a1e2fef43a5
tensorflow/contrib/distributions/python/ops/poisson_lognormal.py
python
concat_vectors
(*args)
return [val for vec in args_ for val in vec]
Concatenates input vectors, statically if possible.
Concatenates input vectors, statically if possible.
[ "Concatenates", "input", "vectors", "statically", "if", "possible", "." ]
def concat_vectors(*args): """Concatenates input vectors, statically if possible.""" args_ = [static_value(x) for x in args] if any(vec is None for vec in args_): return array_ops.concat(args, axis=0) return [val for vec in args_ for val in vec]
[ "def", "concat_vectors", "(", "*", "args", ")", ":", "args_", "=", "[", "static_value", "(", "x", ")", "for", "x", "in", "args", "]", "if", "any", "(", "vec", "is", "None", "for", "vec", "in", "args_", ")", ":", "return", "array_ops", ".", "concat"...
https://github.com/benoitsteiner/tensorflow-opencl/blob/cb7cb40a57fde5cfd4731bc551e82a1e2fef43a5/tensorflow/contrib/distributions/python/ops/poisson_lognormal.py#L319-L324
apache/impala
8ddac48f3428c86f2cbd037ced89cfb903298b12
shell/impala_shell.py
python
ImpalaShell.do_shell
(self, args)
Run a command on the shell Usage: shell <cmd> ! <cmd>
Run a command on the shell Usage: shell <cmd> ! <cmd>
[ "Run", "a", "command", "on", "the", "shell", "Usage", ":", "shell", "<cmd", ">", "!", "<cmd", ">" ]
def do_shell(self, args): """Run a command on the shell Usage: shell <cmd> ! <cmd> """ try: start_time = time.time() os.system(args) self._print_if_verbose("--------\nExecuted in %2.2fs" % (time.time() - start_time)) except Exception as e: print('Error running com...
[ "def", "do_shell", "(", "self", ",", "args", ")", ":", "try", ":", "start_time", "=", "time", ".", "time", "(", ")", "os", ".", "system", "(", "args", ")", "self", ".", "_print_if_verbose", "(", "\"--------\\nExecuted in %2.2fs\"", "%", "(", "time", ".",...
https://github.com/apache/impala/blob/8ddac48f3428c86f2cbd037ced89cfb903298b12/shell/impala_shell.py#L408-L420
lmb-freiburg/flownet2
b92e198b56b0e52e1ba0a5a98dc0e39fa5ae70cc
scripts/cpp_lint.py
python
FileInfo.Extension
(self)
return self.Split()[2]
File extension - text following the final period.
File extension - text following the final period.
[ "File", "extension", "-", "text", "following", "the", "final", "period", "." ]
def Extension(self): """File extension - text following the final period.""" return self.Split()[2]
[ "def", "Extension", "(", "self", ")", ":", "return", "self", ".", "Split", "(", ")", "[", "2", "]" ]
https://github.com/lmb-freiburg/flownet2/blob/b92e198b56b0e52e1ba0a5a98dc0e39fa5ae70cc/scripts/cpp_lint.py#L948-L950
microsoft/TSS.MSR
0f2516fca2cd9929c31d5450e39301c9bde43688
TSS.Py/src/TpmTypes.py
python
TPM2_MAC_REQUEST.fromBytes
(buffer)
return TpmBuffer(buffer).createObj(TPM2_MAC_REQUEST)
Returns new TPM2_MAC_REQUEST object constructed from its marshaled representation in the given byte buffer
Returns new TPM2_MAC_REQUEST object constructed from its marshaled representation in the given byte buffer
[ "Returns", "new", "TPM2_MAC_REQUEST", "object", "constructed", "from", "its", "marshaled", "representation", "in", "the", "given", "byte", "buffer" ]
def fromBytes(buffer): """ Returns new TPM2_MAC_REQUEST object constructed from its marshaled representation in the given byte buffer """ return TpmBuffer(buffer).createObj(TPM2_MAC_REQUEST)
[ "def", "fromBytes", "(", "buffer", ")", ":", "return", "TpmBuffer", "(", "buffer", ")", ".", "createObj", "(", "TPM2_MAC_REQUEST", ")" ]
https://github.com/microsoft/TSS.MSR/blob/0f2516fca2cd9929c31d5450e39301c9bde43688/TSS.Py/src/TpmTypes.py#L11759-L11763
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Gems/CloudGemMetric/v1/AWS/common-code/Lib/numpy/ma/extras.py
python
_ezclump
(mask)
return r
Finds the clumps (groups of data with the same values) for a 1D bool array. Returns a series of slices.
Finds the clumps (groups of data with the same values) for a 1D bool array.
[ "Finds", "the", "clumps", "(", "groups", "of", "data", "with", "the", "same", "values", ")", "for", "a", "1D", "bool", "array", "." ]
def _ezclump(mask): """ Finds the clumps (groups of data with the same values) for a 1D bool array. Returns a series of slices. """ if mask.ndim > 1: mask = mask.ravel() idx = (mask[1:] ^ mask[:-1]).nonzero() idx = idx[0] + 1 if mask[0]: if len(idx) == 0: re...
[ "def", "_ezclump", "(", "mask", ")", ":", "if", "mask", ".", "ndim", ">", "1", ":", "mask", "=", "mask", ".", "ravel", "(", ")", "idx", "=", "(", "mask", "[", "1", ":", "]", "^", "mask", "[", ":", "-", "1", "]", ")", ".", "nonzero", "(", ...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Gems/CloudGemMetric/v1/AWS/common-code/Lib/numpy/ma/extras.py#L1770-L1796
windystrife/UnrealEngine_NVIDIAGameWorks
b50e6338a7c5b26374d66306ebc7807541ff815e
Engine/Extras/ThirdPartyNotUE/emsdk/Win64/python/2.7.5.3_64bit/Lib/lib-tk/Tkinter.py
python
Canvas.create_window
(self, *args, **kw)
return self._create('window', args, kw)
Create window with coordinates x1,y1,x2,y2.
Create window with coordinates x1,y1,x2,y2.
[ "Create", "window", "with", "coordinates", "x1", "y1", "x2", "y2", "." ]
def create_window(self, *args, **kw): """Create window with coordinates x1,y1,x2,y2.""" return self._create('window', args, kw)
[ "def", "create_window", "(", "self", ",", "*", "args", ",", "*", "*", "kw", ")", ":", "return", "self", ".", "_create", "(", "'window'", ",", "args", ",", "kw", ")" ]
https://github.com/windystrife/UnrealEngine_NVIDIAGameWorks/blob/b50e6338a7c5b26374d66306ebc7807541ff815e/Engine/Extras/ThirdPartyNotUE/emsdk/Win64/python/2.7.5.3_64bit/Lib/lib-tk/Tkinter.py#L2276-L2278
okex/V3-Open-API-SDK
c5abb0db7e2287718e0055e17e57672ce0ec7fd9
okex-python-sdk-api/venv/Lib/site-packages/pip-19.0.3-py3.8.egg/pip/_internal/configuration.py
python
Configuration.load
(self)
Loads configuration from configuration files and environment
Loads configuration from configuration files and environment
[ "Loads", "configuration", "from", "configuration", "files", "and", "environment" ]
def load(self): # type: () -> None """Loads configuration from configuration files and environment """ self._load_config_files() if not self.isolated: self._load_environment_vars()
[ "def", "load", "(", "self", ")", ":", "# type: () -> None", "self", ".", "_load_config_files", "(", ")", "if", "not", "self", ".", "isolated", ":", "self", ".", "_load_environment_vars", "(", ")" ]
https://github.com/okex/V3-Open-API-SDK/blob/c5abb0db7e2287718e0055e17e57672ce0ec7fd9/okex-python-sdk-api/venv/Lib/site-packages/pip-19.0.3-py3.8.egg/pip/_internal/configuration.py#L112-L118
natanielruiz/android-yolo
1ebb54f96a67a20ff83ddfc823ed83a13dc3a47f
jni-build/jni/include/external/bazel_tools/third_party/py/gflags/__init__.py
python
FlagValues.Reset
(self)
Resets the values to the point before FLAGS(argv) was called.
Resets the values to the point before FLAGS(argv) was called.
[ "Resets", "the", "values", "to", "the", "point", "before", "FLAGS", "(", "argv", ")", "was", "called", "." ]
def Reset(self): """Resets the values to the point before FLAGS(argv) was called.""" for f in self.FlagDict().values(): f.Unparse()
[ "def", "Reset", "(", "self", ")", ":", "for", "f", "in", "self", ".", "FlagDict", "(", ")", ".", "values", "(", ")", ":", "f", ".", "Unparse", "(", ")" ]
https://github.com/natanielruiz/android-yolo/blob/1ebb54f96a67a20ff83ddfc823ed83a13dc3a47f/jni-build/jni/include/external/bazel_tools/third_party/py/gflags/__init__.py#L1336-L1339
hanpfei/chromium-net
392cc1fa3a8f92f42e4071ab6e674d8e0482f83f
third_party/catapult/third_party/mapreduce/mapreduce/input_readers.py
python
_ReducerReader.from_json
(cls, json)
return result
Creates an instance of the InputReader for the given input shard state. Args: json: The InputReader state as a dict-like object. Returns: An instance of the InputReader configured using the values of json.
Creates an instance of the InputReader for the given input shard state.
[ "Creates", "an", "instance", "of", "the", "InputReader", "for", "the", "given", "input", "shard", "state", "." ]
def from_json(cls, json): """Creates an instance of the InputReader for the given input shard state. Args: json: The InputReader state as a dict-like object. Returns: An instance of the InputReader configured using the values of json. """ result = super(_ReducerReader, cls).from_json(j...
[ "def", "from_json", "(", "cls", ",", "json", ")", ":", "result", "=", "super", "(", "_ReducerReader", ",", "cls", ")", ".", "from_json", "(", "json", ")", "result", ".", "current_key", "=", "_ReducerReader", ".", "decode_data", "(", "json", "[", "\"curre...
https://github.com/hanpfei/chromium-net/blob/392cc1fa3a8f92f42e4071ab6e674d8e0482f83f/third_party/catapult/third_party/mapreduce/mapreduce/input_readers.py#L2705-L2717
hanpfei/chromium-net
392cc1fa3a8f92f42e4071ab6e674d8e0482f83f
tools/grit/grit/gather/chrome_html.py
python
ChromeHtml.GetText
(self)
return self.inlined_text_
Returns inlined text of the HTML document.
Returns inlined text of the HTML document.
[ "Returns", "inlined", "text", "of", "the", "HTML", "document", "." ]
def GetText(self): """Returns inlined text of the HTML document.""" return self.inlined_text_
[ "def", "GetText", "(", "self", ")", ":", "return", "self", ".", "inlined_text_" ]
https://github.com/hanpfei/chromium-net/blob/392cc1fa3a8f92f42e4071ab6e674d8e0482f83f/tools/grit/grit/gather/chrome_html.py#L307-L309
hanpfei/chromium-net
392cc1fa3a8f92f42e4071ab6e674d8e0482f83f
tools/memory_inspector/memory_inspector/backends/prebuilts_fetcher.py
python
_IsChanged
(local_file_path)
return is_changed
Checks whether the local_file_path exists and matches the expected hash.
Checks whether the local_file_path exists and matches the expected hash.
[ "Checks", "whether", "the", "local_file_path", "exists", "and", "matches", "the", "expected", "hash", "." ]
def _IsChanged(local_file_path): """Checks whether the local_file_path exists and matches the expected hash.""" is_changed = True expected_hash = _GetRemoteFileID(local_file_path) if os.path.exists(local_file_path): with open(local_file_path, 'rb') as f: local_hash = hashlib.sha1(f.read()).hexdigest()...
[ "def", "_IsChanged", "(", "local_file_path", ")", ":", "is_changed", "=", "True", "expected_hash", "=", "_GetRemoteFileID", "(", "local_file_path", ")", "if", "os", ".", "path", ".", "exists", "(", "local_file_path", ")", ":", "with", "open", "(", "local_file_...
https://github.com/hanpfei/chromium-net/blob/392cc1fa3a8f92f42e4071ab6e674d8e0482f83f/tools/memory_inspector/memory_inspector/backends/prebuilts_fetcher.py#L41-L49
serguei-k/maya-math-nodes
669ace5366356c6038ef63ba7d5574f18a583ae9
python/maya_math_nodes/expression_parser.py
python
Binary.__init__
(self, value, left, right)
Initialize AST node Args: value (str): Binary operator value left (int | float | list[float] | str): Left operand value right (int | float | list[float] | str): Right operand value
Initialize AST node
[ "Initialize", "AST", "node" ]
def __init__(self, value, left, right): """Initialize AST node Args: value (str): Binary operator value left (int | float | list[float] | str): Left operand value right (int | float | list[float] | str): Right operand value """ self.value = value ...
[ "def", "__init__", "(", "self", ",", "value", ",", "left", ",", "right", ")", ":", "self", ".", "value", "=", "value", "self", ".", "left", "=", "left", "self", ".", "right", "=", "right" ]
https://github.com/serguei-k/maya-math-nodes/blob/669ace5366356c6038ef63ba7d5574f18a583ae9/python/maya_math_nodes/expression_parser.py#L64-L74
LiquidPlayer/LiquidCore
9405979363f2353ac9a71ad8ab59685dd7f919c9
deps/boost_1_66_0/tools/build/src/build/type.py
python
is_derived
(type, base)
Returns true if 'type' is 'base' or has 'base' as its direct or indirect base.
Returns true if 'type' is 'base' or has 'base' as its direct or indirect base.
[ "Returns", "true", "if", "type", "is", "base", "or", "has", "base", "as", "its", "direct", "or", "indirect", "base", "." ]
def is_derived (type, base): """ Returns true if 'type' is 'base' or has 'base' as its direct or indirect base. """ assert isinstance(type, basestring) assert isinstance(base, basestring) # TODO: this isn't very efficient, especially for bases close to type if base in all_bases (type): r...
[ "def", "is_derived", "(", "type", ",", "base", ")", ":", "assert", "isinstance", "(", "type", ",", "basestring", ")", "assert", "isinstance", "(", "base", ",", "basestring", ")", "# TODO: this isn't very efficient, especially for bases close to type", "if", "base", ...
https://github.com/LiquidPlayer/LiquidCore/blob/9405979363f2353ac9a71ad8ab59685dd7f919c9/deps/boost_1_66_0/tools/build/src/build/type.py#L202-L211
Polidea/SiriusObfuscator
b0e590d8130e97856afe578869b83a209e2b19be
SymbolExtractorAndRenamer/lldb/scripts/Python/static-binding/lldb.py
python
SBBlock.GetDescription
(self, *args)
return _lldb.SBBlock_GetDescription(self, *args)
GetDescription(self, SBStream description) -> bool
GetDescription(self, SBStream description) -> bool
[ "GetDescription", "(", "self", "SBStream", "description", ")", "-", ">", "bool" ]
def GetDescription(self, *args): """GetDescription(self, SBStream description) -> bool""" return _lldb.SBBlock_GetDescription(self, *args)
[ "def", "GetDescription", "(", "self", ",", "*", "args", ")", ":", "return", "_lldb", ".", "SBBlock_GetDescription", "(", "self", ",", "*", "args", ")" ]
https://github.com/Polidea/SiriusObfuscator/blob/b0e590d8130e97856afe578869b83a209e2b19be/SymbolExtractorAndRenamer/lldb/scripts/Python/static-binding/lldb.py#L1269-L1271
ApolloAuto/apollo-platform
86d9dc6743b496ead18d597748ebabd34a513289
ros/third_party/lib_x86_64/python2.7/dist-packages/numpy/polynomial/hermite_e.py
python
hermeval2d
(x, y, c)
return c
Evaluate a 2-D HermiteE series at points (x, y). This function returns the values: .. math:: p(x,y) = \\sum_{i,j} c_{i,j} * He_i(x) * He_j(y) The parameters `x` and `y` are converted to arrays only if they are tuples or a lists, otherwise they are treated as a scalars and they must have the same ...
Evaluate a 2-D HermiteE series at points (x, y).
[ "Evaluate", "a", "2", "-", "D", "HermiteE", "series", "at", "points", "(", "x", "y", ")", "." ]
def hermeval2d(x, y, c): """ Evaluate a 2-D HermiteE series at points (x, y). This function returns the values: .. math:: p(x,y) = \\sum_{i,j} c_{i,j} * He_i(x) * He_j(y) The parameters `x` and `y` are converted to arrays only if they are tuples or a lists, otherwise they are treated as a sca...
[ "def", "hermeval2d", "(", "x", ",", "y", ",", "c", ")", ":", "try", ":", "x", ",", "y", "=", "np", ".", "array", "(", "(", "x", ",", "y", ")", ",", "copy", "=", "0", ")", "except", ":", "raise", "ValueError", "(", "'x, y are incompatible'", ")"...
https://github.com/ApolloAuto/apollo-platform/blob/86d9dc6743b496ead18d597748ebabd34a513289/ros/third_party/lib_x86_64/python2.7/dist-packages/numpy/polynomial/hermite_e.py#L944-L997
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/numpy/py2/numpy/ma/core.py
python
MaskedArray._get_data
(self)
return ndarray.view(self, self._baseclass)
Return the current data, as a view of the original underlying data.
Return the current data, as a view of the original underlying data.
[ "Return", "the", "current", "data", "as", "a", "view", "of", "the", "original", "underlying", "data", "." ]
def _get_data(self): """Return the current data, as a view of the original underlying data. """ return ndarray.view(self, self._baseclass)
[ "def", "_get_data", "(", "self", ")", ":", "return", "ndarray", ".", "view", "(", "self", ",", "self", ".", "_baseclass", ")" ]
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/numpy/py2/numpy/ma/core.py#L3564-L3569
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/gtk/grid.py
python
Grid.GetColLabelTextOrientation
(*args, **kwargs)
return _grid.Grid_GetColLabelTextOrientation(*args, **kwargs)
GetColLabelTextOrientation(self) -> int
GetColLabelTextOrientation(self) -> int
[ "GetColLabelTextOrientation", "(", "self", ")", "-", ">", "int" ]
def GetColLabelTextOrientation(*args, **kwargs): """GetColLabelTextOrientation(self) -> int""" return _grid.Grid_GetColLabelTextOrientation(*args, **kwargs)
[ "def", "GetColLabelTextOrientation", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_grid", ".", "Grid_GetColLabelTextOrientation", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/gtk/grid.py#L1506-L1508
panda3d/panda3d
833ad89ebad58395d0af0b7ec08538e5e4308265
direct/src/tkpanels/FSMInspector.py
python
FSMInspector.onDestroy
(self, event)
Called on ClassicFSM Panel shutdown
Called on ClassicFSM Panel shutdown
[ "Called", "on", "ClassicFSM", "Panel", "shutdown" ]
def onDestroy(self, event): """ Called on ClassicFSM Panel shutdown """ self.fsm.inspecting = 0 for si in self.stateInspectorDict.values(): self.ignore(self.name + '_' + si.getName() + '_entered') self.ignore(self.name + '_' + si.getName() + '_exited')
[ "def", "onDestroy", "(", "self", ",", "event", ")", ":", "self", ".", "fsm", ".", "inspecting", "=", "0", "for", "si", "in", "self", ".", "stateInspectorDict", ".", "values", "(", ")", ":", "self", ".", "ignore", "(", "self", ".", "name", "+", "'_'...
https://github.com/panda3d/panda3d/blob/833ad89ebad58395d0af0b7ec08538e5e4308265/direct/src/tkpanels/FSMInspector.py#L389-L394
ablab/quast
5f6709528129a6ad266a6b24ef3f40b88f0fe04b
quast_libs/busco/BuscoAnalysis.py
python
BuscoAnalysis._load_length
(self)
This function loads the length cutoffs file
This function loads the length cutoffs file
[ "This", "function", "loads", "the", "length", "cutoffs", "file" ]
def _load_length(self): """ This function loads the length cutoffs file """ leng_dic = {} sd_dic = {} try: f = open('%slengths_cutoff' % self._lineage_path) except IOError: BuscoAnalysis._logger.error( 'Impossible to read th...
[ "def", "_load_length", "(", "self", ")", ":", "leng_dic", "=", "{", "}", "sd_dic", "=", "{", "}", "try", ":", "f", "=", "open", "(", "'%slengths_cutoff'", "%", "self", ".", "_lineage_path", ")", "except", "IOError", ":", "BuscoAnalysis", ".", "_logger", ...
https://github.com/ablab/quast/blob/5f6709528129a6ad266a6b24ef3f40b88f0fe04b/quast_libs/busco/BuscoAnalysis.py#L460-L487
snap-stanford/snap-python
d53c51b0a26aa7e3e7400b014cdf728948fde80a
setup/snap.py
python
TRnd.GetUniDevInt64
(self, Range=0)
return _snap.TRnd_GetUniDevInt64(self, Range)
GetUniDevInt64(TRnd self, int64 const & Range=0) -> int64 Parameters: Range: int64 const & GetUniDevInt64(TRnd self) -> int64 Parameters: self: TRnd *
GetUniDevInt64(TRnd self, int64 const & Range=0) -> int64
[ "GetUniDevInt64", "(", "TRnd", "self", "int64", "const", "&", "Range", "=", "0", ")", "-", ">", "int64" ]
def GetUniDevInt64(self, Range=0): """ GetUniDevInt64(TRnd self, int64 const & Range=0) -> int64 Parameters: Range: int64 const & GetUniDevInt64(TRnd self) -> int64 Parameters: self: TRnd * """ return _snap.TRnd_GetUniDevInt64(self, Ran...
[ "def", "GetUniDevInt64", "(", "self", ",", "Range", "=", "0", ")", ":", "return", "_snap", ".", "TRnd_GetUniDevInt64", "(", "self", ",", "Range", ")" ]
https://github.com/snap-stanford/snap-python/blob/d53c51b0a26aa7e3e7400b014cdf728948fde80a/setup/snap.py#L7632-L7645