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
su2code/SU2
72b2fa977b64b9683a388920f05298a40d39e5c5
SU2_PY/SU2/util/ordered_dict.py
python
OrderedDict.__reduce__
(self)
return self.__class__, (items,)
Return state information for pickling
Return state information for pickling
[ "Return", "state", "information", "for", "pickling" ]
def __reduce__(self): 'Return state information for pickling' items = [[k, self[k]] for k in self] inst_dict = vars(self).copy() for k in vars(OrderedDict()): inst_dict.pop(k, None) if inst_dict: return (self.__class__, (items,), inst_dict) return ...
[ "def", "__reduce__", "(", "self", ")", ":", "items", "=", "[", "[", "k", ",", "self", "[", "k", "]", "]", "for", "k", "in", "self", "]", "inst_dict", "=", "vars", "(", "self", ")", ".", "copy", "(", ")", "for", "k", "in", "vars", "(", "Ordere...
https://github.com/su2code/SU2/blob/72b2fa977b64b9683a388920f05298a40d39e5c5/SU2_PY/SU2/util/ordered_dict.py#L216-L224
wlanjie/AndroidFFmpeg
7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf
tools/fdk-aac-build/x86/toolchain/lib/python2.7/weakref.py
python
WeakKeyDictionary.iterkeyrefs
(self)
return self.data.iterkeys()
Return an iterator that yields the weak references to the keys. The references are not guaranteed to be 'live' at the time they are used, so the result of calling the references needs to be checked before being used. This can be used to avoid creating references that will cause the gar...
Return an iterator that yields the weak references to the keys.
[ "Return", "an", "iterator", "that", "yields", "the", "weak", "references", "to", "the", "keys", "." ]
def iterkeyrefs(self): """Return an iterator that yields the weak references to the keys. The references are not guaranteed to be 'live' at the time they are used, so the result of calling the references needs to be checked before being used. This can be used to avoid creating ...
[ "def", "iterkeyrefs", "(", "self", ")", ":", "return", "self", ".", "data", ".", "iterkeys", "(", ")" ]
https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/x86/toolchain/lib/python2.7/weakref.py#L314-L324
y123456yz/reading-and-annotate-mongodb-3.6
93280293672ca7586dc24af18132aa61e4ed7fcf
mongo/src/third_party/scons-2.5.0/scons-local-2.5.0/SCons/Environment.py
python
OverrideEnvironment.Dictionary
(self)
return d
Emulates the items() method of dictionaries.
Emulates the items() method of dictionaries.
[ "Emulates", "the", "items", "()", "method", "of", "dictionaries", "." ]
def Dictionary(self): """Emulates the items() method of dictionaries.""" d = self.__dict__['__subject'].Dictionary().copy() d.update(self.__dict__['overrides']) return d
[ "def", "Dictionary", "(", "self", ")", ":", "d", "=", "self", ".", "__dict__", "[", "'__subject'", "]", ".", "Dictionary", "(", ")", ".", "copy", "(", ")", "d", ".", "update", "(", "self", ".", "__dict__", "[", "'overrides'", "]", ")", "return", "d...
https://github.com/y123456yz/reading-and-annotate-mongodb-3.6/blob/93280293672ca7586dc24af18132aa61e4ed7fcf/mongo/src/third_party/scons-2.5.0/scons-local-2.5.0/SCons/Environment.py#L2334-L2338
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
wx/tools/Editra/src/ed_vim.py
python
EditraCommander._GetSelectedLines
(self)
return start_line, end_line
Get the first and last line (exclusive) of selection
Get the first and last line (exclusive) of selection
[ "Get", "the", "first", "and", "last", "line", "(", "exclusive", ")", "of", "selection" ]
def _GetSelectedLines(self): """Get the first and last line (exclusive) of selection""" start, end = self._GetSelectionRange() start_line, end_line = (self.stc.LineFromPosition(start), self.stc.LineFromPosition(end - 1) + 1) return start_line, end_line
[ "def", "_GetSelectedLines", "(", "self", ")", ":", "start", ",", "end", "=", "self", ".", "_GetSelectionRange", "(", ")", "start_line", ",", "end_line", "=", "(", "self", ".", "stc", ".", "LineFromPosition", "(", "start", ")", ",", "self", ".", "stc", ...
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/wx/tools/Editra/src/ed_vim.py#L811-L816
google/shaka-packager
e1b0c7c45431327fd3ce193514a5407d07b39b22
packager/third_party/protobuf/python/google/protobuf/descriptor.py
python
FieldDescriptor.__init__
(self, name, full_name, index, number, type, cpp_type, label, default_value, message_type, enum_type, containing_type, is_extension, extension_scope, options=None, has_default_value=True, containing_oneof=None, json_name=None)
The arguments are as described in the description of FieldDescriptor attributes above. Note that containing_type may be None, and may be set later if necessary (to deal with circular references between message types, for example). Likewise for extension_scope.
The arguments are as described in the description of FieldDescriptor attributes above.
[ "The", "arguments", "are", "as", "described", "in", "the", "description", "of", "FieldDescriptor", "attributes", "above", "." ]
def __init__(self, name, full_name, index, number, type, cpp_type, label, default_value, message_type, enum_type, containing_type, is_extension, extension_scope, options=None, has_default_value=True, containing_oneof=None, json_name=None): """The arguments are as describ...
[ "def", "__init__", "(", "self", ",", "name", ",", "full_name", ",", "index", ",", "number", ",", "type", ",", "cpp_type", ",", "label", ",", "default_value", ",", "message_type", ",", "enum_type", ",", "containing_type", ",", "is_extension", ",", "extension_...
https://github.com/google/shaka-packager/blob/e1b0c7c45431327fd3ce193514a5407d07b39b22/packager/third_party/protobuf/python/google/protobuf/descriptor.py#L500-L538
hanpfei/chromium-net
392cc1fa3a8f92f42e4071ab6e674d8e0482f83f
build/android/pylib/utils/isolator.py
python
Isolator.Clear
(self)
Deletes the isolate dependency directory.
Deletes the isolate dependency directory.
[ "Deletes", "the", "isolate", "dependency", "directory", "." ]
def Clear(self): """Deletes the isolate dependency directory.""" if os.path.exists(self._isolate_deps_dir): shutil.rmtree(self._isolate_deps_dir)
[ "def", "Clear", "(", "self", ")", ":", "if", "os", ".", "path", ".", "exists", "(", "self", ".", "_isolate_deps_dir", ")", ":", "shutil", ".", "rmtree", "(", "self", ".", "_isolate_deps_dir", ")" ]
https://github.com/hanpfei/chromium-net/blob/392cc1fa3a8f92f42e4071ab6e674d8e0482f83f/build/android/pylib/utils/isolator.py#L73-L76
pytorch/pytorch
7176c92687d3cc847cc046bf002269c6949a21c2
torch/optim/lr_scheduler.py
python
CosineAnnealingWarmRestarts.step
(self, epoch=None)
Step could be called after every batch update Example: >>> scheduler = CosineAnnealingWarmRestarts(optimizer, T_0, T_mult) >>> iters = len(dataloader) >>> for epoch in range(20): >>> for i, sample in enumerate(dataloader): >>> inputs, labe...
Step could be called after every batch update
[ "Step", "could", "be", "called", "after", "every", "batch", "update" ]
def step(self, epoch=None): """Step could be called after every batch update Example: >>> scheduler = CosineAnnealingWarmRestarts(optimizer, T_0, T_mult) >>> iters = len(dataloader) >>> for epoch in range(20): >>> for i, sample in enumerate(dataloader...
[ "def", "step", "(", "self", ",", "epoch", "=", "None", ")", ":", "if", "epoch", "is", "None", "and", "self", ".", "last_epoch", "<", "0", ":", "epoch", "=", "0", "if", "epoch", "is", "None", ":", "epoch", "=", "self", ".", "last_epoch", "+", "1",...
https://github.com/pytorch/pytorch/blob/7176c92687d3cc847cc046bf002269c6949a21c2/torch/optim/lr_scheduler.py#L1269-L1338
rodeofx/OpenWalter
6116fbe3f04f1146c854afbfbdbe944feaee647e
walter/common/walterWidgets/walterBaseTreeView.py
python
BaseItem.insertChild
(self, child, rowNumber)
Insert a child item.
Insert a child item.
[ "Insert", "a", "child", "item", "." ]
def insertChild(self, child, rowNumber): """Insert a child item.""" child.parentItem = self self.childItems.insert(rowNumber, child)
[ "def", "insertChild", "(", "self", ",", "child", ",", "rowNumber", ")", ":", "child", ".", "parentItem", "=", "self", "self", ".", "childItems", ".", "insert", "(", "rowNumber", ",", "child", ")" ]
https://github.com/rodeofx/OpenWalter/blob/6116fbe3f04f1146c854afbfbdbe944feaee647e/walter/common/walterWidgets/walterBaseTreeView.py#L505-L508
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/osx_carbon/html.py
python
HtmlPrintout.SetHeader
(*args, **kwargs)
return _html.HtmlPrintout_SetHeader(*args, **kwargs)
SetHeader(self, String header, int pg=PAGE_ALL)
SetHeader(self, String header, int pg=PAGE_ALL)
[ "SetHeader", "(", "self", "String", "header", "int", "pg", "=", "PAGE_ALL", ")" ]
def SetHeader(*args, **kwargs): """SetHeader(self, String header, int pg=PAGE_ALL)""" return _html.HtmlPrintout_SetHeader(*args, **kwargs)
[ "def", "SetHeader", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_html", ".", "HtmlPrintout_SetHeader", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_carbon/html.py#L1284-L1286
timi-liuliang/echo
40a5a24d430eee4118314459ab7e03afcb3b8719
thirdparty/protobuf/python/mox.py
python
MockMethod.MultipleTimes
(self, group_name="default")
return self._CheckAndCreateNewGroup(group_name, MultipleTimesGroup)
Move this method into group of calls which may be called multiple times. A group of repeating calls must be defined together, and must be executed in full before the next expected mehtod can be called. Args: group_name: the name of the unordered group. Returns: self
Move this method into group of calls which may be called multiple times.
[ "Move", "this", "method", "into", "group", "of", "calls", "which", "may", "be", "called", "multiple", "times", "." ]
def MultipleTimes(self, group_name="default"): """Move this method into group of calls which may be called multiple times. A group of repeating calls must be defined together, and must be executed in full before the next expected mehtod can be called. Args: group_name: the name of the unordered ...
[ "def", "MultipleTimes", "(", "self", ",", "group_name", "=", "\"default\"", ")", ":", "return", "self", ".", "_CheckAndCreateNewGroup", "(", "group_name", ",", "MultipleTimesGroup", ")" ]
https://github.com/timi-liuliang/echo/blob/40a5a24d430eee4118314459ab7e03afcb3b8719/thirdparty/protobuf/python/mox.py#L704-L716
albertz/openlierox
d316c14a8eb57848ef56e9bfa7b23a56f694a51b
tools/DedicatedServerVideo/gdata/__init__.py
python
GDataEntry.IsMedia
(self)
Determines whether or not an entry is a GData Media entry.
Determines whether or not an entry is a GData Media entry.
[ "Determines", "whether", "or", "not", "an", "entry", "is", "a", "GData", "Media", "entry", "." ]
def IsMedia(self): """Determines whether or not an entry is a GData Media entry. """ if (self.GetEditMediaLink()): return True else: return False
[ "def", "IsMedia", "(", "self", ")", ":", "if", "(", "self", ".", "GetEditMediaLink", "(", ")", ")", ":", "return", "True", "else", ":", "return", "False" ]
https://github.com/albertz/openlierox/blob/d316c14a8eb57848ef56e9bfa7b23a56f694a51b/tools/DedicatedServerVideo/gdata/__init__.py#L351-L357
Slicer/Slicer
ba9fadf332cb0303515b68d8d06a344c82e3e3e5
Modules/Scripted/SegmentStatistics/SegmentStatistics.py
python
SegmentStatisticsLogic.exportToTable
(self, table, nonEmptyKeysOnly = True)
Export statistics to table node
Export statistics to table node
[ "Export", "statistics", "to", "table", "node" ]
def exportToTable(self, table, nonEmptyKeysOnly = True): """ Export statistics to table node """ tableWasModified = table.StartModify() table.RemoveAllColumns() keys = self.getNonEmptyKeys() if nonEmptyKeysOnly else self.keys columnHeaderNames, uniqueColumnHeaderNames = self.getHeaderNames(...
[ "def", "exportToTable", "(", "self", ",", "table", ",", "nonEmptyKeysOnly", "=", "True", ")", ":", "tableWasModified", "=", "table", ".", "StartModify", "(", ")", "table", ".", "RemoveAllColumns", "(", ")", "keys", "=", "self", ".", "getNonEmptyKeys", "(", ...
https://github.com/Slicer/Slicer/blob/ba9fadf332cb0303515b68d8d06a344c82e3e3e5/Modules/Scripted/SegmentStatistics/SegmentStatistics.py#L565-L646
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/scipy/py2/scipy/signal/ltisys.py
python
LinearTimeInvariant.poles
(self)
return self.to_zpk().poles
Poles of the system.
Poles of the system.
[ "Poles", "of", "the", "system", "." ]
def poles(self): """Poles of the system.""" return self.to_zpk().poles
[ "def", "poles", "(", "self", ")", ":", "return", "self", ".", "to_zpk", "(", ")", ".", "poles" ]
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/scipy/py2/scipy/signal/ltisys.py#L90-L92
shader-slang/slang
b8982fcf43b86c1e39dcc3dd19bff2821633eda6
external/vulkan/registry/conventions.py
python
ConventionsBase.generate_enum_table
(self)
return False
Return True if asciidoctor tables describing enumerants in a group should be generated as part of group generation.
Return True if asciidoctor tables describing enumerants in a group should be generated as part of group generation.
[ "Return", "True", "if", "asciidoctor", "tables", "describing", "enumerants", "in", "a", "group", "should", "be", "generated", "as", "part", "of", "group", "generation", "." ]
def generate_enum_table(self): """Return True if asciidoctor tables describing enumerants in a group should be generated as part of group generation.""" return False
[ "def", "generate_enum_table", "(", "self", ")", ":", "return", "False" ]
https://github.com/shader-slang/slang/blob/b8982fcf43b86c1e39dcc3dd19bff2821633eda6/external/vulkan/registry/conventions.py#L321-L324
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Gems/CloudGemMetric/v1/AWS/common-code/Lib/numpy/core/arrayprint.py
python
array_str
(a, max_line_width=None, precision=None, suppress_small=None)
return _array_str_implementation( a, max_line_width, precision, suppress_small)
Return a string representation of the data in an array. The data in the array is returned as a single string. This function is similar to `array_repr`, the difference being that `array_repr` also returns information on the kind of array and its data type. Parameters ---------- a : ndarray ...
Return a string representation of the data in an array.
[ "Return", "a", "string", "representation", "of", "the", "data", "in", "an", "array", "." ]
def array_str(a, max_line_width=None, precision=None, suppress_small=None): """ Return a string representation of the data in an array. The data in the array is returned as a single string. This function is similar to `array_repr`, the difference being that `array_repr` also returns information on...
[ "def", "array_str", "(", "a", ",", "max_line_width", "=", "None", ",", "precision", "=", "None", ",", "suppress_small", "=", "None", ")", ":", "return", "_array_str_implementation", "(", "a", ",", "max_line_width", ",", "precision", ",", "suppress_small", ")" ...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Gems/CloudGemMetric/v1/AWS/common-code/Lib/numpy/core/arrayprint.py#L1515-L1551
tensorflow/tensorflow
419e3a6b650ea4bd1b0cba23c4348f8a69f3272e
tensorflow/python/autograph/pyct/cfg.py
python
GraphBuilder.enter_except_section
(self, section_id)
Enters an except section.
Enters an except section.
[ "Enters", "an", "except", "section", "." ]
def enter_except_section(self, section_id): """Enters an except section.""" if section_id in self.raises: self.leaves.update(self.raises[section_id])
[ "def", "enter_except_section", "(", "self", ",", "section_id", ")", ":", "if", "section_id", "in", "self", ".", "raises", ":", "self", ".", "leaves", ".", "update", "(", "self", ".", "raises", "[", "section_id", "]", ")" ]
https://github.com/tensorflow/tensorflow/blob/419e3a6b650ea4bd1b0cba23c4348f8a69f3272e/tensorflow/python/autograph/pyct/cfg.py#L570-L573
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/prompt-toolkit/py3/prompt_toolkit/search.py
python
do_incremental_search
(direction: SearchDirection, count: int = 1)
Apply search, but keep search buffer focused.
Apply search, but keep search buffer focused.
[ "Apply", "search", "but", "keep", "search", "buffer", "focused", "." ]
def do_incremental_search(direction: SearchDirection, count: int = 1) -> None: """ Apply search, but keep search buffer focused. """ assert is_searching() layout = get_app().layout # Only search if the current control is a `BufferControl`. from prompt_toolkit.layout.controls import BufferC...
[ "def", "do_incremental_search", "(", "direction", ":", "SearchDirection", ",", "count", ":", "int", "=", "1", ")", "->", "None", ":", "assert", "is_searching", "(", ")", "layout", "=", "get_app", "(", ")", ".", "layout", "# Only search if the current control is ...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/prompt-toolkit/py3/prompt_toolkit/search.py#L153-L183
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/pandas/core/groupby/groupby.py
python
GroupBy.cummin
(self, axis=0, **kwargs)
return self._cython_transform("cummin", numeric_only=False)
Cumulative min for each group. Returns ------- Series or DataFrame
Cumulative min for each group.
[ "Cumulative", "min", "for", "each", "group", "." ]
def cummin(self, axis=0, **kwargs): """ Cumulative min for each group. Returns ------- Series or DataFrame """ if axis != 0: return self.apply(lambda x: np.minimum.accumulate(x, axis)) return self._cython_transform("cummin", numeric_only=Fals...
[ "def", "cummin", "(", "self", ",", "axis", "=", "0", ",", "*", "*", "kwargs", ")", ":", "if", "axis", "!=", "0", ":", "return", "self", ".", "apply", "(", "lambda", "x", ":", "np", ".", "minimum", ".", "accumulate", "(", "x", ",", "axis", ")", ...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/pandas/core/groupby/groupby.py#L2165-L2176
ChromiumWebApps/chromium
c7361d39be8abd1574e6ce8957c8dbddd4c6ccf7
gpu/command_buffer/build_gles2_cmd_buffer.py
python
EnumBaseArgument.GetValidGLArg
(self, func, offset, index)
return self.GetValidArg(func, offset, index)
Gets a valid value for this argument.
Gets a valid value for this argument.
[ "Gets", "a", "valid", "value", "for", "this", "argument", "." ]
def GetValidGLArg(self, func, offset, index): """Gets a valid value for this argument.""" return self.GetValidArg(func, offset, index)
[ "def", "GetValidGLArg", "(", "self", ",", "func", ",", "offset", ",", "index", ")", ":", "return", "self", ".", "GetValidArg", "(", "func", ",", "offset", ",", "index", ")" ]
https://github.com/ChromiumWebApps/chromium/blob/c7361d39be8abd1574e6ce8957c8dbddd4c6ccf7/gpu/command_buffer/build_gles2_cmd_buffer.py#L6007-L6009
miyosuda/TensorFlowAndroidDemo
35903e0221aa5f109ea2dbef27f20b52e317f42d
jni-build/jni/include/tensorflow/python/training/optimizer.py
python
Optimizer.__init__
(self, use_locking, name)
Create a new Optimizer. This must be called by the constructors of subclasses. Args: use_locking: Bool. If True apply use locks to prevent concurrent updates to variables. name: A non-empty string. The name to use for accumulators created for the optimizer. Raises: Valu...
Create a new Optimizer.
[ "Create", "a", "new", "Optimizer", "." ]
def __init__(self, use_locking, name): """Create a new Optimizer. This must be called by the constructors of subclasses. Args: use_locking: Bool. If True apply use locks to prevent concurrent updates to variables. name: A non-empty string. The name to use for accumulators created ...
[ "def", "__init__", "(", "self", ",", "use_locking", ",", "name", ")", ":", "if", "not", "name", ":", "raise", "ValueError", "(", "\"Must specify the optimizer name\"", ")", "self", ".", "_use_locking", "=", "use_locking", "self", ".", "_name", "=", "name", "...
https://github.com/miyosuda/TensorFlowAndroidDemo/blob/35903e0221aa5f109ea2dbef27f20b52e317f42d/jni-build/jni/include/tensorflow/python/training/optimizer.py#L133-L153
mindspore-ai/mindspore
fb8fd3338605bb34fa5cea054e535a8b1d753fab
mindspore/python/mindspore/ops/operations/other_ops.py
python
PullWeight.__init__
(self)
Initialize PullWeight
Initialize PullWeight
[ "Initialize", "PullWeight" ]
def __init__(self): """Initialize PullWeight""" self.add_prim_attr("primitive_target", "CPU") self.init_prim_io_names(inputs=['weight', "name", "index"], outputs=['output'])
[ "def", "__init__", "(", "self", ")", ":", "self", ".", "add_prim_attr", "(", "\"primitive_target\"", ",", "\"CPU\"", ")", "self", ".", "init_prim_io_names", "(", "inputs", "=", "[", "'weight'", ",", "\"name\"", ",", "\"index\"", "]", ",", "outputs", "=", "...
https://github.com/mindspore-ai/mindspore/blob/fb8fd3338605bb34fa5cea054e535a8b1d753fab/mindspore/python/mindspore/ops/operations/other_ops.py#L731-L734
wlanjie/AndroidFFmpeg
7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf
tools/fdk-aac-build/armeabi/toolchain/lib/python2.7/timeit.py
python
Timer.__init__
(self, stmt="pass", setup="pass", timer=default_timer)
Constructor. See class doc string.
Constructor. See class doc string.
[ "Constructor", ".", "See", "class", "doc", "string", "." ]
def __init__(self, stmt="pass", setup="pass", timer=default_timer): """Constructor. See class doc string.""" self.timer = timer ns = {} if isinstance(stmt, basestring): stmt = reindent(stmt, 8) if isinstance(setup, basestring): setup = reindent(se...
[ "def", "__init__", "(", "self", ",", "stmt", "=", "\"pass\"", ",", "setup", "=", "\"pass\"", ",", "timer", "=", "default_timer", ")", ":", "self", ".", "timer", "=", "timer", "ns", "=", "{", "}", "if", "isinstance", "(", "stmt", ",", "basestring", ")...
https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/armeabi/toolchain/lib/python2.7/timeit.py#L121-L149
FreeCAD/FreeCAD
ba42231b9c6889b89e064d6d563448ed81e376ec
src/Mod/Path/PathScripts/PathGeom.py
python
cmdsForEdge
(edge, flip=False, useHelixForBSpline=True, segm=50, hSpeed=0, vSpeed=0)
return commands
cmdsForEdge(edge, flip=False, useHelixForBSpline=True, segm=50) -> List(Path.Command) Returns a list of Path.Command representing the given edge. If flip is True the edge is considered to be backwards. If useHelixForBSpline is True an Edge based on a BSplineCurve is considered to represent a helix and r...
cmdsForEdge(edge, flip=False, useHelixForBSpline=True, segm=50) -> List(Path.Command) Returns a list of Path.Command representing the given edge. If flip is True the edge is considered to be backwards. If useHelixForBSpline is True an Edge based on a BSplineCurve is considered to represent a helix and r...
[ "cmdsForEdge", "(", "edge", "flip", "=", "False", "useHelixForBSpline", "=", "True", "segm", "=", "50", ")", "-", ">", "List", "(", "Path", ".", "Command", ")", "Returns", "a", "list", "of", "Path", ".", "Command", "representing", "the", "given", "edge",...
def cmdsForEdge(edge, flip=False, useHelixForBSpline=True, segm=50, hSpeed=0, vSpeed=0): """cmdsForEdge(edge, flip=False, useHelixForBSpline=True, segm=50) -> List(Path.Command) Returns a list of Path.Command representing the given edge. If flip is True the edge is considered to be backwards. If useHeli...
[ "def", "cmdsForEdge", "(", "edge", ",", "flip", "=", "False", ",", "useHelixForBSpline", "=", "True", ",", "segm", "=", "50", ",", "hSpeed", "=", "0", ",", "vSpeed", "=", "0", ")", ":", "pt", "=", "(", "edge", ".", "valueAt", "(", "edge", ".", "L...
https://github.com/FreeCAD/FreeCAD/blob/ba42231b9c6889b89e064d6d563448ed81e376ec/src/Mod/Path/PathScripts/PathGeom.py#L273-L385
microsoft/CNTK
e9396480025b9ca457d26b6f33dd07c474c6aa04
bindings/python/cntk/contrib/deeprl/agent/shared/replay_memory.py
python
ReplayMemory._next_position_then_increment
(self)
return position
Similar to position++.
Similar to position++.
[ "Similar", "to", "position", "++", "." ]
def _next_position_then_increment(self): """Similar to position++.""" start = self._capacity - 1 \ if self._use_prioritized_replay \ else 0 position = start + self._position self._position = (self._position + 1) % self._capacity return position
[ "def", "_next_position_then_increment", "(", "self", ")", ":", "start", "=", "self", ".", "_capacity", "-", "1", "if", "self", ".", "_use_prioritized_replay", "else", "0", "position", "=", "start", "+", "self", ".", "_position", "self", ".", "_position", "="...
https://github.com/microsoft/CNTK/blob/e9396480025b9ca457d26b6f33dd07c474c6aa04/bindings/python/cntk/contrib/deeprl/agent/shared/replay_memory.py#L99-L106
hanpfei/chromium-net
392cc1fa3a8f92f42e4071ab6e674d8e0482f83f
tools/python/google/platform_utils_mac.py
python
PlatformUtility.GetTempDirectory
(self)
return os.getenv("TMPDIR", "/tmp")
Returns the file system temp directory Note that this does not use a random subdirectory, so it's not intrinsically secure. If you need a secure subdir, use the tempfile package.
Returns the file system temp directory
[ "Returns", "the", "file", "system", "temp", "directory" ]
def GetTempDirectory(self): """Returns the file system temp directory Note that this does not use a random subdirectory, so it's not intrinsically secure. If you need a secure subdir, use the tempfile package. """ return os.getenv("TMPDIR", "/tmp")
[ "def", "GetTempDirectory", "(", "self", ")", ":", "return", "os", ".", "getenv", "(", "\"TMPDIR\"", ",", "\"/tmp\"", ")" ]
https://github.com/hanpfei/chromium-net/blob/392cc1fa3a8f92f42e4071ab6e674d8e0482f83f/tools/python/google/platform_utils_mac.py#L30-L37
ApolloAuto/apollo
463fb82f9e979d02dcb25044e60931293ab2dba0
modules/tools/record_parse_save/parse_camera.py
python
parse_data
(channelname, msg, out_folder)
return tstamp
parser images from Apollo record file
parser images from Apollo record file
[ "parser", "images", "from", "Apollo", "record", "file" ]
def parse_data(channelname, msg, out_folder): """ parser images from Apollo record file """ msg_camera = CompressedImage() msg_camera.ParseFromString(str(msg)) tstamp = msg_camera.measurement_time temp_time = str(tstamp).split('.') if len(temp_time[1]) == 1: temp_time1_adj = te...
[ "def", "parse_data", "(", "channelname", ",", "msg", ",", "out_folder", ")", ":", "msg_camera", "=", "CompressedImage", "(", ")", "msg_camera", ".", "ParseFromString", "(", "str", "(", "msg", ")", ")", "tstamp", "=", "msg_camera", ".", "measurement_time", "t...
https://github.com/ApolloAuto/apollo/blob/463fb82f9e979d02dcb25044e60931293ab2dba0/modules/tools/record_parse_save/parse_camera.py#L34-L55
gimli-org/gimli
17aa2160de9b15ababd9ef99e89b1bc3277bbb23
pygimli/utils/utils.py
python
ProgressBar._setbar
(self, elapsed_it)
Reset pBar based on current iteration number.
Reset pBar based on current iteration number.
[ "Reset", "pBar", "based", "on", "current", "iteration", "number", "." ]
def _setbar(self, elapsed_it): """Reset pBar based on current iteration number.""" self._amount((elapsed_it / float(self.its)) * 100.0) self.pBar += " %d of %s complete" % (elapsed_it, self.its)
[ "def", "_setbar", "(", "self", ",", "elapsed_it", ")", ":", "self", ".", "_amount", "(", "(", "elapsed_it", "/", "float", "(", "self", ".", "its", ")", ")", "*", "100.0", ")", "self", ".", "pBar", "+=", "\" %d of %s complete\"", "%", "(", "elapsed_it",...
https://github.com/gimli-org/gimli/blob/17aa2160de9b15ababd9ef99e89b1bc3277bbb23/pygimli/utils/utils.py#L62-L65
wlanjie/AndroidFFmpeg
7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf
tools/fdk-aac-build/armeabi-v7a/toolchain/lib/python2.7/distutils/ccompiler.py
python
CCompiler._fix_object_args
(self, objects, output_dir)
return (objects, output_dir)
Typecheck and fix up some arguments supplied to various methods. Specifically: ensure that 'objects' is a list; if output_dir is None, replace with self.output_dir. Return fixed versions of 'objects' and 'output_dir'.
Typecheck and fix up some arguments supplied to various methods. Specifically: ensure that 'objects' is a list; if output_dir is None, replace with self.output_dir. Return fixed versions of 'objects' and 'output_dir'.
[ "Typecheck", "and", "fix", "up", "some", "arguments", "supplied", "to", "various", "methods", ".", "Specifically", ":", "ensure", "that", "objects", "is", "a", "list", ";", "if", "output_dir", "is", "None", "replace", "with", "self", ".", "output_dir", ".", ...
def _fix_object_args(self, objects, output_dir): """Typecheck and fix up some arguments supplied to various methods. Specifically: ensure that 'objects' is a list; if output_dir is None, replace with self.output_dir. Return fixed versions of 'objects' and 'output_dir'. """ ...
[ "def", "_fix_object_args", "(", "self", ",", "objects", ",", "output_dir", ")", ":", "if", "not", "isinstance", "(", "objects", ",", "(", "list", ",", "tuple", ")", ")", ":", "raise", "TypeError", ",", "\"'objects' must be a list or tuple of strings\"", "objects...
https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/armeabi-v7a/toolchain/lib/python2.7/distutils/ccompiler.py#L408-L424
MythTV/mythtv
d282a209cb8be85d036f85a62a8ec971b67d45f4
mythplugins/mytharchive/mythburn/scripts/mythburn.py
python
doProcessFileProjectX
(file, folder, count)
Process a single video/recording file ready for burning.
Process a single video/recording file ready for burning.
[ "Process", "a", "single", "video", "/", "recording", "file", "ready", "for", "burning", "." ]
def doProcessFileProjectX(file, folder, count): """Process a single video/recording file ready for burning.""" write( "*************************************************************") write( "Processing %s %d: '%s'" % (file.attributes["type"].value, count, file.attributes["filename"].value)) write( "***...
[ "def", "doProcessFileProjectX", "(", "file", ",", "folder", ",", "count", ")", ":", "write", "(", "\"*************************************************************\"", ")", "write", "(", "\"Processing %s %d: '%s'\"", "%", "(", "file", ".", "attributes", "[", "\"type\"", ...
https://github.com/MythTV/mythtv/blob/d282a209cb8be85d036f85a62a8ec971b67d45f4/mythplugins/mytharchive/mythburn/scripts/mythburn.py#L4720-L4882
VelsonWang/HmiFuncDesigner
439265da17bd3424e678932cbfbc0237b52630f3
HmiFuncDesigner/libs/qscintilla/Python/configure.py
python
_HostPythonConfiguration.__init__
(self)
Initialise the configuration.
Initialise the configuration.
[ "Initialise", "the", "configuration", "." ]
def __init__(self): """ Initialise the configuration. """ self.platform = sys.platform self.version = sys.hexversion >> 8 self.inc_dir = sysconfig.get_python_inc() self.venv_inc_dir = sysconfig.get_python_inc(prefix=sys.prefix) self.module_dir = sysconfig.get_python_lib...
[ "def", "__init__", "(", "self", ")", ":", "self", ".", "platform", "=", "sys", ".", "platform", "self", ".", "version", "=", "sys", ".", "hexversion", ">>", "8", "self", ".", "inc_dir", "=", "sysconfig", ".", "get_python_inc", "(", ")", "self", ".", ...
https://github.com/VelsonWang/HmiFuncDesigner/blob/439265da17bd3424e678932cbfbc0237b52630f3/HmiFuncDesigner/libs/qscintilla/Python/configure.py#L637-L653
rdkit/rdkit
ede860ae316d12d8568daf5ee800921c3389c84e
rdkit/sping/PDF/pdfutils.py
python
preProcessImages
(spec)
r"""accepts either a filespec ('C:\mydir\*.jpg') or a list of image filenames, crunches them all to save time. Run this to save huge amounts of time when repeatedly building image documents.
r"""accepts either a filespec ('C:\mydir\*.jpg') or a list of image filenames, crunches them all to save time. Run this to save huge amounts of time when repeatedly building image documents.
[ "r", "accepts", "either", "a", "filespec", "(", "C", ":", "\\", "mydir", "\\", "*", ".", "jpg", ")", "or", "a", "list", "of", "image", "filenames", "crunches", "them", "all", "to", "save", "time", ".", "Run", "this", "to", "save", "huge", "amounts", ...
def preProcessImages(spec): r"""accepts either a filespec ('C:\mydir\*.jpg') or a list of image filenames, crunches them all to save time. Run this to save huge amounts of time when repeatedly building image documents.""" if isinstance(spec, str): filelist = glob.glob(spec) else: ...
[ "def", "preProcessImages", "(", "spec", ")", ":", "if", "isinstance", "(", "spec", ",", "str", ")", ":", "filelist", "=", "glob", ".", "glob", "(", "spec", ")", "else", ":", "# list or tuple OK", "filelist", "=", "spec", "for", "filename", "in", "filelis...
https://github.com/rdkit/rdkit/blob/ede860ae316d12d8568daf5ee800921c3389c84e/rdkit/sping/PDF/pdfutils.py#L53-L67
windystrife/UnrealEngine_NVIDIAGameWorks
b50e6338a7c5b26374d66306ebc7807541ff815e
Engine/Extras/ThirdPartyNotUE/emsdk/Win64/python/2.7.5.3_64bit/Lib/site-packages/setuptools/command/easy_install.py
python
easy_install.check_conflicts
(self, dist)
return dist
Verify that there are no conflicting "old-style" packages
Verify that there are no conflicting "old-style" packages
[ "Verify", "that", "there", "are", "no", "conflicting", "old", "-", "style", "packages" ]
def check_conflicts(self, dist): """Verify that there are no conflicting "old-style" packages""" return dist # XXX temporarily disable until new strategy is stable from imp import find_module, get_suffixes from glob import glob blockers = [] names = dict.fromkeys(di...
[ "def", "check_conflicts", "(", "self", ",", "dist", ")", ":", "return", "dist", "# XXX temporarily disable until new strategy is stable", "from", "imp", "import", "find_module", ",", "get_suffixes", "from", "glob", "import", "glob", "blockers", "=", "[", "]", "names...
https://github.com/windystrife/UnrealEngine_NVIDIAGameWorks/blob/b50e6338a7c5b26374d66306ebc7807541ff815e/Engine/Extras/ThirdPartyNotUE/emsdk/Win64/python/2.7.5.3_64bit/Lib/site-packages/setuptools/command/easy_install.py#L957-L990
ComputationalRadiationPhysics/picongpu
59e9b53605f9a5c1bf271eeb055bc74370a99052
lib/python/picongpu/plugins/plot_mpl/base_visualizer.py
python
Visualizer.__init__
(self, reader_cls, run_directories=None, ax=None)
Initialize the reader and data as member parameters. Parameters ---------- run_directories : list of tuples of length 2 or single tuple of length 2 or list of strings or string. If tuples are specified, they have to be of the following form (sim_l...
Initialize the reader and data as member parameters.
[ "Initialize", "the", "reader", "and", "data", "as", "member", "parameters", "." ]
def __init__(self, reader_cls, run_directories=None, ax=None): """ Initialize the reader and data as member parameters. Parameters ---------- run_directories : list of tuples of length 2 or single tuple of length 2 or list of strings or string. ...
[ "def", "__init__", "(", "self", ",", "reader_cls", ",", "run_directories", "=", "None", ",", "ax", "=", "None", ")", ":", "self", ".", "reader_cls", "=", "reader_cls", "if", "ax", "is", "None", ":", "warn", "(", "\"No axes was given, using plt.gca() instead!\"...
https://github.com/ComputationalRadiationPhysics/picongpu/blob/59e9b53605f9a5c1bf271eeb055bc74370a99052/lib/python/picongpu/plugins/plot_mpl/base_visualizer.py#L29-L68
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/Jinja2/py2/jinja2/sandbox.py
python
SandboxedEnvironment.intercept_unop
(self, operator)
return False
Called during template compilation with the name of a unary operator to check if it should be intercepted at runtime. If this method returns `True`, :meth:`call_unop` is executed for this unary operator. The default implementation of :meth:`call_unop` will use the :attr:`unop_table` di...
Called during template compilation with the name of a unary operator to check if it should be intercepted at runtime. If this method returns `True`, :meth:`call_unop` is executed for this unary operator. The default implementation of :meth:`call_unop` will use the :attr:`unop_table` di...
[ "Called", "during", "template", "compilation", "with", "the", "name", "of", "a", "unary", "operator", "to", "check", "if", "it", "should", "be", "intercepted", "at", "runtime", ".", "If", "this", "method", "returns", "True", ":", "meth", ":", "call_unop", ...
def intercept_unop(self, operator): """Called during template compilation with the name of a unary operator to check if it should be intercepted at runtime. If this method returns `True`, :meth:`call_unop` is executed for this unary operator. The default implementation of :meth:`call_u...
[ "def", "intercept_unop", "(", "self", ",", "operator", ")", ":", "return", "False" ]
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/Jinja2/py2/jinja2/sandbox.py#L321-L336
openvinotoolkit/openvino
dedcbeafa8b84cccdc55ca64b8da516682b381c7
thirdparty/fluid/modules/gapi/misc/python/samples/gaze_estimation.py
python
intersection
(surface, rect)
return (l_x, l_y, width, height)
Remove zone of out of bound from ROI Params: surface: image bounds is rect representation (top left coordinates and width and height) rect: region of interest is also has rect representation Return: Modified ROI with correct bounds
Remove zone of out of bound from ROI
[ "Remove", "zone", "of", "out", "of", "bound", "from", "ROI" ]
def intersection(surface, rect): """ Remove zone of out of bound from ROI Params: surface: image bounds is rect representation (top left coordinates and width and height) rect: region of interest is also has rect representation Return: Modified ROI with correct bounds """ l_x = max(sur...
[ "def", "intersection", "(", "surface", ",", "rect", ")", ":", "l_x", "=", "max", "(", "surface", "[", "0", "]", ",", "rect", "[", "0", "]", ")", "l_y", "=", "max", "(", "surface", "[", "1", "]", ",", "rect", "[", "1", "]", ")", "width", "=", ...
https://github.com/openvinotoolkit/openvino/blob/dedcbeafa8b84cccdc55ca64b8da516682b381c7/thirdparty/fluid/modules/gapi/misc/python/samples/gaze_estimation.py#L70-L86
p4lang/p4c
3272e79369f20813cc1a555a5eb26f44432f84a4
tools/cpplint.py
python
CheckHeaderFileIncluded
(filename, include_state, error)
Logs an error if a source file does not include its header.
Logs an error if a source file does not include its header.
[ "Logs", "an", "error", "if", "a", "source", "file", "does", "not", "include", "its", "header", "." ]
def CheckHeaderFileIncluded(filename, include_state, error): """Logs an error if a source file does not include its header.""" # Do not check test files fileinfo = FileInfo(filename) if Search(_TEST_FILE_SUFFIX, fileinfo.BaseName()): return for ext in GetHeaderExtensions(): basefilename = filename[0...
[ "def", "CheckHeaderFileIncluded", "(", "filename", ",", "include_state", ",", "error", ")", ":", "# Do not check test files", "fileinfo", "=", "FileInfo", "(", "filename", ")", "if", "Search", "(", "_TEST_FILE_SUFFIX", ",", "fileinfo", ".", "BaseName", "(", ")", ...
https://github.com/p4lang/p4c/blob/3272e79369f20813cc1a555a5eb26f44432f84a4/tools/cpplint.py#L2474-L2504
Smorodov/Multitarget-tracker
bee300e8bfd660c86cbeb6892c65a5b7195c9381
thirdparty/pybind11/tools/clang/cindex.py
python
Token.location
(self)
return conf.lib.clang_getTokenLocation(self._tu, self)
The SourceLocation this Token occurs at.
The SourceLocation this Token occurs at.
[ "The", "SourceLocation", "this", "Token", "occurs", "at", "." ]
def location(self): """The SourceLocation this Token occurs at.""" return conf.lib.clang_getTokenLocation(self._tu, self)
[ "def", "location", "(", "self", ")", ":", "return", "conf", ".", "lib", ".", "clang_getTokenLocation", "(", "self", ".", "_tu", ",", "self", ")" ]
https://github.com/Smorodov/Multitarget-tracker/blob/bee300e8bfd660c86cbeb6892c65a5b7195c9381/thirdparty/pybind11/tools/clang/cindex.py#L3005-L3007
FreeCAD/FreeCAD
ba42231b9c6889b89e064d6d563448ed81e376ec
src/Mod/Part/AttachmentEditor/TaskAttachmentEditor.py
python
StrListFromRefs
(references)
return [StrFromLink(feature,subelement) for (feature, subelement) in references_oldstyle]
input: PropertyLinkSubList. Output: list of strings for UI.
input: PropertyLinkSubList. Output: list of strings for UI.
[ "input", ":", "PropertyLinkSubList", ".", "Output", ":", "list", "of", "strings", "for", "UI", "." ]
def StrListFromRefs(references): '''input: PropertyLinkSubList. Output: list of strings for UI.''' references_oldstyle = linkSubList_convertToOldStyle(references) return [StrFromLink(feature,subelement) for (feature, subelement) in references_oldstyle]
[ "def", "StrListFromRefs", "(", "references", ")", ":", "references_oldstyle", "=", "linkSubList_convertToOldStyle", "(", "references", ")", "return", "[", "StrFromLink", "(", "feature", ",", "subelement", ")", "for", "(", "feature", ",", "subelement", ")", "in", ...
https://github.com/FreeCAD/FreeCAD/blob/ba42231b9c6889b89e064d6d563448ed81e376ec/src/Mod/Part/AttachmentEditor/TaskAttachmentEditor.py#L101-L104
swift/swift
12d031cf8177fdec0137f9aa7e2912fa23c4416b
3rdParty/SCons/scons-3.0.1/engine/SCons/Tool/mwcc.py
python
find_versions
()
return versions
Return a list of MWVersion objects representing installed versions
Return a list of MWVersion objects representing installed versions
[ "Return", "a", "list", "of", "MWVersion", "objects", "representing", "installed", "versions" ]
def find_versions(): """Return a list of MWVersion objects representing installed versions""" versions = [] ### This function finds CodeWarrior by reading from the registry on ### Windows. Some other method needs to be implemented for other ### platforms, maybe something that calls env.WhereIs('mwc...
[ "def", "find_versions", "(", ")", ":", "versions", "=", "[", "]", "### This function finds CodeWarrior by reading from the registry on", "### Windows. Some other method needs to be implemented for other", "### platforms, maybe something that calls env.WhereIs('mwcc')", "if", "SCons", "."...
https://github.com/swift/swift/blob/12d031cf8177fdec0137f9aa7e2912fa23c4416b/3rdParty/SCons/scons-3.0.1/engine/SCons/Tool/mwcc.py#L87-L119
mongodb/mongo
d8ff665343ad29cf286ee2cf4a1960d29371937b
buildscripts/idl/idl/errors.py
python
ParserContext.add_bindata_no_default
(self, location, ast_type, ast_parent)
Add an error about a bindata type with a default value.
Add an error about a bindata type with a default value.
[ "Add", "an", "error", "about", "a", "bindata", "type", "with", "a", "default", "value", "." ]
def add_bindata_no_default(self, location, ast_type, ast_parent): # type: (common.SourceLocation, str, str) -> None # pylint: disable=invalid-name """Add an error about a bindata type with a default value.""" self._add_error(location, ERROR_ID_BAD_BINDATA_DEFAULT, ...
[ "def", "add_bindata_no_default", "(", "self", ",", "location", ",", "ast_type", ",", "ast_parent", ")", ":", "# type: (common.SourceLocation, str, str) -> None", "# pylint: disable=invalid-name", "self", ".", "_add_error", "(", "location", ",", "ERROR_ID_BAD_BINDATA_DEFAULT",...
https://github.com/mongodb/mongo/blob/d8ff665343ad29cf286ee2cf4a1960d29371937b/buildscripts/idl/idl/errors.py#L525-L530
MVIG-SJTU/RMPE
5188c230ec800c12be7369c3619615bc9b020aa4
scripts/cpp_lint.py
python
ReverseCloseExpression
(clean_lines, linenum, pos)
return (line, 0, -1)
If input points to ) or } or ] or >, finds the position that opens it. If lines[linenum][pos] points to a ')' or '}' or ']' or '>', finds the linenum/pos that correspond to the opening of the expression. Args: clean_lines: A CleansedLines instance containing the file. linenum: The number of the line to ...
If input points to ) or } or ] or >, finds the position that opens it.
[ "If", "input", "points", "to", ")", "or", "}", "or", "]", "or", ">", "finds", "the", "position", "that", "opens", "it", "." ]
def ReverseCloseExpression(clean_lines, linenum, pos): """If input points to ) or } or ] or >, finds the position that opens it. If lines[linenum][pos] points to a ')' or '}' or ']' or '>', finds the linenum/pos that correspond to the opening of the expression. Args: clean_lines: A CleansedLines instance ...
[ "def", "ReverseCloseExpression", "(", "clean_lines", ",", "linenum", ",", "pos", ")", ":", "line", "=", "clean_lines", ".", "elided", "[", "linenum", "]", "endchar", "=", "line", "[", "pos", "]", "if", "endchar", "not", "in", "')}]>'", ":", "return", "("...
https://github.com/MVIG-SJTU/RMPE/blob/5188c230ec800c12be7369c3619615bc9b020aa4/scripts/cpp_lint.py#L1327-L1369
miyosuda/TensorFlowAndroidMNIST
7b5a4603d2780a8a2834575706e9001977524007
jni-build/jni/include/tensorflow/contrib/layers/python/layers/feature_column.py
python
crossed_column
(columns, hash_bucket_size, combiner="sum", ckpt_to_load_from=None, tensor_name_in_ckpt=None)
return _CrossedColumn(columns, hash_bucket_size, combiner=combiner, ckpt_to_load_from=ckpt_to_load_from, tensor_name_in_ckpt=tensor_name_in_ckpt)
Creates a _CrossedColumn. Args: columns: An iterable of _FeatureColumn. Items can be an instance of _SparseColumn, _CrossedColumn, or _BucketizedColumn. hash_bucket_size: An int that is > 1. The number of buckets. combiner: A combiner string, supports sum, mean, sqrtn. ckpt_to_load_from: (Optio...
Creates a _CrossedColumn.
[ "Creates", "a", "_CrossedColumn", "." ]
def crossed_column(columns, hash_bucket_size, combiner="sum", ckpt_to_load_from=None, tensor_name_in_ckpt=None): """Creates a _CrossedColumn. Args: columns: An iterable of _FeatureColumn. Items can be an instance of _SparseColumn, _CrossedColumn, or _BucketizedColumn...
[ "def", "crossed_column", "(", "columns", ",", "hash_bucket_size", ",", "combiner", "=", "\"sum\"", ",", "ckpt_to_load_from", "=", "None", ",", "tensor_name_in_ckpt", "=", "None", ")", ":", "return", "_CrossedColumn", "(", "columns", ",", "hash_bucket_size", ",", ...
https://github.com/miyosuda/TensorFlowAndroidMNIST/blob/7b5a4603d2780a8a2834575706e9001977524007/jni-build/jni/include/tensorflow/contrib/layers/python/layers/feature_column.py#L1326-L1355
wlanjie/AndroidFFmpeg
7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf
tools/fdk-aac-build/armeabi/toolchain/lib/python2.7/imaplib.py
python
IMAP4.open
(self, host = '', port = IMAP4_PORT)
Setup connection to remote server on "host:port" (default: localhost:standard IMAP4 port). This connection will be used by the routines: read, readline, send, shutdown.
Setup connection to remote server on "host:port" (default: localhost:standard IMAP4 port). This connection will be used by the routines: read, readline, send, shutdown.
[ "Setup", "connection", "to", "remote", "server", "on", "host", ":", "port", "(", "default", ":", "localhost", ":", "standard", "IMAP4", "port", ")", ".", "This", "connection", "will", "be", "used", "by", "the", "routines", ":", "read", "readline", "send", ...
def open(self, host = '', port = IMAP4_PORT): """Setup connection to remote server on "host:port" (default: localhost:standard IMAP4 port). This connection will be used by the routines: read, readline, send, shutdown. """ self.host = host self.port = port ...
[ "def", "open", "(", "self", ",", "host", "=", "''", ",", "port", "=", "IMAP4_PORT", ")", ":", "self", ".", "host", "=", "host", "self", ".", "port", "=", "port", "self", ".", "sock", "=", "socket", ".", "create_connection", "(", "(", "host", ",", ...
https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/armeabi/toolchain/lib/python2.7/imaplib.py#L221-L230
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/pandas/py3/pandas/core/frame.py
python
DataFrame.drop_duplicates
( self, subset: Hashable | Sequence[Hashable] | None = None, keep: Literal["first"] | Literal["last"] | Literal[False] = "first", inplace: bool = False, ignore_index: bool = False, )
Return DataFrame with duplicate rows removed. Considering certain columns is optional. Indexes, including time indexes are ignored. Parameters ---------- subset : column label or sequence of labels, optional Only consider certain columns for identifying duplicates, ...
Return DataFrame with duplicate rows removed.
[ "Return", "DataFrame", "with", "duplicate", "rows", "removed", "." ]
def drop_duplicates( self, subset: Hashable | Sequence[Hashable] | None = None, keep: Literal["first"] | Literal["last"] | Literal[False] = "first", inplace: bool = False, ignore_index: bool = False, ) -> DataFrame | None: """ Return DataFrame with duplicate r...
[ "def", "drop_duplicates", "(", "self", ",", "subset", ":", "Hashable", "|", "Sequence", "[", "Hashable", "]", "|", "None", "=", "None", ",", "keep", ":", "Literal", "[", "\"first\"", "]", "|", "Literal", "[", "\"last\"", "]", "|", "Literal", "[", "Fals...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/pandas/py3/pandas/core/frame.py#L5978-L6073
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
wx/lib/agw/aui/framemanager.py
python
CheckEdgeDrop
(window, docks, pt)
return -1
Checks on which edge of a window the drop action has taken place. :param `window`: a :class:`Window` derived window; :param `docks`: a list of :class:`AuiDockInfo` structures; :param `pt`: a :class:`Point` object.
Checks on which edge of a window the drop action has taken place.
[ "Checks", "on", "which", "edge", "of", "a", "window", "the", "drop", "action", "has", "taken", "place", "." ]
def CheckEdgeDrop(window, docks, pt): """ Checks on which edge of a window the drop action has taken place. :param `window`: a :class:`Window` derived window; :param `docks`: a list of :class:`AuiDockInfo` structures; :param `pt`: a :class:`Point` object. """ screenPt = window.ClientToScre...
[ "def", "CheckEdgeDrop", "(", "window", ",", "docks", ",", "pt", ")", ":", "screenPt", "=", "window", ".", "ClientToScreen", "(", "pt", ")", "clientSize", "=", "window", ".", "GetClientSize", "(", ")", "frameRect", "=", "GetInternalFrameRect", "(", "window", ...
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/wx/lib/agw/aui/framemanager.py#L3786-L3815
mantidproject/mantid
03deeb89254ec4289edb8771e0188c2090a02f32
qt/python/mantidqtinterfaces/mantidqtinterfaces/Muon/GUI/Common/contexts/fitting_contexts/fitting_context.py
python
FittingContext.remove_fit_by_name
(fits_history: list, workspace_name: str)
Remove a Fit from the history when an ADS delete event happens on one of its output workspaces.
Remove a Fit from the history when an ADS delete event happens on one of its output workspaces.
[ "Remove", "a", "Fit", "from", "the", "history", "when", "an", "ADS", "delete", "event", "happens", "on", "one", "of", "its", "output", "workspaces", "." ]
def remove_fit_by_name(fits_history: list, workspace_name: str) -> None: """Remove a Fit from the history when an ADS delete event happens on one of its output workspaces.""" for fit in reversed(fits_history): if workspace_name in fit.output_workspace_names() or workspace_name == fit.paramet...
[ "def", "remove_fit_by_name", "(", "fits_history", ":", "list", ",", "workspace_name", ":", "str", ")", "->", "None", ":", "for", "fit", "in", "reversed", "(", "fits_history", ")", ":", "if", "workspace_name", "in", "fit", ".", "output_workspace_names", "(", ...
https://github.com/mantidproject/mantid/blob/03deeb89254ec4289edb8771e0188c2090a02f32/qt/python/mantidqtinterfaces/mantidqtinterfaces/Muon/GUI/Common/contexts/fitting_contexts/fitting_context.py#L372-L376
psi4/psi4
be533f7f426b6ccc263904e55122899b16663395
psi4/driver/p4util/text.py
python
Table.format_values
(self, values)
return " ".join(map(str, values))
Function to pad the width of Table object data cells.
Function to pad the width of Table object data cells.
[ "Function", "to", "pad", "the", "width", "of", "Table", "object", "data", "cells", "." ]
def format_values(self, values): """Function to pad the width of Table object data cells.""" str = lambda x: (('%%%d.%df' % (self.width, self.precision)) % x) return " ".join(map(str, values))
[ "def", "format_values", "(", "self", ",", "values", ")", ":", "str", "=", "lambda", "x", ":", "(", "(", "'%%%d.%df'", "%", "(", "self", ".", "width", ",", "self", ".", "precision", ")", ")", "%", "x", ")", "return", "\" \"", ".", "join", "(", "ma...
https://github.com/psi4/psi4/blob/be533f7f426b6ccc263904e55122899b16663395/psi4/driver/p4util/text.py#L68-L71
mindspore-ai/mindspore
fb8fd3338605bb34fa5cea054e535a8b1d753fab
mindspore/python/mindspore/dataset/engine/datasets.py
python
Dataset.output_types
(self)
return self.saved_output_types
Get the types of output data. Returns: list, list of data types. Examples: >>> # dataset is an instance object of Dataset >>> output_types = dataset.output_types()
Get the types of output data.
[ "Get", "the", "types", "of", "output", "data", "." ]
def output_types(self): """ Get the types of output data. Returns: list, list of data types. Examples: >>> # dataset is an instance object of Dataset >>> output_types = dataset.output_types() """ if self.saved_output_types is None: ...
[ "def", "output_types", "(", "self", ")", ":", "if", "self", ".", "saved_output_types", "is", "None", ":", "runtime_getter", "=", "self", ".", "_init_tree_getters", "(", ")", "self", ".", "saved_output_shapes", "=", "runtime_getter", "[", "0", "]", ".", "GetO...
https://github.com/mindspore-ai/mindspore/blob/fb8fd3338605bb34fa5cea054e535a8b1d753fab/mindspore/python/mindspore/dataset/engine/datasets.py#L1501-L1520
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/pandas/tseries/frequencies.py
python
get_offset
(name: str)
return _get_offset(name)
Return DateOffset object associated with rule name. .. deprecated:: 1.0.0 Examples -------- get_offset('EOM') --> BMonthEnd(1)
Return DateOffset object associated with rule name.
[ "Return", "DateOffset", "object", "associated", "with", "rule", "name", "." ]
def get_offset(name: str) -> DateOffset: """ Return DateOffset object associated with rule name. .. deprecated:: 1.0.0 Examples -------- get_offset('EOM') --> BMonthEnd(1) """ warnings.warn( "get_offset is deprecated and will be removed in a future version, " "use to_of...
[ "def", "get_offset", "(", "name", ":", "str", ")", "->", "DateOffset", ":", "warnings", ".", "warn", "(", "\"get_offset is deprecated and will be removed in a future version, \"", "\"use to_offset instead\"", ",", "FutureWarning", ",", "stacklevel", "=", "2", ",", ")", ...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/pandas/tseries/frequencies.py#L185-L201
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/osx_cocoa/_gdi.py
python
StockGDI.instance
(*args, **kwargs)
return _gdi_.StockGDI_instance(*args, **kwargs)
instance() -> StockGDI
instance() -> StockGDI
[ "instance", "()", "-", ">", "StockGDI" ]
def instance(*args, **kwargs): """instance() -> StockGDI""" return _gdi_.StockGDI_instance(*args, **kwargs)
[ "def", "instance", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_gdi_", ".", "StockGDI_instance", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_cocoa/_gdi.py#L6862-L6864
goldeneye-source/ges-code
2630cd8ef3d015af53c72ec2e19fc1f7e7fe8d9d
thirdparty/protobuf-2.3.0/python/mox.py
python
MockAnything.__getattr__
(self, method_name)
return self._CreateMockMethod(method_name)
Intercept method calls on this object. A new MockMethod is returned that is aware of the MockAnything's state (record or replay). The call will be recorded or replayed by the MockMethod's __call__. Args: # method name: the name of the method being called. method_name: str Returns:...
Intercept method calls on this object.
[ "Intercept", "method", "calls", "on", "this", "object", "." ]
def __getattr__(self, method_name): """Intercept method calls on this object. A new MockMethod is returned that is aware of the MockAnything's state (record or replay). The call will be recorded or replayed by the MockMethod's __call__. Args: # method name: the name of the method being c...
[ "def", "__getattr__", "(", "self", ",", "method_name", ")", ":", "return", "self", ".", "_CreateMockMethod", "(", "method_name", ")" ]
https://github.com/goldeneye-source/ges-code/blob/2630cd8ef3d015af53c72ec2e19fc1f7e7fe8d9d/thirdparty/protobuf-2.3.0/python/mox.py#L278-L293
miyosuda/TensorFlowAndroidDemo
35903e0221aa5f109ea2dbef27f20b52e317f42d
jni-build/jni/include/tensorflow/python/ops/array_grad.py
python
_TileGrad
(op, grad)
return [input_grad, None]
Sum reduces grad along the tiled dimensions.
Sum reduces grad along the tiled dimensions.
[ "Sum", "reduces", "grad", "along", "the", "tiled", "dimensions", "." ]
def _TileGrad(op, grad): """Sum reduces grad along the tiled dimensions.""" assert isinstance(grad, ops.Tensor) input_shape = array_ops.shape(op.inputs[0]) # We interleave multiples and input_shape to get split_shape, # reshape grad to split_shape, and reduce along all even # dimensions (the tiled dimension...
[ "def", "_TileGrad", "(", "op", ",", "grad", ")", ":", "assert", "isinstance", "(", "grad", ",", "ops", ".", "Tensor", ")", "input_shape", "=", "array_ops", ".", "shape", "(", "op", ".", "inputs", "[", "0", "]", ")", "# We interleave multiples and input_sha...
https://github.com/miyosuda/TensorFlowAndroidDemo/blob/35903e0221aa5f109ea2dbef27f20b52e317f42d/jni-build/jni/include/tensorflow/python/ops/array_grad.py#L339-L357
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
wx/lib/pubsub/core/publisherbase.py
python
PublisherBase.sendMessage
(self, topicName, *args, **kwargs)
Send a message for topic name with given data (args and kwargs). This will be overridden by derived classes that implement message-sending for different messaging protocols; not all parameters may be accepted.
Send a message for topic name with given data (args and kwargs). This will be overridden by derived classes that implement message-sending for different messaging protocols; not all parameters may be accepted.
[ "Send", "a", "message", "for", "topic", "name", "with", "given", "data", "(", "args", "and", "kwargs", ")", ".", "This", "will", "be", "overridden", "by", "derived", "classes", "that", "implement", "message", "-", "sending", "for", "different", "messaging", ...
def sendMessage(self, topicName, *args, **kwargs): """Send a message for topic name with given data (args and kwargs). This will be overridden by derived classes that implement message-sending for different messaging protocols; not all parameters may be accepted.""" raise NotImp...
[ "def", "sendMessage", "(", "self", ",", "topicName", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "raise", "NotImplementedError" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/wx/lib/pubsub/core/publisherbase.py#L126-L131
Polidea/SiriusObfuscator
b0e590d8130e97856afe578869b83a209e2b19be
SymbolExtractorAndRenamer/lldb/scripts/Python/static-binding/lldb.py
python
SBStructuredData.Clear
(self)
return _lldb.SBStructuredData_Clear(self)
Clear(self)
Clear(self)
[ "Clear", "(", "self", ")" ]
def Clear(self): """Clear(self)""" return _lldb.SBStructuredData_Clear(self)
[ "def", "Clear", "(", "self", ")", ":", "return", "_lldb", ".", "SBStructuredData_Clear", "(", "self", ")" ]
https://github.com/Polidea/SiriusObfuscator/blob/b0e590d8130e97856afe578869b83a209e2b19be/SymbolExtractorAndRenamer/lldb/scripts/Python/static-binding/lldb.py#L8054-L8056
google/llvm-propeller
45c226984fe8377ebfb2ad7713c680d652ba678d
compiler-rt/lib/sanitizer_common/scripts/cpplint.py
python
CheckRedundantOverrideOrFinal
(filename, clean_lines, linenum, error)
Check if line contains a redundant "override" or "final" virt-specifier. Args: filename: The name of the current file. clean_lines: A CleansedLines instance containing the file. linenum: The number of the line to check. error: The function to call with any errors found.
Check if line contains a redundant "override" or "final" virt-specifier.
[ "Check", "if", "line", "contains", "a", "redundant", "override", "or", "final", "virt", "-", "specifier", "." ]
def CheckRedundantOverrideOrFinal(filename, clean_lines, linenum, error): """Check if line contains a redundant "override" or "final" virt-specifier. Args: filename: The name of the current file. clean_lines: A CleansedLines instance containing the file. linenum: The number of the line to check. er...
[ "def", "CheckRedundantOverrideOrFinal", "(", "filename", ",", "clean_lines", ",", "linenum", ",", "error", ")", ":", "# Look for closing parenthesis nearby. We need one to confirm where", "# the declarator ends and where the virt-specifier starts to avoid", "# false positives.", "line...
https://github.com/google/llvm-propeller/blob/45c226984fe8377ebfb2ad7713c680d652ba678d/compiler-rt/lib/sanitizer_common/scripts/cpplint.py#L5685-L5711
FreeCAD/FreeCAD
ba42231b9c6889b89e064d6d563448ed81e376ec
src/Mod/Path/PathScripts/PathFeatureExtensions.py
python
Extension.getWire
(self)
getWire()... Public method to retrieve the extension area, pertaining to the feature and sub element provided at class instantiation, as a closed wire. If no closed wire is possible, a `None` value is returned.
getWire()... Public method to retrieve the extension area, pertaining to the feature and sub element provided at class instantiation, as a closed wire. If no closed wire is possible, a `None` value is returned.
[ "getWire", "()", "...", "Public", "method", "to", "retrieve", "the", "extension", "area", "pertaining", "to", "the", "feature", "and", "sub", "element", "provided", "at", "class", "instantiation", "as", "a", "closed", "wire", ".", "If", "no", "closed", "wire...
def getWire(self): """getWire()... Public method to retrieve the extension area, pertaining to the feature and sub element provided at class instantiation, as a closed wire. If no closed wire is possible, a `None` value is returned.""" if self.sub[:6] == "Avoid_": feature =...
[ "def", "getWire", "(", "self", ")", ":", "if", "self", ".", "sub", "[", ":", "6", "]", "==", "\"Avoid_\"", ":", "feature", "=", "self", ".", "obj", ".", "Shape", ".", "getElement", "(", "self", ".", "feature", ")", "self", ".", "extFaces", "=", "...
https://github.com/FreeCAD/FreeCAD/blob/ba42231b9c6889b89e064d6d563448ed81e376ec/src/Mod/Path/PathScripts/PathFeatureExtensions.py#L279-L303
yyzybb537/libgo
4af17b7c67643c4d54aa354dcc77963ea07847d0
third_party/boost.context/tools/build/src/build/targets.py
python
TargetRegistry.main_target_sources
(self, sources, main_target_name, no_renaming=0)
return result
Return the list of sources to use, if main target rule is invoked with 'sources'. If there are any objects in 'sources', they are treated as main target instances, and the name of such targets are adjusted to be '<name_of_this_target>__<name_of_source_target>'. Such renaming is disabled ...
Return the list of sources to use, if main target rule is invoked with 'sources'. If there are any objects in 'sources', they are treated as main target instances, and the name of such targets are adjusted to be '<name_of_this_target>__<name_of_source_target>'. Such renaming is disabled ...
[ "Return", "the", "list", "of", "sources", "to", "use", "if", "main", "target", "rule", "is", "invoked", "with", "sources", ".", "If", "there", "are", "any", "objects", "in", "sources", "they", "are", "treated", "as", "main", "target", "instances", "and", ...
def main_target_sources (self, sources, main_target_name, no_renaming=0): """Return the list of sources to use, if main target rule is invoked with 'sources'. If there are any objects in 'sources', they are treated as main target instances, and the name of such targets are adjusted to be...
[ "def", "main_target_sources", "(", "self", ",", "sources", ",", "main_target_name", ",", "no_renaming", "=", "0", ")", ":", "assert", "is_iterable_typed", "(", "sources", ",", "basestring", ")", "assert", "isinstance", "(", "main_target_name", ",", "basestring", ...
https://github.com/yyzybb537/libgo/blob/4af17b7c67643c4d54aa354dcc77963ea07847d0/third_party/boost.context/tools/build/src/build/targets.py#L114-L144
dmlc/treelite
df56babb6a4a2d7c29d719c28ce53acfa7dbab3c
python/treelite/sklearn/rf_regressor.py
python
SKLRFRegressorMixin.process_leaf_node
(cls, treelite_tree, sklearn_tree, node_id, sklearn_model)
Process a test node with a given node ID
Process a test node with a given node ID
[ "Process", "a", "test", "node", "with", "a", "given", "node", "ID" ]
def process_leaf_node(cls, treelite_tree, sklearn_tree, node_id, sklearn_model): # pylint: disable=W0613 """Process a test node with a given node ID""" # The `value` attribute stores the output for every leaf node. leaf_value = sklearn_tree.value[node_id].squeeze() # Initialize t...
[ "def", "process_leaf_node", "(", "cls", ",", "treelite_tree", ",", "sklearn_tree", ",", "node_id", ",", "sklearn_model", ")", ":", "# pylint: disable=W0613", "# The `value` attribute stores the output for every leaf node.", "leaf_value", "=", "sklearn_tree", ".", "value", "...
https://github.com/dmlc/treelite/blob/df56babb6a4a2d7c29d719c28ce53acfa7dbab3c/python/treelite/sklearn/rf_regressor.py#L28-L34
metashell/metashell
f4177e4854ea00c8dbc722cadab26ef413d798ea
3rd/templight/compiler-rt/lib/asan/scripts/asan_symbolize.py
python
AsanSymbolizerPlugIn.filter_module_desc
(self, module_desc)
return module_desc
Given a ModuleDesc object (`module_desc`) return a ModuleDesc suitable for symbolication. Implementations should return `None` if symbolication of this binary should be skipped.
Given a ModuleDesc object (`module_desc`) return a ModuleDesc suitable for symbolication.
[ "Given", "a", "ModuleDesc", "object", "(", "module_desc", ")", "return", "a", "ModuleDesc", "suitable", "for", "symbolication", "." ]
def filter_module_desc(self, module_desc): """ Given a ModuleDesc object (`module_desc`) return a ModuleDesc suitable for symbolication. Implementations should return `None` if symbolication of this binary should be skipped. """ return module_desc
[ "def", "filter_module_desc", "(", "self", ",", "module_desc", ")", ":", "return", "module_desc" ]
https://github.com/metashell/metashell/blob/f4177e4854ea00c8dbc722cadab26ef413d798ea/3rd/templight/compiler-rt/lib/asan/scripts/asan_symbolize.py#L700-L708
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/lib2to3/pytree.py
python
BasePattern.__new__
(cls, *args, **kwds)
return object.__new__(cls)
Constructor that prevents BasePattern from being instantiated.
Constructor that prevents BasePattern from being instantiated.
[ "Constructor", "that", "prevents", "BasePattern", "from", "being", "instantiated", "." ]
def __new__(cls, *args, **kwds): """Constructor that prevents BasePattern from being instantiated.""" assert cls is not BasePattern, "Cannot instantiate BasePattern" return object.__new__(cls)
[ "def", "__new__", "(", "cls", ",", "*", "args", ",", "*", "*", "kwds", ")", ":", "assert", "cls", "is", "not", "BasePattern", ",", "\"Cannot instantiate BasePattern\"", "return", "object", ".", "__new__", "(", "cls", ")" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/lib2to3/pytree.py#L435-L438
ApolloAuto/apollo-platform
86d9dc6743b496ead18d597748ebabd34a513289
ros/ros/roslib/src/roslib/launcher.py
python
_generate_python_path
(pkg, rospack)
return paths
Recursive subroutine for building dependency list and python path :raises: :exc:`rospkg.ResourceNotFound` If an error occurs while attempting to load package or dependencies
Recursive subroutine for building dependency list and python path :raises: :exc:`rospkg.ResourceNotFound` If an error occurs while attempting to load package or dependencies
[ "Recursive", "subroutine", "for", "building", "dependency", "list", "and", "python", "path", ":", "raises", ":", ":", "exc", ":", "rospkg", ".", "ResourceNotFound", "If", "an", "error", "occurs", "while", "attempting", "to", "load", "package", "or", "dependenc...
def _generate_python_path(pkg, rospack): """ Recursive subroutine for building dependency list and python path :raises: :exc:`rospkg.ResourceNotFound` If an error occurs while attempting to load package or dependencies """ if pkg in _bootstrapped: return [] # short-circuit if this is a ...
[ "def", "_generate_python_path", "(", "pkg", ",", "rospack", ")", ":", "if", "pkg", "in", "_bootstrapped", ":", "return", "[", "]", "# short-circuit if this is a catkin-ized package", "m", "=", "rospack", ".", "get_manifest", "(", "pkg", ")", "if", "m", ".", "i...
https://github.com/ApolloAuto/apollo-platform/blob/86d9dc6743b496ead18d597748ebabd34a513289/ros/ros/roslib/src/roslib/launcher.py#L84-L112
epiqc/ScaffCC
66a79944ee4cd116b27bc1a69137276885461db8
clang/bindings/python/clang/cindex.py
python
CursorKind.is_translation_unit
(self)
return conf.lib.clang_isTranslationUnit(self)
Test if this is a translation unit kind.
Test if this is a translation unit kind.
[ "Test", "if", "this", "is", "a", "translation", "unit", "kind", "." ]
def is_translation_unit(self): """Test if this is a translation unit kind.""" return conf.lib.clang_isTranslationUnit(self)
[ "def", "is_translation_unit", "(", "self", ")", ":", "return", "conf", ".", "lib", ".", "clang_isTranslationUnit", "(", "self", ")" ]
https://github.com/epiqc/ScaffCC/blob/66a79944ee4cd116b27bc1a69137276885461db8/clang/bindings/python/clang/cindex.py#L695-L697
ChromiumWebApps/chromium
c7361d39be8abd1574e6ce8957c8dbddd4c6ccf7
remoting/tools/build/remoting_copy_locales.py
python
calc_output
(locale)
Determine the file that will be generated for the given locale.
Determine the file that will be generated for the given locale.
[ "Determine", "the", "file", "that", "will", "be", "generated", "for", "the", "given", "locale", "." ]
def calc_output(locale): """Determine the file that will be generated for the given locale.""" #e.g. '<(INTERMEDIATE_DIR)/remoting_locales/da.pak', if OS == 'mac' or OS == 'ios': # For Cocoa to find the locale at runtime, it needs to use '_' instead # of '-' (http://crbug.com/20441). return os.path.jo...
[ "def", "calc_output", "(", "locale", ")", ":", "#e.g. '<(INTERMEDIATE_DIR)/remoting_locales/da.pak',", "if", "OS", "==", "'mac'", "or", "OS", "==", "'ios'", ":", "# For Cocoa to find the locale at runtime, it needs to use '_' instead", "# of '-' (http://crbug.com/20441).", "retur...
https://github.com/ChromiumWebApps/chromium/blob/c7361d39be8abd1574e6ce8957c8dbddd4c6ccf7/remoting/tools/build/remoting_copy_locales.py#L36-L45
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/pandas/py3/pandas/core/generic.py
python
NDFrame.asof
(self, where, subset=None)
return data if is_list else data.iloc[-1]
Return the last row(s) without any NaNs before `where`. The last row (for each element in `where`, if list) without any NaN is taken. In case of a :class:`~pandas.DataFrame`, the last row without NaN considering only the subset of columns (if not `None`) If there is no good val...
Return the last row(s) without any NaNs before `where`.
[ "Return", "the", "last", "row", "(", "s", ")", "without", "any", "NaNs", "before", "where", "." ]
def asof(self, where, subset=None): """ Return the last row(s) without any NaNs before `where`. The last row (for each element in `where`, if list) without any NaN is taken. In case of a :class:`~pandas.DataFrame`, the last row without NaN considering only the subset of ...
[ "def", "asof", "(", "self", ",", "where", ",", "subset", "=", "None", ")", ":", "if", "isinstance", "(", "where", ",", "str", ")", ":", "where", "=", "Timestamp", "(", "where", ")", "if", "not", "self", ".", "index", ".", "is_monotonic", ":", "rais...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/pandas/py3/pandas/core/generic.py#L6923-L7088
baidu-research/tensorflow-allreduce
66d5b855e90b0949e9fa5cca5599fd729a70e874
tensorflow/contrib/timeseries/python/timeseries/model.py
python
SequentialTimeSeriesModel.predict
(self, features)
return predictions
Calls self._prediction_step in a loop. See TimeSeriesModel.predict.
Calls self._prediction_step in a loop. See TimeSeriesModel.predict.
[ "Calls", "self", ".", "_prediction_step", "in", "a", "loop", ".", "See", "TimeSeriesModel", ".", "predict", "." ]
def predict(self, features): """Calls self._prediction_step in a loop. See TimeSeriesModel.predict.""" predict_times = ops.convert_to_tensor(features[PredictionFeatures.TIMES], dtypes.int64) start_state = features[PredictionFeatures.STATE_TUPLE] exogenous_regres...
[ "def", "predict", "(", "self", ",", "features", ")", ":", "predict_times", "=", "ops", ".", "convert_to_tensor", "(", "features", "[", "PredictionFeatures", ".", "TIMES", "]", ",", "dtypes", ".", "int64", ")", "start_state", "=", "features", "[", "Prediction...
https://github.com/baidu-research/tensorflow-allreduce/blob/66d5b855e90b0949e9fa5cca5599fd729a70e874/tensorflow/contrib/timeseries/python/timeseries/model.py#L562-L587
ceph/ceph
959663007321a369c83218414a29bd9dbc8bda3a
src/ceph-volume/ceph_volume/util/system.py
python
mkdir_p
(path, chown=True)
A `mkdir -p` that defaults to chown the path to the ceph user
A `mkdir -p` that defaults to chown the path to the ceph user
[ "A", "mkdir", "-", "p", "that", "defaults", "to", "chown", "the", "path", "to", "the", "ceph", "user" ]
def mkdir_p(path, chown=True): """ A `mkdir -p` that defaults to chown the path to the ceph user """ try: os.mkdir(path) except OSError as e: if e.errno == errno.EEXIST: pass else: raise if chown: uid, gid = get_ceph_user_ids() os.c...
[ "def", "mkdir_p", "(", "path", ",", "chown", "=", "True", ")", ":", "try", ":", "os", ".", "mkdir", "(", "path", ")", "except", "OSError", "as", "e", ":", "if", "e", ".", "errno", "==", "errno", ".", "EEXIST", ":", "pass", "else", ":", "raise", ...
https://github.com/ceph/ceph/blob/959663007321a369c83218414a29bd9dbc8bda3a/src/ceph-volume/ceph_volume/util/system.py#L131-L144
mongodb/mongo
d8ff665343ad29cf286ee2cf4a1960d29371937b
buildscripts/resmokelib/logging/formatters.py
python
TimestampFormatter.formatTime
(self, record, datefmt=None)
return "%s.%03dZ" % (formatted_time, record.msecs)
Return formatted time.
Return formatted time.
[ "Return", "formatted", "time", "." ]
def formatTime(self, record, datefmt=None): """Return formatted time.""" converted_time = self.converter(record.created) if datefmt is not None: return time.strftime(datefmt, converted_time) formatted_time = time.strftime("%H:%M:%S", converted_time) return "%s.%03dZ...
[ "def", "formatTime", "(", "self", ",", "record", ",", "datefmt", "=", "None", ")", ":", "converted_time", "=", "self", ".", "converter", "(", "record", ".", "created", ")", "if", "datefmt", "is", "not", "None", ":", "return", "time", ".", "strftime", "...
https://github.com/mongodb/mongo/blob/d8ff665343ad29cf286ee2cf4a1960d29371937b/buildscripts/resmokelib/logging/formatters.py#L13-L21
mantidproject/mantid
03deeb89254ec4289edb8771e0188c2090a02f32
scripts/Diffraction/isis_powder/routines/common.py
python
load_current_normalised_ws_list
(run_number_string, instrument, input_batching=None)
return normalised_ws_list
Loads a workspace using Mantid and then performs current normalisation on it. Additionally it will either load a range of runs individually or summed depending on the user specified behaviour queried from the instrument. This can behaviour can be overridden by using the optional parameter input_batching. For ...
Loads a workspace using Mantid and then performs current normalisation on it. Additionally it will either load a range of runs individually or summed depending on the user specified behaviour queried from the instrument. This can behaviour can be overridden by using the optional parameter input_batching. For ...
[ "Loads", "a", "workspace", "using", "Mantid", "and", "then", "performs", "current", "normalisation", "on", "it", ".", "Additionally", "it", "will", "either", "load", "a", "range", "of", "runs", "individually", "or", "summed", "depending", "on", "the", "user", ...
def load_current_normalised_ws_list(run_number_string, instrument, input_batching=None): """ Loads a workspace using Mantid and then performs current normalisation on it. Additionally it will either load a range of runs individually or summed depending on the user specified behaviour queried from the instru...
[ "def", "load_current_normalised_ws_list", "(", "run_number_string", ",", "instrument", ",", "input_batching", "=", "None", ")", ":", "if", "not", "input_batching", ":", "input_batching", "=", "instrument", ".", "_get_input_batching_mode", "(", ")", "run_information", ...
https://github.com/mantidproject/mantid/blob/03deeb89254ec4289edb8771e0188c2090a02f32/scripts/Diffraction/isis_powder/routines/common.py#L335-L364
qgis/QGIS
15a77662d4bb712184f6aa60d0bd663010a76a75
python/plugins/db_manager/db_plugins/oracle/connector.py
python
OracleDBConnector.getTableMainGeomType
(self, table, geomCol)
return wkbType, srid
Return the best wkbType for a table by requesting geometry column.
Return the best wkbType for a table by requesting geometry column.
[ "Return", "the", "best", "wkbType", "for", "a", "table", "by", "requesting", "geometry", "column", "." ]
def getTableMainGeomType(self, table, geomCol): """Return the best wkbType for a table by requesting geometry column. """ geomTypes, srids = self.getTableGeomTypes(table, geomCol) # Make the decision: wkbType = QgsWkbTypes.Unknown srid = -1 order = [QgsW...
[ "def", "getTableMainGeomType", "(", "self", ",", "table", ",", "geomCol", ")", ":", "geomTypes", ",", "srids", "=", "self", ".", "getTableGeomTypes", "(", "table", ",", "geomCol", ")", "# Make the decision:", "wkbType", "=", "QgsWkbTypes", ".", "Unknown", "sri...
https://github.com/qgis/QGIS/blob/15a77662d4bb712184f6aa60d0bd663010a76a75/python/plugins/db_manager/db_plugins/oracle/connector.py#L797-L819
mindspore-ai/mindspore
fb8fd3338605bb34fa5cea054e535a8b1d753fab
mindspore/python/mindspore/ops/_op_impl/akg/ascend/reduce_max.py
python
_reduce_max_akg
()
return
ReduceMax Akg register
ReduceMax Akg register
[ "ReduceMax", "Akg", "register" ]
def _reduce_max_akg(): """ReduceMax Akg register""" return
[ "def", "_reduce_max_akg", "(", ")", ":", "return" ]
https://github.com/mindspore-ai/mindspore/blob/fb8fd3338605bb34fa5cea054e535a8b1d753fab/mindspore/python/mindspore/ops/_op_impl/akg/ascend/reduce_max.py#L30-L32
UDST/pandana
3e3d35ca2d57428714b89ed8fc7020bc55067e1d
pandana/network.py
python
reserve_num_graphs
(num)
return None
This function was previously used to reserve memory space for multiple graphs. It is no longer needed in Pandana 0.4+, and will be removed in a future version. Parameters ---------- num : int Number of graphs to be reserved in memory
This function was previously used to reserve memory space for multiple graphs. It is no longer needed in Pandana 0.4+, and will be removed in a future version.
[ "This", "function", "was", "previously", "used", "to", "reserve", "memory", "space", "for", "multiple", "graphs", ".", "It", "is", "no", "longer", "needed", "in", "Pandana", "0", ".", "4", "+", "and", "will", "be", "removed", "in", "a", "future", "versio...
def reserve_num_graphs(num): """ This function was previously used to reserve memory space for multiple graphs. It is no longer needed in Pandana 0.4+, and will be removed in a future version. Parameters ---------- num : int Number of graphs to be reserved in memory """ war...
[ "def", "reserve_num_graphs", "(", "num", ")", ":", "warnings", ".", "warn", "(", "\"Function reserve_num_graphs() is no longer needed in Pandana 0.4+\\\n and will be removed in a future version\"", ",", "DeprecationWarning", ")", "return", "None" ]
https://github.com/UDST/pandana/blob/3e3d35ca2d57428714b89ed8fc7020bc55067e1d/pandana/network.py#L12-L29
hakuna-m/wubiuefi
caec1af0a09c78fd5a345180ada1fe45e0c63493
src/pypack/modulegraph/pkg_resources.py
python
file_ns_handler
(importer, path_item, packageName, module)
Compute an ns-package subpath for a filesystem or zipfile importer
Compute an ns-package subpath for a filesystem or zipfile importer
[ "Compute", "an", "ns", "-", "package", "subpath", "for", "a", "filesystem", "or", "zipfile", "importer" ]
def file_ns_handler(importer, path_item, packageName, module): """Compute an ns-package subpath for a filesystem or zipfile importer""" subpath = os.path.join(path_item, packageName.split('.')[-1]) normalized = _normalize_cached(subpath) for item in module.__path__: if _normalize_cached(item)==...
[ "def", "file_ns_handler", "(", "importer", ",", "path_item", ",", "packageName", ",", "module", ")", ":", "subpath", "=", "os", ".", "path", ".", "join", "(", "path_item", ",", "packageName", ".", "split", "(", "'.'", ")", "[", "-", "1", "]", ")", "n...
https://github.com/hakuna-m/wubiuefi/blob/caec1af0a09c78fd5a345180ada1fe45e0c63493/src/pypack/modulegraph/pkg_resources.py#L1536-L1546
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/osx_carbon/_misc.py
python
DateTime.GetHour
(*args, **kwargs)
return _misc_.DateTime_GetHour(*args, **kwargs)
GetHour(self, wxDateTime::TimeZone tz=LOCAL_TZ) -> int
GetHour(self, wxDateTime::TimeZone tz=LOCAL_TZ) -> int
[ "GetHour", "(", "self", "wxDateTime", "::", "TimeZone", "tz", "=", "LOCAL_TZ", ")", "-", ">", "int" ]
def GetHour(*args, **kwargs): """GetHour(self, wxDateTime::TimeZone tz=LOCAL_TZ) -> int""" return _misc_.DateTime_GetHour(*args, **kwargs)
[ "def", "GetHour", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_misc_", ".", "DateTime_GetHour", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_carbon/_misc.py#L3993-L3995
hanpfei/chromium-net
392cc1fa3a8f92f42e4071ab6e674d8e0482f83f
third_party/catapult/dashboard/dashboard/start_try_job.py
python
StartBisectHandler.post
(self)
Performs one of several bisect-related actions depending on parameters. The only required parameter is "step", which indicates what to do. This end-point should always output valid JSON with different contents depending on the value of "step".
Performs one of several bisect-related actions depending on parameters.
[ "Performs", "one", "of", "several", "bisect", "-", "related", "actions", "depending", "on", "parameters", "." ]
def post(self): """Performs one of several bisect-related actions depending on parameters. The only required parameter is "step", which indicates what to do. This end-point should always output valid JSON with different contents depending on the value of "step". """ user = users.get_current_us...
[ "def", "post", "(", "self", ")", ":", "user", "=", "users", ".", "get_current_user", "(", ")", "if", "not", "utils", ".", "IsValidSheriffUser", "(", ")", ":", "message", "=", "'User \"%s\" not authorized.'", "%", "user", "self", ".", "response", ".", "out"...
https://github.com/hanpfei/chromium-net/blob/392cc1fa3a8f92f42e4071ab6e674d8e0482f83f/third_party/catapult/dashboard/dashboard/start_try_job.py#L98-L123
trilinos/Trilinos
6168be6dd51e35e1cd681e9c4b24433e709df140
packages/seacas/libraries/ioss/src/visualization/catalyst/phactori/PhactoriDriver.py
python
PlotValMinMaxTrkC.UpdateMinMaxToUse
(self)
assumes we have obtained this callback (ThisCb) mins and maxes; uses\n Initial settings and locks to determine what mins and maxes are\n now in force
assumes we have obtained this callback (ThisCb) mins and maxes; uses\n Initial settings and locks to determine what mins and maxes are\n now in force
[ "assumes", "we", "have", "obtained", "this", "callback", "(", "ThisCb", ")", "mins", "and", "maxes", ";", "uses", "\\", "n", "Initial", "settings", "and", "locks", "to", "determine", "what", "mins", "and", "maxes", "are", "\\", "n", "now", "in", "force" ...
def UpdateMinMaxToUse(self): "assumes we have obtained this callback (ThisCb) mins and maxes; uses\n Initial settings and locks to determine what mins and maxes are\n now in force" if self.mUseCumulativeRange: localMin = self.mAllMin else: localMin = self.mThisCbMin if self.mUseH...
[ "def", "UpdateMinMaxToUse", "(", "self", ")", ":", "if", "self", ".", "mUseCumulativeRange", ":", "localMin", "=", "self", ".", "mAllMin", "else", ":", "localMin", "=", "self", ".", "mThisCbMin", "if", "self", ".", "mUseHighestBot", ":", "if", "localMin", ...
https://github.com/trilinos/Trilinos/blob/6168be6dd51e35e1cd681e9c4b24433e709df140/packages/seacas/libraries/ioss/src/visualization/catalyst/phactori/PhactoriDriver.py#L22869-L22904
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Gems/CloudGemFramework/v1/ResourceManager/lib/Crypto/Hash/CMAC.py
python
CMAC.hexdigest
(self)
return "".join(["%02x" % bord(x) for x in tuple(self.digest())])
Return the **printable** MAC tag of the message authenticated so far. :return: The MAC tag, computed over the data processed so far. Hexadecimal encoded. :rtype: string
Return the **printable** MAC tag of the message authenticated so far.
[ "Return", "the", "**", "printable", "**", "MAC", "tag", "of", "the", "message", "authenticated", "so", "far", "." ]
def hexdigest(self): """Return the **printable** MAC tag of the message authenticated so far. :return: The MAC tag, computed over the data processed so far. Hexadecimal encoded. :rtype: string """ return "".join(["%02x" % bord(x) for x i...
[ "def", "hexdigest", "(", "self", ")", ":", "return", "\"\"", ".", "join", "(", "[", "\"%02x\"", "%", "bord", "(", "x", ")", "for", "x", "in", "tuple", "(", "self", ".", "digest", "(", ")", ")", "]", ")" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Gems/CloudGemFramework/v1/ResourceManager/lib/Crypto/Hash/CMAC.py#L216-L225
benoitsteiner/tensorflow-opencl
cb7cb40a57fde5cfd4731bc551e82a1e2fef43a5
tensorflow/python/ops/rnn_cell_impl.py
python
_zero_state_tensors
(state_size, batch_size, dtype)
return nest.map_structure(get_state_shape, state_size)
Create tensors of zeros based on state_size, batch_size, and dtype.
Create tensors of zeros based on state_size, batch_size, and dtype.
[ "Create", "tensors", "of", "zeros", "based", "on", "state_size", "batch_size", "and", "dtype", "." ]
def _zero_state_tensors(state_size, batch_size, dtype): """Create tensors of zeros based on state_size, batch_size, and dtype.""" def get_state_shape(s): """Combine s with batch_size to get a proper tensor shape.""" c = _concat(batch_size, s) size = array_ops.zeros(c, dtype=dtype) if context.in_grap...
[ "def", "_zero_state_tensors", "(", "state_size", ",", "batch_size", ",", "dtype", ")", ":", "def", "get_state_shape", "(", "s", ")", ":", "\"\"\"Combine s with batch_size to get a proper tensor shape.\"\"\"", "c", "=", "_concat", "(", "batch_size", ",", "s", ")", "s...
https://github.com/benoitsteiner/tensorflow-opencl/blob/cb7cb40a57fde5cfd4731bc551e82a1e2fef43a5/tensorflow/python/ops/rnn_cell_impl.py#L123-L133
klzgrad/naiveproxy
ed2c513637c77b18721fe428d7ed395b4d284c83
src/base/android/jni_generator/jni_registration_generator.py
python
HeaderGenerator._AddProxyNativeMethodKStrings
(self)
Returns KMethodString for wrapped native methods in all_classes
Returns KMethodString for wrapped native methods in all_classes
[ "Returns", "KMethodString", "for", "wrapped", "native", "methods", "in", "all_classes" ]
def _AddProxyNativeMethodKStrings(self): """Returns KMethodString for wrapped native methods in all_classes """ if self.main_dex: key = 'PROXY_NATIVE_METHOD_ARRAY_MAIN_DEX' else: key = 'PROXY_NATIVE_METHOD_ARRAY' proxy_k_strings = ('\n'.join( self._GetKMethodArrayEntry(p) for p in ...
[ "def", "_AddProxyNativeMethodKStrings", "(", "self", ")", ":", "if", "self", ".", "main_dex", ":", "key", "=", "'PROXY_NATIVE_METHOD_ARRAY_MAIN_DEX'", "else", ":", "key", "=", "'PROXY_NATIVE_METHOD_ARRAY'", "proxy_k_strings", "=", "(", "'\\n'", ".", "join", "(", "...
https://github.com/klzgrad/naiveproxy/blob/ed2c513637c77b18721fe428d7ed395b4d284c83/src/base/android/jni_generator/jni_registration_generator.py#L449-L460
snap-stanford/snap-python
d53c51b0a26aa7e3e7400b014cdf728948fde80a
setup/snap.py
python
TStr_PutFExt
(*args)
return _snap.TStr_PutFExt(*args)
TStr_PutFExt(TStr FNm, TStr FExt) -> TStr Parameters: FNm: TStr const & FExt: TStr const &
TStr_PutFExt(TStr FNm, TStr FExt) -> TStr
[ "TStr_PutFExt", "(", "TStr", "FNm", "TStr", "FExt", ")", "-", ">", "TStr" ]
def TStr_PutFExt(*args): """ TStr_PutFExt(TStr FNm, TStr FExt) -> TStr Parameters: FNm: TStr const & FExt: TStr const & """ return _snap.TStr_PutFExt(*args)
[ "def", "TStr_PutFExt", "(", "*", "args", ")", ":", "return", "_snap", ".", "TStr_PutFExt", "(", "*", "args", ")" ]
https://github.com/snap-stanford/snap-python/blob/d53c51b0a26aa7e3e7400b014cdf728948fde80a/setup/snap.py#L11213-L11222
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/osx_cocoa/_gdi.py
python
DC.DrawSpline
(*args, **kwargs)
return _gdi_.DC_DrawSpline(*args, **kwargs)
DrawSpline(self, List points) Draws a spline between all given control points, (a list of `wx.Point` objects) using the current pen. The spline is drawn using a series of lines, using an algorithm taken from the X drawing program 'XFIG'.
DrawSpline(self, List points)
[ "DrawSpline", "(", "self", "List", "points", ")" ]
def DrawSpline(*args, **kwargs): """ DrawSpline(self, List points) Draws a spline between all given control points, (a list of `wx.Point` objects) using the current pen. The spline is drawn using a series of lines, using an algorithm taken from the X drawing program 'XFIG'. ...
[ "def", "DrawSpline", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_gdi_", ".", "DC_DrawSpline", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_cocoa/_gdi.py#L3955-L3963
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
wx/tools/Editra/src/eclib/ctrlbox.py
python
ControlBar.SetMargins
(self, param1, param2)
Setup the margins on the edges of the ControlBar @param param1: left/top margin depending on orientation @param param2: right/bottom margin depending on orientation
Setup the margins on the edges of the ControlBar @param param1: left/top margin depending on orientation @param param2: right/bottom margin depending on orientation
[ "Setup", "the", "margins", "on", "the", "edges", "of", "the", "ControlBar", "@param", "param1", ":", "left", "/", "top", "margin", "depending", "on", "orientation", "@param", "param2", ":", "right", "/", "bottom", "margin", "depending", "on", "orientation" ]
def SetMargins(self, param1, param2): """Setup the margins on the edges of the ControlBar @param param1: left/top margin depending on orientation @param param2: right/bottom margin depending on orientation """ sizer = self.GetSizer() if wx.VERSION < (2, 9, 0, 0, ''): ...
[ "def", "SetMargins", "(", "self", ",", "param1", ",", "param2", ")", ":", "sizer", "=", "self", ".", "GetSizer", "(", ")", "if", "wx", ".", "VERSION", "<", "(", "2", ",", "9", ",", "0", ",", "0", ",", "''", ")", ":", "sizer", ".", "GetItem", ...
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/wx/tools/Editra/src/eclib/ctrlbox.py#L583-L596
Samsung/veles
95ed733c2e49bc011ad98ccf2416ecec23fbf352
veles/external/pydot.py
python
graph_from_adjacency_matrix
(matrix, node_prefix="", directed=False)
return graph
Creates a basic graph out of an adjacency matrix. The matrix has to be a list of rows of values representing an adjacency matrix. The values can be anything: bool, int, float, as long as they can evaluate to True or False.
Creates a basic graph out of an adjacency matrix. The matrix has to be a list of rows of values representing an adjacency matrix. The values can be anything: bool, int, float, as long as they can evaluate to True or False.
[ "Creates", "a", "basic", "graph", "out", "of", "an", "adjacency", "matrix", ".", "The", "matrix", "has", "to", "be", "a", "list", "of", "rows", "of", "values", "representing", "an", "adjacency", "matrix", ".", "The", "values", "can", "be", "anything", ":...
def graph_from_adjacency_matrix(matrix, node_prefix="", directed=False): """Creates a basic graph out of an adjacency matrix. The matrix has to be a list of rows of values representing an adjacency matrix. The values can be anything: bool, int, float, as long as they can evaluate to True or Fal...
[ "def", "graph_from_adjacency_matrix", "(", "matrix", ",", "node_prefix", "=", "\"\"", ",", "directed", "=", "False", ")", ":", "node_orig", "=", "1", "if", "directed", ":", "graph", "=", "Dot", "(", "graph_type", "=", "'digraph'", ")", "else", ":", "graph"...
https://github.com/Samsung/veles/blob/95ed733c2e49bc011ad98ccf2416ecec23fbf352/veles/external/pydot.py#L260-L293
microsoft/LightGBM
904b2d5158703c4900b68008617951dd2f9ff21b
python-package/lightgbm/basic.py
python
Dataset.set_weight
(self, weight)
return self
Set weight of each instance. Parameters ---------- weight : list, numpy 1-D array, pandas Series or None Weight to be set for each data point. Returns ------- self : Dataset Dataset with set weight.
Set weight of each instance.
[ "Set", "weight", "of", "each", "instance", "." ]
def set_weight(self, weight): """Set weight of each instance. Parameters ---------- weight : list, numpy 1-D array, pandas Series or None Weight to be set for each data point. Returns ------- self : Dataset Dataset with set weight. ...
[ "def", "set_weight", "(", "self", ",", "weight", ")", ":", "if", "weight", "is", "not", "None", "and", "np", ".", "all", "(", "weight", "==", "1", ")", ":", "weight", "=", "None", "self", ".", "weight", "=", "weight", "if", "self", ".", "handle", ...
https://github.com/microsoft/LightGBM/blob/904b2d5158703c4900b68008617951dd2f9ff21b/python-package/lightgbm/basic.py#L2150-L2170
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Gems/CloudGemMetric/v1/AWS/common-code/Lib/numba/types/containers.py
python
DictType.refine
(cls, keyty, valty)
return res
Refine to a precise dictionary type
Refine to a precise dictionary type
[ "Refine", "to", "a", "precise", "dictionary", "type" ]
def refine(cls, keyty, valty): """Refine to a precise dictionary type """ res = cls(keyty, valty) res.is_precise() return res
[ "def", "refine", "(", "cls", ",", "keyty", ",", "valty", ")", ":", "res", "=", "cls", "(", "keyty", ",", "valty", ")", "res", ".", "is_precise", "(", ")", "return", "res" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Gems/CloudGemMetric/v1/AWS/common-code/Lib/numba/types/containers.py#L603-L608
ONLYOFFICE/core
1f976ae79a2593fc22ee78e9fdbb76090e83785c
DesktopEditor/xml/libxml2/python/libxml.py
python
SAXCallback.notationDecl
(self, name, externalID, systemID)
called when an NOTATION declaration has been found, name is the notation name and externalID, systemID are the notation public and system identifier for that notation if available
called when an NOTATION declaration has been found, name is the notation name and externalID, systemID are the notation public and system identifier for that notation if available
[ "called", "when", "an", "NOTATION", "declaration", "has", "been", "found", "name", "is", "the", "notation", "name", "and", "externalID", "systemID", "are", "the", "notation", "public", "and", "system", "identifier", "for", "that", "notation", "if", "available" ]
def notationDecl(self, name, externalID, systemID): """called when an NOTATION declaration has been found, name is the notation name and externalID, systemID are the notation public and system identifier for that notation if available""" pass
[ "def", "notationDecl", "(", "self", ",", "name", ",", "externalID", ",", "systemID", ")", ":", "pass" ]
https://github.com/ONLYOFFICE/core/blob/1f976ae79a2593fc22ee78e9fdbb76090e83785c/DesktopEditor/xml/libxml2/python/libxml.py#L230-L234
smilehao/xlua-framework
a03801538be2b0e92d39332d445b22caca1ef61f
ConfigData/trunk/tools/protobuf-2.5.0/protobuf-2.5.0/python/build/lib/google/protobuf/internal/decoder.py
python
MessageSetItemDecoder
(extensions_by_number)
return DecodeItem
Returns a decoder for a MessageSet item. The parameter is the _extensions_by_number map for the message class. The message set message looks like this: message MessageSet { repeated group Item = 1 { required int32 type_id = 2; required string message = 3; } }
Returns a decoder for a MessageSet item.
[ "Returns", "a", "decoder", "for", "a", "MessageSet", "item", "." ]
def MessageSetItemDecoder(extensions_by_number): """Returns a decoder for a MessageSet item. The parameter is the _extensions_by_number map for the message class. The message set message looks like this: message MessageSet { repeated group Item = 1 { required int32 type_id = 2; require...
[ "def", "MessageSetItemDecoder", "(", "extensions_by_number", ")", ":", "type_id_tag_bytes", "=", "encoder", ".", "TagBytes", "(", "2", ",", "wire_format", ".", "WIRETYPE_VARINT", ")", "message_tag_bytes", "=", "encoder", ".", "TagBytes", "(", "3", ",", "wire_forma...
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/decoder.py#L556-L626
mantidproject/mantid
03deeb89254ec4289edb8771e0188c2090a02f32
scripts/LargeScaleStructures/geometry_writer.py
python
MantidGeom.addSamplePosition
(self, location=None, coord_type="cartesian")
Adds the sample position to the file. The coordinates should be passed as a tuple of (x, y, z) or (r, t, p). Default location is (0, 0, 0) in cartesian coordinates.
Adds the sample position to the file. The coordinates should be passed as a tuple of (x, y, z) or (r, t, p). Default location is (0, 0, 0) in cartesian coordinates.
[ "Adds", "the", "sample", "position", "to", "the", "file", ".", "The", "coordinates", "should", "be", "passed", "as", "a", "tuple", "of", "(", "x", "y", "z", ")", "or", "(", "r", "t", "p", ")", ".", "Default", "location", "is", "(", "0", "0", "0",...
def addSamplePosition(self, location=None, coord_type="cartesian"): """ Adds the sample position to the file. The coordinates should be passed as a tuple of (x, y, z) or (r, t, p). Default location is (0, 0, 0) in cartesian coordinates. """ sample = self._append_child("co...
[ "def", "addSamplePosition", "(", "self", ",", "location", "=", "None", ",", "coord_type", "=", "\"cartesian\"", ")", ":", "sample", "=", "self", ".", "_append_child", "(", "\"component\"", ",", "self", ".", "_root", ",", "type", "=", "\"sample-position\"", "...
https://github.com/mantidproject/mantid/blob/03deeb89254ec4289edb8771e0188c2090a02f32/scripts/LargeScaleStructures/geometry_writer.py#L97-L119
rapidsai/cudf
d5b2448fc69f17509304d594f029d0df56984962
python/cudf/cudf/core/column/column.py
python
__setitem__
(self, key: Any, value: Any)
Set the value of self[key] to value. If value and self are of different types, value is coerced to self.dtype
Set the value of self[key] to value.
[ "Set", "the", "value", "of", "self", "[", "key", "]", "to", "value", "." ]
def __setitem__(self, key: Any, value: Any): """ Set the value of self[key] to value. If value and self are of different types, value is coerced to self.dtype """ if isinstance(key, slice): key_start, key_stop, key_stride = key.indices(len(self)) ...
[ "def", "__setitem__", "(", "self", ",", "key", ":", "Any", ",", "value", ":", "Any", ")", ":", "if", "isinstance", "(", "key", ",", "slice", ")", ":", "key_start", ",", "key_stop", ",", "key_stride", "=", "key", ".", "indices", "(", "len", "(", "se...
https://github.com/rapidsai/cudf/blob/d5b2448fc69f17509304d594f029d0df56984962/python/cudf/cudf/core/column/column.py#L488-L565
macchina-io/macchina.io
ef24ba0e18379c3dd48fb84e6dbf991101cb8db0
platform/JS/V8/tools/gyp/pylib/gyp/msvs_emulation.py
python
_FindDirectXInstallation
()
return dxsdk_dir
Try to find an installation location for the DirectX SDK. Check for the standard environment variable, and if that doesn't exist, try to find via the registry. May return None if not found in either location.
Try to find an installation location for the DirectX SDK. Check for the standard environment variable, and if that doesn't exist, try to find via the registry. May return None if not found in either location.
[ "Try", "to", "find", "an", "installation", "location", "for", "the", "DirectX", "SDK", ".", "Check", "for", "the", "standard", "environment", "variable", "and", "if", "that", "doesn", "t", "exist", "try", "to", "find", "via", "the", "registry", ".", "May",...
def _FindDirectXInstallation(): """Try to find an installation location for the DirectX SDK. Check for the standard environment variable, and if that doesn't exist, try to find via the registry. May return None if not found in either location.""" # Return previously calculated value, if there is one if hasatt...
[ "def", "_FindDirectXInstallation", "(", ")", ":", "# Return previously calculated value, if there is one", "if", "hasattr", "(", "_FindDirectXInstallation", ",", "'dxsdk_dir'", ")", ":", "return", "_FindDirectXInstallation", ".", "dxsdk_dir", "dxsdk_dir", "=", "os", ".", ...
https://github.com/macchina-io/macchina.io/blob/ef24ba0e18379c3dd48fb84e6dbf991101cb8db0/platform/JS/V8/tools/gyp/pylib/gyp/msvs_emulation.py#L120-L139
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/osx_carbon/xrc.py
python
XmlResourceHandler.__init__
(self, *args, **kwargs)
__init__(self) -> XmlResourceHandler
__init__(self) -> XmlResourceHandler
[ "__init__", "(", "self", ")", "-", ">", "XmlResourceHandler" ]
def __init__(self, *args, **kwargs): """__init__(self) -> XmlResourceHandler""" _xrc.XmlResourceHandler_swiginit(self,_xrc.new_XmlResourceHandler(*args, **kwargs)) XmlResourceHandler._setCallbackInfo(self, self, XmlResourceHandler)
[ "def", "__init__", "(", "self", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "_xrc", ".", "XmlResourceHandler_swiginit", "(", "self", ",", "_xrc", ".", "new_XmlResourceHandler", "(", "*", "args", ",", "*", "*", "kwargs", ")", ")", "XmlResourceHan...
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_carbon/xrc.py#L584-L587
openmm/openmm
cb293447c4fc8b03976dfe11399f107bab70f3d9
wrappers/python/openmm/unit/unit_math.py
python
norm
(x)
return sqrt(dot(x, x))
>>> norm((3, 4)*meter) Quantity(value=5.0, unit=meter)
>>> norm((3, 4)*meter) Quantity(value=5.0, unit=meter)
[ ">>>", "norm", "((", "3", "4", ")", "*", "meter", ")", "Quantity", "(", "value", "=", "5", ".", "0", "unit", "=", "meter", ")" ]
def norm(x): """ >>> norm((3, 4)*meter) Quantity(value=5.0, unit=meter) """ return sqrt(dot(x, x))
[ "def", "norm", "(", "x", ")", ":", "return", "sqrt", "(", "dot", "(", "x", ",", "x", ")", ")" ]
https://github.com/openmm/openmm/blob/cb293447c4fc8b03976dfe11399f107bab70f3d9/wrappers/python/openmm/unit/unit_math.py#L183-L188
tensorflow/tensorflow
419e3a6b650ea4bd1b0cba23c4348f8a69f3272e
tensorflow/python/ops/numpy_ops/np_utils.py
python
greater_equal
(a, b)
return _maybe_static(a) >= _maybe_static(b)
A version of tf.greater_equal that eagerly evaluates if possible.
A version of tf.greater_equal that eagerly evaluates if possible.
[ "A", "version", "of", "tf", ".", "greater_equal", "that", "eagerly", "evaluates", "if", "possible", "." ]
def greater_equal(a, b): """A version of tf.greater_equal that eagerly evaluates if possible.""" return _maybe_static(a) >= _maybe_static(b)
[ "def", "greater_equal", "(", "a", ",", "b", ")", ":", "return", "_maybe_static", "(", "a", ")", ">=", "_maybe_static", "(", "b", ")" ]
https://github.com/tensorflow/tensorflow/blob/419e3a6b650ea4bd1b0cba23c4348f8a69f3272e/tensorflow/python/ops/numpy_ops/np_utils.py#L622-L624
y123456yz/reading-and-annotate-mongodb-3.6
93280293672ca7586dc24af18132aa61e4ed7fcf
mongo/src/third_party/wiredtiger/src/docs/tools/doxypy.py
python
Doxypy.__flushBuffer
(self)
Flushes the current outputbuffer to the outstream.
Flushes the current outputbuffer to the outstream.
[ "Flushes", "the", "current", "outputbuffer", "to", "the", "outstream", "." ]
def __flushBuffer(self): """Flushes the current outputbuffer to the outstream.""" if self.output: try: if options.debug: print >>sys.stderr, "# OUTPUT: ", self.output print >>self.outstream, "\n".join(self.output) self.outstream.flush() except IOError: # Fix for FS#33. Catches "broken pip...
[ "def", "__flushBuffer", "(", "self", ")", ":", "if", "self", ".", "output", ":", "try", ":", "if", "options", ".", "debug", ":", "print", ">>", "sys", ".", "stderr", ",", "\"# OUTPUT: \"", ",", "self", ".", "output", "print", ">>", "self", ".", "outs...
https://github.com/y123456yz/reading-and-annotate-mongodb-3.6/blob/93280293672ca7586dc24af18132aa61e4ed7fcf/mongo/src/third_party/wiredtiger/src/docs/tools/doxypy.py#L206-L219
msftguy/ssh-rd
a5f3a79daeac5844edebf01916c9613563f1c390
_3rd/boost_1_48_0/tools/build/v2/build/generators.py
python
Generator.convert_multiple_sources_to_consumable_types
(self, project, prop_set, sources)
return (consumed, bypassed)
Converts several files to consumable types.
Converts several files to consumable types.
[ "Converts", "several", "files", "to", "consumable", "types", "." ]
def convert_multiple_sources_to_consumable_types (self, project, prop_set, sources): """ Converts several files to consumable types. """ consumed = [] bypassed = [] # We process each source one-by-one, trying to convert it to # a usable type. for s in sou...
[ "def", "convert_multiple_sources_to_consumable_types", "(", "self", ",", "project", ",", "prop_set", ",", "sources", ")", ":", "consumed", "=", "[", "]", "bypassed", "=", "[", "]", "# We process each source one-by-one, trying to convert it to", "# a usable type.", "for", ...
https://github.com/msftguy/ssh-rd/blob/a5f3a79daeac5844edebf01916c9613563f1c390/_3rd/boost_1_48_0/tools/build/v2/build/generators.py#L561-L578
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/osx_cocoa/stc.py
python
StyledTextCtrl.IndicatorClearRange
(*args, **kwargs)
return _stc.StyledTextCtrl_IndicatorClearRange(*args, **kwargs)
IndicatorClearRange(self, int position, int clearLength) Turn a indicator off over a range.
IndicatorClearRange(self, int position, int clearLength)
[ "IndicatorClearRange", "(", "self", "int", "position", "int", "clearLength", ")" ]
def IndicatorClearRange(*args, **kwargs): """ IndicatorClearRange(self, int position, int clearLength) Turn a indicator off over a range. """ return _stc.StyledTextCtrl_IndicatorClearRange(*args, **kwargs)
[ "def", "IndicatorClearRange", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_stc", ".", "StyledTextCtrl_IndicatorClearRange", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_cocoa/stc.py#L5687-L5693
mantidproject/mantid
03deeb89254ec4289edb8771e0188c2090a02f32
qt/python/mantidqtinterfaces/mantidqtinterfaces/HFIR_4Circle_Reduction/reduce4circleGUI.py
python
MainWindow.menu_pre_process
(self)
handling action to trigger menu pre-process :return:
handling action to trigger menu pre-process :return:
[ "handling", "action", "to", "trigger", "menu", "pre", "-", "process", ":", "return", ":" ]
def menu_pre_process(self): """ handling action to trigger menu pre-process :return: """ # initialize the pre processing window if it is not initialized reset_pre_process_window = False if self._preProcessWindow is None: # initialize the instance s...
[ "def", "menu_pre_process", "(", "self", ")", ":", "# initialize the pre processing window if it is not initialized", "reset_pre_process_window", "=", "False", "if", "self", ".", "_preProcessWindow", "is", "None", ":", "# initialize the instance", "self", ".", "_preProcessWind...
https://github.com/mantidproject/mantid/blob/03deeb89254ec4289edb8771e0188c2090a02f32/qt/python/mantidqtinterfaces/mantidqtinterfaces/HFIR_4Circle_Reduction/reduce4circleGUI.py#L3660-L3702
NVIDIAGameWorks/kaolin
e5148d05e9c1e2ce92a07881ce3593b1c5c3f166
kaolin/ops/mesh/trianglemesh.py
python
face_areas
(vertices, faces)
return areas.squeeze(-1)
Compute the areas of each face of triangle meshes. Args: vertices (torch.Tensor): The vertices of the meshes, of shape :math:`(\\text{batch_size}, \\text{num_vertices}, 3)`. faces (torch.LongTensor): the faces of the meshes, of shape :math:`(\\text{num_faces}, 3)...
Compute the areas of each face of triangle meshes.
[ "Compute", "the", "areas", "of", "each", "face", "of", "triangle", "meshes", "." ]
def face_areas(vertices, faces): """Compute the areas of each face of triangle meshes. Args: vertices (torch.Tensor): The vertices of the meshes, of shape :math:`(\\text{batch_size}, \\text{num_vertices}, 3)`. faces (torch.LongTensor): the faces of the meshes...
[ "def", "face_areas", "(", "vertices", ",", "faces", ")", ":", "if", "faces", ".", "shape", "[", "-", "1", "]", "!=", "3", ":", "raise", "NotImplementedError", "(", "\"face_areas is only implemented for triangle meshes\"", ")", "faces_0", ",", "faces_1", ",", "...
https://github.com/NVIDIAGameWorks/kaolin/blob/e5148d05e9c1e2ce92a07881ce3593b1c5c3f166/kaolin/ops/mesh/trianglemesh.py#L93-L117
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
wx/lib/agw/aui/dockart.py
python
AuiDefaultDockArt.DrawGripper
(self, dc, window, rect, pane)
Draws a gripper on the pane. :param `dc`: a :class:`DC` device context; :param `window`: an instance of :class:`Window`; :param Rect `rect`: the pane caption rectangle; :param `pane`: the pane for which the gripper is drawn.
Draws a gripper on the pane.
[ "Draws", "a", "gripper", "on", "the", "pane", "." ]
def DrawGripper(self, dc, window, rect, pane): """ Draws a gripper on the pane. :param `dc`: a :class:`DC` device context; :param `window`: an instance of :class:`Window`; :param Rect `rect`: the pane caption rectangle; :param `pane`: the pane for which the gripper is dr...
[ "def", "DrawGripper", "(", "self", ",", "dc", ",", "window", ",", "rect", ",", "pane", ")", ":", "dc", ".", "SetPen", "(", "wx", ".", "TRANSPARENT_PEN", ")", "dc", ".", "SetBrush", "(", "self", ".", "_gripper_brush", ")", "dc", ".", "DrawRectangle", ...
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/wx/lib/agw/aui/dockart.py#L636-L680
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
wx/lib/agw/ultimatelistctrl.py
python
UltimateListMainWindow.GetNextActiveItem
(self, item, down=True)
Returns the next active item. Used Internally at present. :param `item`: an instance of :class:`UltimateListItem`; :param `down`: ``True`` to search downwards for an active item, ``False`` to search upwards.
Returns the next active item. Used Internally at present.
[ "Returns", "the", "next", "active", "item", ".", "Used", "Internally", "at", "present", "." ]
def GetNextActiveItem(self, item, down=True): """ Returns the next active item. Used Internally at present. :param `item`: an instance of :class:`UltimateListItem`; :param `down`: ``True`` to search downwards for an active item, ``False`` to search upwards. """ ...
[ "def", "GetNextActiveItem", "(", "self", ",", "item", ",", "down", "=", "True", ")", ":", "count", "=", "self", ".", "GetItemCount", "(", ")", "initialItem", "=", "item", "while", "1", ":", "if", "item", ">=", "count", "or", "item", "<", "0", ":", ...
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/wx/lib/agw/ultimatelistctrl.py#L7956-L7977
hanpfei/chromium-net
392cc1fa3a8f92f42e4071ab6e674d8e0482f83f
third_party/catapult/third_party/gsutil/third_party/boto/boto/sdb/db/sequence.py
python
Sequence.__init__
(self, id=None, domain_name=None, fnc=increment_by_one, init_val=None)
Create a new Sequence, using an optional function to increment to the next number, by default we just increment by one. Every parameter here is optional, if you don't specify any options then you'll get a new SequenceGenerator with a random ID stored in the default domain that increments...
Create a new Sequence, using an optional function to increment to the next number, by default we just increment by one. Every parameter here is optional, if you don't specify any options then you'll get a new SequenceGenerator with a random ID stored in the default domain that increments...
[ "Create", "a", "new", "Sequence", "using", "an", "optional", "function", "to", "increment", "to", "the", "next", "number", "by", "default", "we", "just", "increment", "by", "one", ".", "Every", "parameter", "here", "is", "optional", "if", "you", "don", "t"...
def __init__(self, id=None, domain_name=None, fnc=increment_by_one, init_val=None): """Create a new Sequence, using an optional function to increment to the next number, by default we just increment by one. Every parameter here is optional, if you don't specify any options then you'll ge...
[ "def", "__init__", "(", "self", ",", "id", "=", "None", ",", "domain_name", "=", "None", ",", "fnc", "=", "increment_by_one", ",", "init_val", "=", "None", ")", ":", "self", ".", "_db", "=", "None", "self", ".", "_value", "=", "None", "self", ".", ...
https://github.com/hanpfei/chromium-net/blob/392cc1fa3a8f92f42e4071ab6e674d8e0482f83f/third_party/catapult/third_party/gsutil/third_party/boto/boto/sdb/db/sequence.py#L108-L154