sequence stringlengths 546 16.2k | code stringlengths 108 19.3k |
|---|---|
0, module; 0, 1; 1, function_definition; 1, 2; 1, 3; 1, 6; 2, function_name:title_from_rdf; 3, parameters; 3, 4; 3, 5; 4, identifier:rdf; 5, identifier:url; 6, block; 6, 7; 6, 9; 6, 19; 6, 24; 6, 50; 6, 63; 6, 71; 7, expression_statement; 7, 8; 8, string:'''
Try to extract a distribution title from a property.
... | def title_from_rdf(rdf, url):
'''
Try to extract a distribution title from a property.
As it's not a mandatory property,
it fallback on building a title from the URL
then the format and in last ressort a generic resource name.
'''
title = rdf_value(rdf, DCT.title)
if title:
retur... |
0, module; 0, 1; 1, function_definition; 1, 2; 1, 3; 1, 9; 2, function_name:sort; 3, parameters; 3, 4; 3, 5; 3, 6; 4, identifier:self; 5, identifier:by; 6, default_parameter; 6, 7; 6, 8; 7, identifier:desc; 8, False; 9, block; 9, 10; 9, 12; 9, 33; 9, 49; 10, expression_statement; 10, 11; 11, comment; 12, if_statement; ... | def sort(self, by, desc=False):
"""Sorts by given property or function, ascending or descending order.
Parameters
----------
by : str or callable
If string, property by which to sort.
If callable, it should receive a GeoFeature a return a value by which to sort.
... |
0, module; 0, 1; 1, function_definition; 1, 2; 1, 3; 1, 7; 1, 8; 2, function_name:shellc; 3, parameters; 3, 4; 3, 5; 3, 6; 4, identifier:ndim; 5, identifier:lenvals; 6, identifier:array; 7, comment; 8, block; 8, 9; 8, 11; 8, 26; 8, 35; 8, 44; 8, 58; 9, expression_statement; 9, 10; 10, comment; 11, expression_statement;... | def shellc(ndim, lenvals, array):
# This works! looks like this is a mutable 2d char array
"""
Sort an array of character strings according to the ASCII
collating sequence using the Shell Sort algorithm.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/shellc_c.html
:param ndim: Dimensi... |
0, module; 0, 1; 1, function_definition; 1, 2; 1, 3; 1, 6; 1, 7; 2, function_name:shelld; 3, parameters; 3, 4; 3, 5; 4, identifier:ndim; 5, identifier:array; 6, comment; 7, block; 7, 8; 7, 10; 7, 19; 7, 28; 7, 49; 8, expression_statement; 8, 9; 9, comment; 10, expression_statement; 10, 11; 11, assignment; 11, 12; 11, 1... | def shelld(ndim, array):
# Works!, use this as example for "I/O" parameters
"""
Sort a double precision array using the Shell Sort algorithm.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/shelld_c.html
:param ndim: Dimension of the array.
:type ndim: int
:param array: The array t... |
0, module; 0, 1; 1, function_definition; 1, 2; 1, 3; 1, 6; 1, 7; 2, function_name:shelli; 3, parameters; 3, 4; 3, 5; 4, identifier:ndim; 5, identifier:array; 6, comment; 7, block; 7, 8; 7, 10; 7, 19; 7, 28; 7, 49; 8, expression_statement; 8, 9; 9, comment; 10, expression_statement; 10, 11; 11, assignment; 11, 12; 11, 1... | def shelli(ndim, array):
# Works!, use this as example for "I/O" parameters
"""
Sort an integer array using the Shell Sort algorithm.
http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/shelli_c.html
:param ndim: Dimension of the array.
:type ndim: int
:param array: The array to be sor... |
0, module; 0, 1; 1, function_definition; 1, 2; 1, 3; 1, 16; 2, function_name:make_retrieveParameters; 3, parameters; 3, 4; 3, 7; 3, 10; 3, 13; 4, default_parameter; 4, 5; 4, 6; 5, identifier:offset; 6, integer:1; 7, default_parameter; 7, 8; 7, 9; 8, identifier:count; 9, integer:100; 10, default_parameter; 10, 11; 10, 1... | def make_retrieveParameters(offset=1, count=100, name='RS', sort='D'):
"""Create retrieve parameters dictionary to be used with APIs.
:count: Number of records to display in the result. Cannot be less than
0 and cannot be greater than 100. If count is 0 then only the
sum... |
0, module; 0, 1; 1, function_definition; 1, 2; 1, 3; 1, 5; 2, function_name:sorted_names; 3, parameters; 3, 4; 4, identifier:names; 5, block; 5, 6; 5, 8; 5, 15; 5, 19; 5, 35; 5, 42; 5, 52; 6, expression_statement; 6, 7; 7, comment; 8, expression_statement; 8, 9; 9, assignment; 9, 10; 9, 11; 10, identifier:names; 11, ca... | def sorted_names(names):
"""
Sort a list of names but keep the word 'default' first if it's there.
"""
names = list(names)
have_default = False
if 'default' in names:
names.remove('default')
have_default = True
sorted_names = sorted(names)
if have_default:
sort... |
0, module; 0, 1; 1, function_definition; 1, 2; 1, 3; 1, 22; 2, function_name:getArticles; 3, parameters; 3, 4; 3, 5; 3, 8; 3, 11; 3, 14; 3, 17; 4, identifier:self; 5, default_parameter; 5, 6; 5, 7; 6, identifier:page; 7, integer:1; 8, default_parameter; 8, 9; 8, 10; 9, identifier:count; 10, integer:100; 11, default_par... | def getArticles(self,
page=1,
count=100,
sortBy = "rel",
sortByAsc = False,
returnInfo=ReturnInfo()):
"""
return a list of articles that match the topic page
@param page: which page of the results to return (default:... |
0, module; 0, 1; 1, function_definition; 1, 2; 1, 3; 1, 33; 2, function_name:pprint; 3, parameters; 3, 4; 3, 5; 3, 8; 3, 11; 3, 14; 3, 17; 3, 18; 3, 21; 3, 24; 3, 27; 3, 30; 4, identifier:object; 5, default_parameter; 5, 6; 5, 7; 6, identifier:stream; 7, identifier:_UNSET_SENTINEL; 8, default_parameter; 8, 9; 8, 10; 9,... | def pprint(
object,
stream=_UNSET_SENTINEL,
indent=_UNSET_SENTINEL,
width=_UNSET_SENTINEL,
depth=_UNSET_SENTINEL,
*,
compact=False,
ribbon_width=_UNSET_SENTINEL,
max_seq_len=_UNSET_SENTINEL,
sort_dict_keys=_UNSET_SENTINEL,
end='\n'
):
"""Pretty print a Python value ``obje... |
0, module; 0, 1; 1, function_definition; 1, 2; 1, 3; 1, 36; 2, function_name:cpprint; 3, parameters; 3, 4; 3, 5; 3, 8; 3, 11; 3, 14; 3, 17; 3, 18; 3, 21; 3, 24; 3, 27; 3, 30; 3, 33; 4, identifier:object; 5, default_parameter; 5, 6; 5, 7; 6, identifier:stream; 7, identifier:_UNSET_SENTINEL; 8, default_parameter; 8, 9; 8... | def cpprint(
object,
stream=_UNSET_SENTINEL,
indent=_UNSET_SENTINEL,
width=_UNSET_SENTINEL,
depth=_UNSET_SENTINEL,
*,
compact=False,
ribbon_width=_UNSET_SENTINEL,
max_seq_len=_UNSET_SENTINEL,
sort_dict_keys=_UNSET_SENTINEL,
style=None,
end='\n'
):
"""Pretty print a Py... |
0, module; 0, 1; 1, function_definition; 1, 2; 1, 3; 1, 6; 2, function_name:_encrypted_data_keys_hash; 3, parameters; 3, 4; 3, 5; 4, identifier:hasher; 5, identifier:encrypted_data_keys; 6, block; 6, 7; 6, 9; 6, 13; 6, 50; 7, expression_statement; 7, 8; 8, comment; 9, expression_statement; 9, 10; 10, assignment; 10, 11... | def _encrypted_data_keys_hash(hasher, encrypted_data_keys):
"""Generates the expected hash for the provided encrypted data keys.
:param hasher: Existing hasher to use
:type hasher: cryptography.hazmat.primitives.hashes.Hash
:param iterable encrypted_data_keys: Encrypted data keys to hash
:returns: ... |
0, module; 0, 1; 1, function_definition; 1, 2; 1, 3; 1, 6; 2, function_name:getOverlaySortOrder; 3, parameters; 3, 4; 3, 5; 4, identifier:self; 5, identifier:ulOverlayHandle; 6, block; 6, 7; 6, 9; 6, 17; 6, 23; 6, 34; 7, expression_statement; 7, 8; 8, comment; 9, expression_statement; 9, 10; 10, assignment; 10, 11; 10,... | def getOverlaySortOrder(self, ulOverlayHandle):
"""Gets the sort order of the overlay. See SetOverlaySortOrder for how this works."""
fn = self.function_table.getOverlaySortOrder
punSortOrder = c_uint32()
result = fn(ulOverlayHandle, byref(punSortOrder))
return result, punSortOr... |
0, module; 0, 1; 1, function_definition; 1, 2; 1, 3; 1, 5; 2, function_name:naturalize_string; 3, parameters; 3, 4; 4, identifier:key; 5, block; 5, 6; 5, 8; 6, expression_statement; 6, 7; 7, comment; 8, return_statement; 8, 9; 9, list_comprehension; 9, 10; 9, 25; 10, conditional_expression:if; 10, 11; 10, 15; 10, 20; 1... | def naturalize_string(key):
"""Analyzes string in a human way to enable natural sort
:param nodename: The node name to analyze
:returns: A structure that can be consumed by 'sorted'
"""
return [int(text) if text.isdigit() else text.lower()
for text in re.split(numregex, key)] |
0, module; 0, 1; 1, function_definition; 1, 2; 1, 3; 1, 6; 2, function_name:_get_rows; 3, parameters; 3, 4; 3, 5; 4, identifier:self; 5, identifier:options; 6, block; 6, 7; 6, 9; 6, 47; 6, 48; 6, 110; 6, 111; 6, 130; 7, expression_statement; 7, 8; 8, comment; 9, if_statement; 9, 10; 9, 13; 9, 34; 10, subscript; 10, 11;... | def _get_rows(self, options):
"""Return only those data rows that should be printed, based on slicing and sorting.
Arguments:
options - dictionary of option settings."""
if options["oldsortslice"]:
rows = copy.deepcopy(self._rows[options["start"]:options["end"]])
e... |
0, module; 0, 1; 1, function_definition; 1, 2; 1, 3; 1, 6; 2, function_name:_resolve_sort_by; 3, parameters; 3, 4; 3, 5; 4, identifier:sort_by; 5, identifier:flag_radius_query; 6, block; 6, 7; 6, 9; 6, 81; 7, expression_statement; 7, 8; 8, comment; 9, if_statement; 9, 10; 9, 13; 9, 21; 9, 73; 10, comparison_operator:is... | def _resolve_sort_by(sort_by, flag_radius_query):
"""
Result ``sort_by`` argument.
:param sort_by: str, or sqlalchemy ORM attribute.
:param flag_radius_query:
:return:
"""
if sort_by is None:
if flag_radius_query:
sort_by = SORT_BY_DIS... |
0, module; 0, 1; 1, function_definition; 1, 2; 1, 3; 1, 5; 2, function_name:getOPOrUserServices; 3, parameters; 3, 4; 4, identifier:openid_services; 5, block; 5, 6; 5, 8; 5, 17; 5, 27; 6, expression_statement; 6, 7; 7, comment; 8, expression_statement; 8, 9; 9, assignment; 9, 10; 9, 11; 10, identifier:op_services; 11, ... | def getOPOrUserServices(openid_services):
"""Extract OP Identifier services. If none found, return the
rest, sorted with most preferred first according to
OpenIDServiceEndpoint.openid_type_uris.
openid_services is a list of OpenIDServiceEndpoint objects.
Returns a list of OpenIDServiceEndpoint ob... |
0, module; 0, 1; 1, function_definition; 1, 2; 1, 3; 1, 9; 2, function_name:AdvSearch; 3, parameters; 3, 4; 3, 5; 3, 6; 4, identifier:document; 5, identifier:search; 6, default_parameter; 6, 7; 6, 8; 7, identifier:bs; 8, integer:3; 9, block; 9, 10; 9, 12; 9, 13; 9, 22; 9, 26; 9, 27; 9, 28; 9, 32; 9, 185; 10, expression... | def AdvSearch(document, search, bs=3):
'''Return set of all regex matches
This is an advanced version of python-docx.search() that takes into
account blocks of <bs> elements at a time.
What it does:
It searches the entire document body for text blocks.
Since the text to search could be spawned... |
0, module; 0, 1; 1, function_definition; 1, 2; 1, 3; 1, 4; 2, function_name:get_project_files; 3, parameters; 4, block; 4, 5; 4, 7; 4, 16; 4, 20; 4, 79; 5, expression_statement; 5, 6; 6, comment; 7, if_statement; 7, 8; 7, 11; 8, call; 8, 9; 8, 10; 9, identifier:is_git_project; 10, argument_list; 11, block; 11, 12; 12, ... | def get_project_files():
"""Retrieve a list of project files, ignoring hidden files.
:return: sorted list of project files
:rtype: :class:`list`
"""
if is_git_project():
return get_git_project_files()
project_files = []
for top, subdirs, files in os.walk('.'):
for subdir in... |
0, module; 0, 1; 1, function_definition; 1, 2; 1, 3; 1, 5; 2, function_name:_validate_path; 3, parameters; 3, 4; 4, identifier:path; 5, block; 5, 6; 5, 8; 5, 15; 5, 33; 5, 47; 6, expression_statement; 6, 7; 7, comment; 8, if_statement; 8, 9; 8, 12; 9, comparison_operator:is; 9, 10; 9, 11; 10, identifier:path; 11, None;... | def _validate_path(path):
"""Sorts path values from largest to smallest.
Will warn if path parameter was not already sorted.
"""
if path is None:
return None
new_path = np.array(sorted(set(path), reverse=True))
if new_path[0] != path[0]:
print("Warning: Path must be sorted larg... |
0, module; 0, 1; 1, function_definition; 1, 2; 1, 3; 1, 5; 2, function_name:count; 3, parameters; 3, 4; 4, identifier:self; 5, block; 5, 6; 5, 8; 5, 17; 5, 26; 5, 32; 5, 57; 6, expression_statement; 6, 7; 7, comment; 8, expression_statement; 8, 9; 9, assignment; 9, 10; 9, 11; 10, identifier:request_params; 11, call; 11... | def count(self):
"""
This method retrieve the total of records resulting from a given query.
This attribute can be used compounded with query, filter,
sort, order and facet methods.
Examples:
>>> from crossref.restful import Works
>>> Works().query('zika... |
0, module; 0, 1; 1, function_definition; 1, 2; 1, 3; 1, 5; 2, function_name:url; 3, parameters; 3, 4; 4, identifier:self; 5, block; 5, 6; 5, 8; 5, 16; 5, 35; 5, 54; 6, expression_statement; 6, 7; 7, comment; 8, expression_statement; 8, 9; 9, assignment; 9, 10; 9, 11; 10, identifier:request_params; 11, call; 11, 12; 11,... | def url(self):
"""
This attribute retrieve the url that will be used as a HTTP request to
the Crossref API.
This attribute can be used compounded with query, filter,
sort, order and facet methods.
Examples:
>>> from crossref.restful import Works
... |
0, module; 0, 1; 1, function_definition; 1, 2; 1, 3; 1, 6; 2, function_name:sortByNamespacePrefix; 3, parameters; 3, 4; 3, 5; 4, identifier:urisList; 5, identifier:nsList; 6, block; 6, 7; 6, 9; 6, 13; 6, 20; 6, 55; 6, 56; 6, 70; 7, expression_statement; 7, 8; 8, comment; 9, expression_statement; 9, 10; 10, assignment; ... | def sortByNamespacePrefix(urisList, nsList):
"""
Given an ordered list of namespaces prefixes, order a list of uris based on that.
Eg
In [7]: ll
Out[7]:
[rdflib.term.URIRef(u'http://www.w3.org/1999/02/22-rdf-syntax-ns#type'),
rdflib.term.URIRef(u'printGenericTreeorg... |
0, module; 0, 1; 1, function_definition; 1, 2; 1, 3; 1, 8; 2, function_name:sort_uri_list_by_name; 3, parameters; 3, 4; 3, 5; 4, identifier:uri_list; 5, default_parameter; 5, 6; 5, 7; 6, identifier:bypassNamespace; 7, False; 8, block; 8, 9; 8, 11; 8, 45; 9, expression_statement; 9, 10; 10, comment; 11, function_definit... | def sort_uri_list_by_name(uri_list, bypassNamespace=False):
"""
Sorts a list of uris
bypassNamespace:
based on the last bit (usually the name after the namespace) of a uri
It checks whether the last bit is specified using a # or just a /, eg:
rdflib.URIRef('http://purl.org/on... |
0, module; 0, 1; 1, function_definition; 1, 2; 1, 3; 1, 6; 2, function_name:try_sort_fmt_opts; 3, parameters; 3, 4; 3, 5; 4, identifier:rdf_format_opts_list; 5, identifier:uri; 6, block; 6, 7; 6, 9; 6, 22; 6, 23; 7, expression_statement; 7, 8; 8, comment; 9, expression_statement; 9, 10; 10, assignment; 10, 11; 10, 14; ... | def try_sort_fmt_opts(rdf_format_opts_list, uri):
"""reorder fmt options based on uri file type suffix - if available - so to test most likely serialization first when parsing some RDF
NOTE this is not very nice as it is hardcoded and assumes the origin serializations to be this: ['turtle', 'xml', 'n3', 'nt',... |
0, module; 0, 1; 1, function_definition; 1, 2; 1, 3; 1, 5; 2, function_name:collect_results; 3, parameters; 3, 4; 4, identifier:working_folder; 5, block; 5, 6; 5, 8; 5, 12; 5, 19; 5, 25; 5, 107; 6, expression_statement; 6, 7; 7, comment; 8, expression_statement; 8, 9; 9, assignment; 9, 10; 9, 11; 10, identifier:results... | def collect_results(working_folder):
"""
Collect results in a working_folder.
The output is nested dict[rec_name][sorter_name] of SortingExtrator.
"""
results = {}
working_folder = Path(working_folder)
output_folders = working_folder/'output_folders'
for rec_name in os.listdir(output... |
0, module; 0, 1; 1, function_definition; 1, 2; 1, 3; 1, 23; 2, function_name:run_sorter; 3, parameters; 3, 4; 3, 5; 3, 6; 3, 9; 3, 12; 3, 15; 3, 18; 3, 21; 4, identifier:sorter_name_or_class; 5, identifier:recording; 6, default_parameter; 6, 7; 6, 8; 7, identifier:output_folder; 8, None; 9, default_parameter; 9, 10; 9,... | def run_sorter(sorter_name_or_class, recording, output_folder=None, delete_output_folder=False,
grouping_property=None, parallel=False, debug=False, **params):
"""
Generic function to run a sorter via function approach.
2 Usage with name or class:
by name:
>>> sorting = run_sorte... |
0, module; 0, 1; 1, function_definition; 1, 2; 1, 3; 1, 11; 2, function_name:compute_performance; 3, parameters; 3, 4; 3, 5; 3, 8; 4, identifier:SC; 5, default_parameter; 5, 6; 5, 7; 6, identifier:verbose; 7, True; 8, default_parameter; 8, 9; 8, 10; 9, identifier:output; 10, string:'dict'; 11, block; 11, 12; 11, 14; 11... | def compute_performance(SC, verbose=True, output='dict'):
"""
Return some performance value for comparison.
Parameters
-------
SC: SortingComparison instance
The SortingComparison
verbose: bool
Display on console or not
output: dict or pandas
Returns
----------
... |
0, module; 0, 1; 1, function_definition; 1, 2; 1, 3; 1, 12; 2, function_name:add_color_stop_rgba; 3, parameters; 3, 4; 3, 5; 3, 6; 3, 7; 3, 8; 3, 9; 4, identifier:self; 5, identifier:offset; 6, identifier:red; 7, identifier:green; 8, identifier:blue; 9, default_parameter; 9, 10; 9, 11; 10, identifier:alpha; 11, integer... | def add_color_stop_rgba(self, offset, red, green, blue, alpha=1):
"""Adds a translucent color stop to a gradient pattern.
The offset specifies the location along the gradient's control vector.
For example,
a linear gradient's control vector is from (x0,y0) to (x1,y1)
while a rad... |
0, module; 0, 1; 1, function_definition; 1, 2; 1, 3; 1, 27; 2, function_name:get_all; 3, parameters; 3, 4; 3, 5; 3, 8; 3, 12; 3, 15; 3, 18; 3, 21; 3, 24; 4, identifier:self; 5, default_parameter; 5, 6; 5, 7; 6, identifier:start; 7, integer:0; 8, default_parameter; 8, 9; 8, 10; 9, identifier:count; 10, unary_operator:-;... | def get_all(self, start=0, count=-1, filter='', fields='', query='', sort='', view=''):
"""
Gets a list of Deployment Servers based on optional sorting and filtering, and constrained by start and count
parameters.
Args:
start:
The first item to return, using ... |
0, module; 0, 1; 1, function_definition; 1, 2; 1, 3; 1, 27; 2, function_name:get_appliances; 3, parameters; 3, 4; 3, 5; 3, 8; 3, 12; 3, 15; 3, 18; 3, 21; 3, 24; 4, identifier:self; 5, default_parameter; 5, 6; 5, 7; 6, identifier:start; 7, integer:0; 8, default_parameter; 8, 9; 8, 10; 9, identifier:count; 10, unary_oper... | def get_appliances(self, start=0, count=-1, filter='', fields='', query='', sort='', view=''):
"""
Gets a list of all the Image Streamer resources based on optional sorting and filtering, and constrained
by start and count parameters.
Args:
start:
The first i... |
0, module; 0, 1; 1, function_definition; 1, 2; 1, 3; 1, 15; 2, function_name:get_all; 3, parameters; 3, 4; 3, 5; 3, 8; 3, 12; 4, identifier:self; 5, default_parameter; 5, 6; 5, 7; 6, identifier:start; 7, integer:0; 8, default_parameter; 8, 9; 8, 10; 9, identifier:count; 10, unary_operator:-; 10, 11; 11, integer:1; 12, ... | def get_all(self, start=0, count=-1, sort=''):
"""
Gets a list of logical interconnects based on optional sorting and filtering and is constrained by start
and count parameters.
Args:
start:
The first item to return, using 0-based indexing.
If... |
0, module; 0, 1; 1, function_definition; 1, 2; 1, 3; 1, 18; 2, function_name:get_endpoints; 3, parameters; 3, 4; 3, 5; 3, 8; 3, 12; 3, 15; 4, identifier:self; 5, default_parameter; 5, 6; 5, 7; 6, identifier:start; 7, integer:0; 8, default_parameter; 8, 9; 8, 10; 9, identifier:count; 10, unary_operator:-; 10, 11; 11, in... | def get_endpoints(self, start=0, count=-1, filter='', sort=''):
"""
Gets a list of endpoints in a SAN.
Args:
start:
The first item to return, using 0-based indexing.
If not specified, the default is 0 - start with the first available item.
... |
0, module; 0, 1; 1, function_definition; 1, 2; 1, 3; 1, 8; 2, function_name:__findFirstMissing; 3, parameters; 3, 4; 3, 5; 3, 6; 3, 7; 4, identifier:self; 5, identifier:array; 6, identifier:start; 7, identifier:end; 8, block; 8, 9; 8, 11; 8, 21; 8, 31; 8, 43; 8, 62; 9, expression_statement; 9, 10; 10, comment; 11, if_s... | def __findFirstMissing(self, array, start, end):
"""
Find the smallest elements missing in a sorted array.
Returns:
int: The smallest element missing.
"""
if (start > end):
return end + 1
if (start != array[start]):
return start
... |
0, module; 0, 1; 1, function_definition; 1, 2; 1, 3; 1, 30; 2, function_name:get_reachable_storage_pools; 3, parameters; 3, 4; 3, 5; 3, 8; 3, 12; 3, 15; 3, 18; 3, 21; 3, 24; 3, 27; 4, identifier:self; 5, default_parameter; 5, 6; 5, 7; 6, identifier:start; 7, integer:0; 8, default_parameter; 8, 9; 8, 10; 9, identifier:c... | def get_reachable_storage_pools(self, start=0, count=-1, filter='', query='', sort='',
networks=None, scope_exclusions=None, scope_uris=''):
"""
Gets the storage pools that are connected on the specified networks
based on the storage system port's expected net... |
0, module; 0, 1; 1, function_definition; 1, 2; 1, 3; 1, 19; 2, function_name:get_snapshots; 3, parameters; 3, 4; 3, 5; 3, 6; 3, 9; 3, 13; 3, 16; 4, identifier:self; 5, identifier:volume_id_or_uri; 6, default_parameter; 6, 7; 6, 8; 7, identifier:start; 8, integer:0; 9, default_parameter; 9, 10; 9, 11; 10, identifier:cou... | def get_snapshots(self, volume_id_or_uri, start=0, count=-1, filter='', sort=''):
"""
Gets all snapshots of a volume. Returns a list of snapshots based on optional sorting and filtering, and
constrained by start and count parameters.
Args:
volume_id_or_uri:
C... |
0, module; 0, 1; 1, function_definition; 1, 2; 1, 3; 1, 18; 2, function_name:get_extra_managed_storage_volume_paths; 3, parameters; 3, 4; 3, 5; 3, 8; 3, 12; 3, 15; 4, identifier:self; 5, default_parameter; 5, 6; 5, 7; 6, identifier:start; 7, integer:0; 8, default_parameter; 8, 9; 8, 10; 9, identifier:count; 10, unary_o... | def get_extra_managed_storage_volume_paths(self, start=0, count=-1, filter='', sort=''):
"""
Gets the list of extra managed storage volume paths.
Args:
start:
The first item to return, using 0-based indexing.
If not specified, the default is 0 - start... |
0, module; 0, 1; 1, function_definition; 1, 2; 1, 3; 1, 27; 2, function_name:get_attachable_volumes; 3, parameters; 3, 4; 3, 5; 3, 8; 3, 12; 3, 15; 3, 18; 3, 21; 3, 24; 4, identifier:self; 5, default_parameter; 5, 6; 5, 7; 6, identifier:start; 7, integer:0; 8, default_parameter; 8, 9; 8, 10; 9, identifier:count; 10, un... | def get_attachable_volumes(self, start=0, count=-1, filter='', query='', sort='', scope_uris='', connections=''):
"""
Gets the volumes that are connected on the specified networks based on the storage system port's expected
network connectivity.
A volume is attachable if it satisfies ei... |
0, module; 0, 1; 1, function_definition; 1, 2; 1, 3; 1, 20; 2, function_name:get_available_storage_systems; 3, parameters; 3, 4; 3, 5; 3, 8; 3, 12; 3, 15; 3, 18; 4, identifier:self; 5, default_parameter; 5, 6; 5, 7; 6, identifier:start; 7, integer:0; 8, default_parameter; 8, 9; 8, 10; 9, identifier:count; 10, unary_ope... | def get_available_storage_systems(self, start=0, count=-1, filter='', sort='', **kwargs):
"""
Retrieves the list of the storage systems and their associated volumes available to the server profile
based on the given server hardware type and enclosure group.
Args:
count:
... |
0, module; 0, 1; 1, function_definition; 1, 2; 1, 3; 1, 33; 2, function_name:build_query_uri; 3, parameters; 3, 4; 3, 5; 3, 8; 3, 11; 3, 15; 3, 18; 3, 21; 3, 24; 3, 27; 3, 30; 4, identifier:self; 5, default_parameter; 5, 6; 5, 7; 6, identifier:uri; 7, None; 8, default_parameter; 8, 9; 8, 10; 9, identifier:start; 10, in... | def build_query_uri(self, uri=None, start=0, count=-1, filter='', query='', sort='', view='', fields='', scope_uris=''):
"""Builds the URI from given parameters.
More than one request can be send to get the items, regardless the query parameter 'count', because the actual
number of items in the... |
0, module; 0, 1; 1, function_definition; 1, 2; 1, 3; 1, 33; 2, function_name:build_query_uri; 3, parameters; 3, 4; 3, 5; 3, 8; 3, 12; 3, 15; 3, 18; 3, 21; 3, 24; 3, 27; 3, 30; 4, identifier:self; 5, default_parameter; 5, 6; 5, 7; 6, identifier:start; 7, integer:0; 8, default_parameter; 8, 9; 8, 10; 9, identifier:count;... | def build_query_uri(self, start=0, count=-1, filter='', query='', sort='', view='', fields='', uri=None, scope_uris=''):
"""
Builds the URI given the parameters.
More than one request can be send to get the items, regardless the query parameter 'count', because the actual
number of item... |
0, module; 0, 1; 1, function_definition; 1, 2; 1, 3; 1, 18; 2, function_name:get_all_without_ethernet; 3, parameters; 3, 4; 3, 5; 3, 8; 3, 12; 3, 15; 4, identifier:self; 5, default_parameter; 5, 6; 5, 7; 6, identifier:start; 7, integer:0; 8, default_parameter; 8, 9; 8, 10; 9, identifier:count; 10, unary_operator:-; 10,... | def get_all_without_ethernet(self, start=0, count=-1, filter='', sort=''):
"""
Gets a paginated collection of logical downlinks without ethernet. The collection is
based on optional sorting and filtering and is constrained by start and count parameters.
Args:
start:
... |
0, module; 0, 1; 1, function_definition; 1, 2; 1, 3; 1, 11; 2, function_name:reduce_sort; 3, parameters; 3, 4; 3, 5; 3, 8; 4, identifier:self; 5, default_parameter; 5, 6; 5, 7; 6, identifier:js_cmp; 7, None; 8, default_parameter; 8, 9; 8, 10; 9, identifier:options; 10, None; 11, block; 11, 12; 11, 14; 11, 25; 11, 34; 1... | def reduce_sort(self, js_cmp=None, options=None):
"""
Adds the Javascript built-in ``Riak.reduceSort`` to the query
as a reduce phase.
:param js_cmp: A Javascript comparator function as specified by
Array.sort()
:type js_cmp: string
:param options: phase option... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.