nodes stringlengths 501 22.4k | edges stringlengths 138 5.07k | code stringlengths 108 19.3k |
|---|---|---|
0, module; 1, function_definition; 2, function_name:title_from_rdf; 3, parameters; 4, block; 5, identifier:rdf; 6, identifier:url; 7, expression_statement; 8, expression_statement; 9, if_statement; 10, if_statement; 11, expression_statement; 12, expression_statement; 13, with_statement; 14, string; 15, assignment; 16, ... | 0, 1; 1, 2; 1, 3; 1, 4; 3, 5; 3, 6; 4, 7; 4, 8; 4, 9; 4, 10; 4, 11; 4, 12; 4, 13; 7, 14; 8, 15; 9, 16; 9, 17; 10, 18; 10, 19; 11, 20; 12, 21; 13, 22; 13, 23; 14, 24; 15, 25; 15, 26; 17, 27; 19, 28; 19, 29; 20, 30; 20, 31; 21, 32; 21, 33; 22, 34; 23, 35; 26, 36; 26, 37; 27, 38; 28, 39; 29, 40; 29, 41; 31, 42; 31, 43; 33... | 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; 1, function_definition; 2, function_name:sort; 3, parameters; 4, block; 5, identifier:self; 6, identifier:by; 7, default_parameter; 8, expression_statement; 9, if_statement; 10, expression_statement; 11, return_statement; 12, identifier:desc; 13, False; 14, comment:"""Sorts by given property or function, asc... | 0, 1; 1, 2; 1, 3; 1, 4; 3, 5; 3, 6; 3, 7; 4, 8; 4, 9; 4, 10; 4, 11; 7, 12; 7, 13; 8, 14; 9, 15; 9, 16; 9, 17; 10, 18; 11, 19; 15, 20; 15, 21; 16, 22; 17, 23; 18, 24; 18, 25; 19, 26; 19, 27; 21, 28; 22, 29; 23, 30; 25, 31; 25, 32; 26, 33; 26, 34; 27, 35; 29, 36; 29, 37; 30, 38; 30, 39; 30, 40; 32, 41; 32, 42; 32, 43; 39... | 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; 1, function_definition; 2, function_name:shellc; 3, parameters; 4, comment:# This works! looks like this is a mutable 2d char array; 5, block; 6, identifier:ndim; 7, identifier:lenvals; 8, identifier:array; 9, expression_statement; 10, expression_statement; 11, expression_statement; 12, expression_statement;... | 0, 1; 1, 2; 1, 3; 1, 4; 1, 5; 3, 6; 3, 7; 3, 8; 5, 9; 5, 10; 5, 11; 5, 12; 5, 13; 5, 14; 9, 15; 10, 16; 11, 17; 12, 18; 13, 19; 14, 20; 16, 21; 16, 22; 17, 23; 17, 24; 18, 25; 18, 26; 19, 27; 19, 28; 20, 29; 20, 30; 22, 31; 22, 32; 24, 33; 24, 34; 26, 35; 26, 36; 27, 37; 27, 38; 28, 39; 28, 40; 28, 41; 29, 42; 29, 43; ... | 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; 1, function_definition; 2, function_name:shelld; 3, parameters; 4, comment:# Works!, use this as example for "I/O" parameters; 5, block; 6, identifier:ndim; 7, identifier:array; 8, expression_statement; 9, expression_statement; 10, expression_statement; 11, expression_statement; 12, return_statement; 13, com... | 0, 1; 1, 2; 1, 3; 1, 4; 1, 5; 3, 6; 3, 7; 5, 8; 5, 9; 5, 10; 5, 11; 5, 12; 8, 13; 9, 14; 10, 15; 11, 16; 12, 17; 14, 18; 14, 19; 15, 20; 15, 21; 16, 22; 16, 23; 17, 24; 17, 25; 19, 26; 19, 27; 21, 28; 21, 29; 22, 30; 22, 31; 23, 32; 23, 33; 24, 34; 24, 35; 25, 36; 26, 37; 26, 38; 27, 39; 28, 40; 28, 41; 29, 42; 33, 43;... | 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; 1, function_definition; 2, function_name:shelli; 3, parameters; 4, comment:# Works!, use this as example for "I/O" parameters; 5, block; 6, identifier:ndim; 7, identifier:array; 8, expression_statement; 9, expression_statement; 10, expression_statement; 11, expression_statement; 12, return_statement; 13, com... | 0, 1; 1, 2; 1, 3; 1, 4; 1, 5; 3, 6; 3, 7; 5, 8; 5, 9; 5, 10; 5, 11; 5, 12; 8, 13; 9, 14; 10, 15; 11, 16; 12, 17; 14, 18; 14, 19; 15, 20; 15, 21; 16, 22; 16, 23; 17, 24; 17, 25; 19, 26; 19, 27; 21, 28; 21, 29; 22, 30; 22, 31; 23, 32; 23, 33; 24, 34; 24, 35; 25, 36; 26, 37; 26, 38; 27, 39; 28, 40; 28, 41; 29, 42; 33, 43;... | 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; 1, function_definition; 2, function_name:make_retrieveParameters; 3, parameters; 4, block; 5, default_parameter; 6, default_parameter; 7, default_parameter; 8, default_parameter; 9, expression_statement; 10, return_statement; 11, identifier:offset; 12, integer:1; 13, identifier:count; 14, integer:100; 15, id... | 0, 1; 1, 2; 1, 3; 1, 4; 3, 5; 3, 6; 3, 7; 3, 8; 4, 9; 4, 10; 5, 11; 5, 12; 6, 13; 6, 14; 7, 15; 7, 16; 8, 17; 8, 18; 9, 19; 10, 20; 16, 21; 18, 22; 20, 23; 20, 24; 24, 25; 25, 26; 25, 27; 25, 28; 26, 29; 26, 30; 27, 31; 27, 32; 28, 33; 28, 34; 29, 35; 31, 36; 33, 37; 34, 38; 34, 39; 39, 40; 40, 41; 40, 42; 41, 43; 41, ... | 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; 1, function_definition; 2, function_name:sorted_names; 3, parameters; 4, block; 5, identifier:names; 6, expression_statement; 7, expression_statement; 8, expression_statement; 9, if_statement; 10, expression_statement; 11, if_statement; 12, return_statement; 13, comment:"""
Sort a list of names but keep ... | 0, 1; 1, 2; 1, 3; 1, 4; 3, 5; 4, 6; 4, 7; 4, 8; 4, 9; 4, 10; 4, 11; 4, 12; 6, 13; 7, 14; 8, 15; 9, 16; 9, 17; 10, 18; 11, 19; 11, 20; 12, 21; 14, 22; 14, 23; 15, 24; 15, 25; 16, 26; 16, 27; 17, 28; 17, 29; 18, 30; 18, 31; 20, 32; 23, 33; 23, 34; 26, 35; 28, 36; 29, 37; 31, 38; 31, 39; 32, 40; 34, 41; 36, 42; 36, 43; 37... | 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; 1, function_definition; 2, function_name:getArticles; 3, parameters; 4, block; 5, identifier:self; 6, default_parameter; 7, default_parameter; 8, default_parameter; 9, default_parameter; 10, default_parameter; 11, expression_statement; 12, assert_statement; 13, assert_statement; 14, expression_statement; 15,... | 0, 1; 1, 2; 1, 3; 1, 4; 3, 5; 3, 6; 3, 7; 3, 8; 3, 9; 3, 10; 4, 11; 4, 12; 4, 13; 4, 14; 4, 15; 4, 16; 6, 17; 6, 18; 7, 19; 7, 20; 8, 21; 8, 22; 9, 23; 9, 24; 10, 25; 10, 26; 11, 27; 12, 28; 13, 29; 14, 30; 15, 31; 16, 32; 26, 33; 26, 34; 28, 35; 28, 36; 29, 37; 29, 38; 30, 39; 30, 40; 31, 41; 31, 42; 32, 43; 32, 44; 4... | 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; 1, function_definition; 2, function_name:pprint; 3, parameters; 4, block; 5, identifier:object; 6, default_parameter; 7, default_parameter; 8, default_parameter; 9, default_parameter; 10, keyword_separator; 11, default_parameter; 12, default_parameter; 13, default_parameter; 14, default_parameter; 15, defaul... | 0, 1; 1, 2; 1, 3; 1, 4; 3, 5; 3, 6; 3, 7; 3, 8; 3, 9; 3, 10; 3, 11; 3, 12; 3, 13; 3, 14; 3, 15; 4, 16; 4, 17; 4, 18; 4, 19; 4, 20; 6, 21; 6, 22; 7, 23; 7, 24; 8, 25; 8, 26; 9, 27; 9, 28; 11, 29; 11, 30; 12, 31; 12, 32; 13, 33; 13, 34; 14, 35; 14, 36; 15, 37; 15, 38; 16, 39; 17, 40; 18, 41; 19, 42; 20, 43; 20, 44; 38, 4... | 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; 1, function_definition; 2, function_name:cpprint; 3, parameters; 4, block; 5, identifier:object; 6, default_parameter; 7, default_parameter; 8, default_parameter; 9, default_parameter; 10, keyword_separator; 11, default_parameter; 12, default_parameter; 13, default_parameter; 14, default_parameter; 15, defau... | 0, 1; 1, 2; 1, 3; 1, 4; 3, 5; 3, 6; 3, 7; 3, 8; 3, 9; 3, 10; 3, 11; 3, 12; 3, 13; 3, 14; 3, 15; 3, 16; 4, 17; 4, 18; 4, 19; 4, 20; 4, 21; 6, 22; 6, 23; 7, 24; 7, 25; 8, 26; 8, 27; 9, 28; 9, 29; 11, 30; 11, 31; 12, 32; 12, 33; 13, 34; 13, 35; 14, 36; 14, 37; 15, 38; 15, 39; 16, 40; 16, 41; 17, 42; 18, 43; 19, 44; 20, 45... | 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; 1, function_definition; 2, function_name:_encrypted_data_keys_hash; 3, parameters; 4, block; 5, identifier:hasher; 6, identifier:encrypted_data_keys; 7, expression_statement; 8, expression_statement; 9, for_statement; 10, return_statement; 11, comment:"""Generates the expected hash for the provided encrypted... | 0, 1; 1, 2; 1, 3; 1, 4; 3, 5; 3, 6; 4, 7; 4, 8; 4, 9; 4, 10; 7, 11; 8, 12; 9, 13; 9, 14; 9, 15; 10, 16; 12, 17; 12, 18; 15, 19; 15, 20; 15, 21; 15, 22; 16, 23; 16, 24; 19, 25; 20, 26; 21, 27; 22, 28; 23, 29; 23, 30; 24, 31; 25, 32; 25, 33; 26, 34; 26, 35; 27, 36; 27, 37; 28, 38; 28, 39; 31, 40; 31, 41; 33, 42; 33, 43; ... | 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; 1, function_definition; 2, function_name:getOverlaySortOrder; 3, parameters; 4, block; 5, identifier:self; 6, identifier:ulOverlayHandle; 7, expression_statement; 8, expression_statement; 9, expression_statement; 10, expression_statement; 11, return_statement; 12, comment:"""Gets the sort order of the overla... | 0, 1; 1, 2; 1, 3; 1, 4; 3, 5; 3, 6; 4, 7; 4, 8; 4, 9; 4, 10; 4, 11; 7, 12; 8, 13; 9, 14; 10, 15; 11, 16; 13, 17; 13, 18; 14, 19; 14, 20; 15, 21; 15, 22; 16, 23; 16, 24; 18, 25; 18, 26; 20, 27; 20, 28; 22, 29; 22, 30; 24, 31; 24, 32; 25, 33; 25, 34; 30, 35; 30, 36; 36, 37; 36, 38; 38, 39 | 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; 1, function_definition; 2, function_name:naturalize_string; 3, parameters; 4, block; 5, identifier:key; 6, expression_statement; 7, return_statement; 8, comment:"""Analyzes string in a human way to enable natural sort
:param nodename: The node name to analyze
:returns: A structure that can be consum... | 0, 1; 1, 2; 1, 3; 1, 4; 3, 5; 4, 6; 4, 7; 6, 8; 7, 9; 9, 10; 9, 11; 10, 12; 10, 13; 10, 14; 11, 15; 11, 16; 12, 17; 12, 18; 13, 19; 13, 20; 14, 21; 14, 22; 16, 23; 16, 24; 18, 25; 19, 26; 19, 27; 21, 28; 21, 29; 23, 30; 23, 31; 24, 32; 24, 33 | 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; 1, function_definition; 2, function_name:_get_rows; 3, parameters; 4, block; 5, identifier:self; 6, identifier:options; 7, expression_statement; 8, if_statement; 9, comment:# Sort; 10, if_statement; 11, comment:# Slice if necessary; 12, if_statement; 13, return_statement; 14, comment:"""Return only those dat... | 0, 1; 1, 2; 1, 3; 1, 4; 3, 5; 3, 6; 4, 7; 4, 8; 4, 9; 4, 10; 4, 11; 4, 12; 4, 13; 7, 14; 8, 15; 8, 16; 8, 17; 10, 18; 10, 19; 12, 20; 12, 21; 13, 22; 15, 23; 15, 24; 16, 25; 17, 26; 18, 27; 18, 28; 19, 29; 19, 30; 19, 31; 19, 32; 19, 33; 19, 34; 19, 35; 20, 36; 21, 37; 25, 38; 26, 39; 29, 40; 31, 41; 33, 42; 35, 43; 36... | 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; 1, function_definition; 2, function_name:_resolve_sort_by; 3, parameters; 4, block; 5, identifier:sort_by; 6, identifier:flag_radius_query; 7, expression_statement; 8, if_statement; 9, return_statement; 10, comment:"""
Result ``sort_by`` argument.
:param sort_by: str, or sqlalchemy ORM attri... | 0, 1; 1, 2; 1, 3; 1, 4; 3, 5; 3, 6; 4, 7; 4, 8; 4, 9; 7, 10; 8, 11; 8, 12; 8, 13; 8, 14; 9, 15; 11, 16; 11, 17; 12, 18; 13, 19; 13, 20; 14, 21; 18, 22; 18, 23; 19, 24; 19, 25; 20, 26; 21, 27; 23, 28; 25, 29; 25, 30; 26, 31; 26, 32; 26, 33; 27, 34; 28, 35; 31, 36; 31, 37; 32, 38; 32, 39; 33, 40; 33, 41; 34, 42; 34, 43; ... | 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; 1, function_definition; 2, function_name:getOPOrUserServices; 3, parameters; 4, block; 5, identifier:openid_services; 6, expression_statement; 7, expression_statement; 8, expression_statement; 9, return_statement; 10, comment:"""Extract OP Identifier services. If none found, return the
rest, sorted with... | 0, 1; 1, 2; 1, 3; 1, 4; 3, 5; 4, 6; 4, 7; 4, 8; 4, 9; 6, 10; 7, 11; 8, 12; 9, 13; 11, 14; 11, 15; 12, 16; 12, 17; 13, 18; 13, 19; 15, 20; 15, 21; 17, 22; 17, 23; 21, 24; 21, 25; 23, 26; 23, 27; 25, 28; 27, 29; 27, 30 | 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; 1, function_definition; 2, function_name:AdvSearch; 3, parameters; 4, block; 5, identifier:document; 6, identifier:search; 7, default_parameter; 8, expression_statement; 9, comment:# Compile the search regexp; 10, expression_statement; 11, expression_statement; 12, comment:# Will match against searchels. Sea... | 0, 1; 1, 2; 1, 3; 1, 4; 3, 5; 3, 6; 3, 7; 4, 8; 4, 9; 4, 10; 4, 11; 4, 12; 4, 13; 4, 14; 4, 15; 4, 16; 7, 17; 7, 18; 8, 19; 10, 20; 11, 21; 14, 22; 15, 23; 15, 24; 15, 25; 16, 26; 19, 27; 20, 28; 20, 29; 21, 30; 21, 31; 22, 32; 22, 33; 24, 34; 24, 35; 25, 36; 26, 37; 26, 38; 29, 39; 29, 40; 34, 41; 34, 42; 36, 43; 36, ... | 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; 1, function_definition; 2, function_name:get_project_files; 3, parameters; 4, block; 5, expression_statement; 6, if_statement; 7, expression_statement; 8, for_statement; 9, return_statement; 10, comment:"""Retrieve a list of project files, ignoring hidden files.
:return: sorted list of project files
... | 0, 1; 1, 2; 1, 3; 1, 4; 4, 5; 4, 6; 4, 7; 4, 8; 4, 9; 5, 10; 6, 11; 6, 12; 7, 13; 8, 14; 8, 15; 8, 16; 9, 17; 11, 18; 11, 19; 12, 20; 13, 21; 13, 22; 14, 23; 14, 24; 14, 25; 15, 26; 15, 27; 16, 28; 16, 29; 20, 30; 26, 31; 26, 32; 27, 33; 28, 34; 28, 35; 28, 36; 29, 37; 29, 38; 29, 39; 30, 40; 30, 41; 33, 42; 36, 43; 39... | 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; 1, function_definition; 2, function_name:_validate_path; 3, parameters; 4, block; 5, identifier:path; 6, expression_statement; 7, if_statement; 8, expression_statement; 9, if_statement; 10, return_statement; 11, comment:"""Sorts path values from largest to smallest.
Will warn if path parameter was not a... | 0, 1; 1, 2; 1, 3; 1, 4; 3, 5; 4, 6; 4, 7; 4, 8; 4, 9; 4, 10; 6, 11; 7, 12; 7, 13; 8, 14; 9, 15; 9, 16; 10, 17; 12, 18; 12, 19; 13, 20; 14, 21; 14, 22; 15, 23; 15, 24; 16, 25; 20, 26; 22, 27; 22, 28; 23, 29; 23, 30; 24, 31; 24, 32; 25, 33; 27, 34; 27, 35; 28, 36; 33, 37; 33, 38; 36, 39; 36, 40; 38, 41; 40, 42; 40, 43; 4... | 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; 1, function_definition; 2, function_name:count; 3, parameters; 4, block; 5, identifier:self; 6, expression_statement; 7, expression_statement; 8, expression_statement; 9, expression_statement; 10, expression_statement; 11, return_statement; 12, comment:"""
This method retrieve the total of records re... | 0, 1; 1, 2; 1, 3; 1, 4; 3, 5; 4, 6; 4, 7; 4, 8; 4, 9; 4, 10; 4, 11; 6, 12; 7, 13; 8, 14; 9, 15; 10, 16; 11, 17; 13, 18; 13, 19; 14, 20; 14, 21; 15, 22; 15, 23; 16, 24; 16, 25; 17, 26; 17, 27; 19, 28; 19, 29; 21, 30; 21, 31; 22, 32; 22, 33; 25, 34; 25, 35; 27, 36; 29, 37; 31, 38; 33, 39; 34, 40; 34, 41; 36, 42; 36, 43; ... | 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; 1, function_definition; 2, function_name:url; 3, parameters; 4, block; 5, identifier:self; 6, expression_statement; 7, expression_statement; 8, expression_statement; 9, expression_statement; 10, return_statement; 11, comment:"""
This attribute retrieve the url that will be used as a HTTP request to
... | 0, 1; 1, 2; 1, 3; 1, 4; 3, 5; 4, 6; 4, 7; 4, 8; 4, 9; 4, 10; 6, 11; 7, 12; 8, 13; 9, 14; 10, 15; 12, 16; 12, 17; 13, 18; 13, 19; 14, 20; 14, 21; 15, 22; 15, 23; 17, 24; 17, 25; 19, 26; 19, 27; 21, 28; 21, 29; 24, 30; 24, 31; 27, 32; 28, 33; 28, 34; 32, 35; 32, 36; 33, 37; 33, 38; 35, 39; 35, 40; 36, 41; 36, 42; 37, 43;... | 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; 1, function_definition; 2, function_name:sortByNamespacePrefix; 3, parameters; 4, block; 5, identifier:urisList; 6, identifier:nsList; 7, expression_statement; 8, expression_statement; 9, expression_statement; 10, for_statement; 11, comment:# add remaining uris (if any); 12, for_statement; 13, return_stateme... | 0, 1; 1, 2; 1, 3; 1, 4; 3, 5; 3, 6; 4, 7; 4, 8; 4, 9; 4, 10; 4, 11; 4, 12; 4, 13; 7, 14; 8, 15; 9, 16; 10, 17; 10, 18; 10, 19; 12, 20; 12, 21; 12, 22; 13, 23; 15, 24; 15, 25; 16, 26; 16, 27; 19, 28; 19, 29; 19, 30; 22, 31; 27, 32; 27, 33; 28, 34; 29, 35; 29, 36; 29, 37; 30, 38; 31, 39; 31, 40; 33, 41; 34, 42; 34, 43; 3... | 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; 1, function_definition; 2, function_name:sort_uri_list_by_name; 3, parameters; 4, block; 5, identifier:uri_list; 6, default_parameter; 7, expression_statement; 8, function_definition; 9, try_statement; 10, identifier:bypassNamespace; 11, False; 12, comment:"""
Sorts a list of uris
bypassNamespace:... | 0, 1; 1, 2; 1, 3; 1, 4; 3, 5; 3, 6; 4, 7; 4, 8; 4, 9; 6, 10; 6, 11; 7, 12; 8, 13; 8, 14; 8, 15; 9, 16; 9, 17; 14, 18; 15, 19; 15, 20; 16, 21; 17, 22; 17, 23; 19, 24; 19, 25; 20, 26; 21, 27; 21, 28; 21, 29; 23, 30; 23, 31; 24, 32; 25, 33; 28, 34; 29, 35; 30, 36; 31, 37; 32, 38; 33, 39; 34, 40; 35, 41; 36, 42; 36, 43; 38... | 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; 1, function_definition; 2, function_name:try_sort_fmt_opts; 3, parameters; 4, block; 5, identifier:rdf_format_opts_list; 6, identifier:uri; 7, expression_statement; 8, expression_statement; 9, comment:# print(filename, file_extension); 10, if_statement; 11, comment:"""reorder fmt options based on uri file ty... | 0, 1; 1, 2; 1, 3; 1, 4; 3, 5; 3, 6; 4, 7; 4, 8; 4, 9; 4, 10; 7, 11; 8, 12; 10, 13; 10, 14; 10, 15; 10, 16; 10, 17; 10, 18; 10, 19; 12, 20; 12, 21; 13, 22; 13, 23; 14, 24; 15, 25; 15, 26; 16, 27; 16, 28; 17, 29; 17, 30; 18, 31; 18, 32; 19, 33; 20, 34; 20, 35; 21, 36; 21, 37; 22, 38; 22, 39; 23, 40; 23, 41; 24, 42; 25, 4... | 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; 1, function_definition; 2, function_name:collect_results; 3, parameters; 4, block; 5, identifier:working_folder; 6, expression_statement; 7, expression_statement; 8, expression_statement; 9, expression_statement; 10, for_statement; 11, return_statement; 12, comment:"""
Collect results in a working_folder... | 0, 1; 1, 2; 1, 3; 1, 4; 3, 5; 4, 6; 4, 7; 4, 8; 4, 9; 4, 10; 4, 11; 6, 12; 7, 13; 8, 14; 9, 15; 10, 16; 10, 17; 10, 18; 11, 19; 13, 20; 13, 21; 14, 22; 14, 23; 15, 24; 15, 25; 17, 26; 17, 27; 18, 28; 18, 29; 18, 30; 18, 31; 23, 32; 23, 33; 25, 34; 25, 35; 26, 36; 26, 37; 27, 38; 28, 39; 28, 40; 30, 41; 31, 42; 31, 43; ... | 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; 1, function_definition; 2, function_name:run_sorter; 3, parameters; 4, block; 5, identifier:sorter_name_or_class; 6, identifier:recording; 7, default_parameter; 8, default_parameter; 9, default_parameter; 10, default_parameter; 11, default_parameter; 12, dictionary_splat_pattern; 13, expression_statement; 14... | 0, 1; 1, 2; 1, 3; 1, 4; 3, 5; 3, 6; 3, 7; 3, 8; 3, 9; 3, 10; 3, 11; 3, 12; 4, 13; 4, 14; 4, 15; 4, 16; 4, 17; 4, 18; 4, 19; 7, 20; 7, 21; 8, 22; 8, 23; 9, 24; 9, 25; 10, 26; 10, 27; 11, 28; 11, 29; 12, 30; 13, 31; 14, 32; 14, 33; 14, 34; 14, 35; 15, 36; 16, 37; 17, 38; 18, 39; 19, 40; 32, 41; 32, 42; 33, 43; 34, 44; 34... | 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; 1, function_definition; 2, function_name:compute_performance; 3, parameters; 4, block; 5, identifier:SC; 6, default_parameter; 7, default_parameter; 8, expression_statement; 9, expression_statement; 10, expression_statement; 11, expression_statement; 12, expression_statement; 13, expression_statement; 14, ex... | 0, 1; 1, 2; 1, 3; 1, 4; 3, 5; 3, 6; 3, 7; 4, 8; 4, 9; 4, 10; 4, 11; 4, 12; 4, 13; 4, 14; 4, 15; 4, 16; 4, 17; 4, 18; 4, 19; 4, 20; 4, 21; 4, 22; 6, 23; 6, 24; 7, 25; 7, 26; 8, 27; 9, 28; 10, 29; 11, 30; 12, 31; 13, 32; 14, 33; 15, 34; 16, 35; 17, 36; 18, 37; 19, 38; 20, 39; 21, 40; 21, 41; 22, 42; 22, 43; 22, 44; 26, 4... | 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; 1, function_definition; 2, function_name:add_color_stop_rgba; 3, parameters; 4, block; 5, identifier:self; 6, identifier:offset; 7, identifier:red; 8, identifier:green; 9, identifier:blue; 10, default_parameter; 11, expression_statement; 12, expression_statement; 13, expression_statement; 14, identifier:alph... | 0, 1; 1, 2; 1, 3; 1, 4; 3, 5; 3, 6; 3, 7; 3, 8; 3, 9; 3, 10; 4, 11; 4, 12; 4, 13; 10, 14; 10, 15; 11, 16; 12, 17; 13, 18; 17, 19; 17, 20; 18, 21; 18, 22; 19, 23; 19, 24; 20, 25; 20, 26; 20, 27; 20, 28; 20, 29; 20, 30; 21, 31; 21, 32; 25, 33; 25, 34 | 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; 1, function_definition; 2, function_name:get_all; 3, parameters; 4, block; 5, identifier:self; 6, default_parameter; 7, default_parameter; 8, default_parameter; 9, default_parameter; 10, default_parameter; 11, default_parameter; 12, default_parameter; 13, expression_statement; 14, return_statement; 15, ident... | 0, 1; 1, 2; 1, 3; 1, 4; 3, 5; 3, 6; 3, 7; 3, 8; 3, 9; 3, 10; 3, 11; 3, 12; 4, 13; 4, 14; 6, 15; 6, 16; 7, 17; 7, 18; 8, 19; 8, 20; 9, 21; 9, 22; 10, 23; 10, 24; 11, 25; 11, 26; 12, 27; 12, 28; 13, 29; 14, 30; 18, 31; 30, 32; 30, 33; 32, 34; 32, 35; 33, 36; 33, 37; 33, 38; 33, 39; 33, 40; 33, 41; 33, 42; 34, 43; 34, 44;... | 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; 1, function_definition; 2, function_name:get_appliances; 3, parameters; 4, block; 5, identifier:self; 6, default_parameter; 7, default_parameter; 8, default_parameter; 9, default_parameter; 10, default_parameter; 11, default_parameter; 12, default_parameter; 13, expression_statement; 14, expression_statement... | 0, 1; 1, 2; 1, 3; 1, 4; 3, 5; 3, 6; 3, 7; 3, 8; 3, 9; 3, 10; 3, 11; 3, 12; 4, 13; 4, 14; 4, 15; 6, 16; 6, 17; 7, 18; 7, 19; 8, 20; 8, 21; 9, 22; 9, 23; 10, 24; 10, 25; 11, 26; 11, 27; 12, 28; 12, 29; 13, 30; 14, 31; 15, 32; 19, 33; 31, 34; 31, 35; 32, 36; 32, 37; 35, 38; 35, 39; 36, 40; 36, 41; 37, 42; 37, 43; 37, 44; ... | 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; 1, function_definition; 2, function_name:get_all; 3, parameters; 4, block; 5, identifier:self; 6, default_parameter; 7, default_parameter; 8, default_parameter; 9, expression_statement; 10, return_statement; 11, identifier:start; 12, integer:0; 13, identifier:count; 14, unary_operator; 15, identifier:sort; 1... | 0, 1; 1, 2; 1, 3; 1, 4; 3, 5; 3, 6; 3, 7; 3, 8; 4, 9; 4, 10; 6, 11; 6, 12; 7, 13; 7, 14; 8, 15; 8, 16; 9, 17; 10, 18; 14, 19; 18, 20; 18, 21; 20, 22; 20, 23; 21, 24; 21, 25; 21, 26; 22, 27; 22, 28; 26, 29; 26, 30 | 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; 1, function_definition; 2, function_name:get_endpoints; 3, parameters; 4, block; 5, identifier:self; 6, default_parameter; 7, default_parameter; 8, default_parameter; 9, default_parameter; 10, expression_statement; 11, expression_statement; 12, return_statement; 13, identifier:start; 14, integer:0; 15, ident... | 0, 1; 1, 2; 1, 3; 1, 4; 3, 5; 3, 6; 3, 7; 3, 8; 3, 9; 4, 10; 4, 11; 4, 12; 6, 13; 6, 14; 7, 15; 7, 16; 8, 17; 8, 18; 9, 19; 9, 20; 10, 21; 11, 22; 12, 23; 16, 24; 22, 25; 22, 26; 23, 27; 23, 28; 26, 29; 26, 30; 27, 31; 27, 32; 28, 33; 28, 34; 28, 35; 28, 36; 28, 37; 29, 38; 29, 39; 30, 40; 31, 41; 31, 42; 35, 43; 35, 4... | 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; 1, function_definition; 2, function_name:__findFirstMissing; 3, parameters; 4, block; 5, identifier:self; 6, identifier:array; 7, identifier:start; 8, identifier:end; 9, expression_statement; 10, if_statement; 11, if_statement; 12, expression_statement; 13, if_statement; 14, return_statement; 15, comment:"""... | 0, 1; 1, 2; 1, 3; 1, 4; 3, 5; 3, 6; 3, 7; 3, 8; 4, 9; 4, 10; 4, 11; 4, 12; 4, 13; 4, 14; 9, 15; 10, 16; 10, 17; 11, 18; 11, 19; 12, 20; 13, 21; 13, 22; 14, 23; 16, 24; 17, 25; 18, 26; 19, 27; 20, 28; 20, 29; 21, 30; 22, 31; 23, 32; 23, 33; 24, 34; 24, 35; 25, 36; 26, 37; 26, 38; 27, 39; 29, 40; 29, 41; 30, 42; 30, 43; ... | 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; 1, function_definition; 2, function_name:get_reachable_storage_pools; 3, parameters; 4, block; 5, identifier:self; 6, default_parameter; 7, default_parameter; 8, default_parameter; 9, default_parameter; 10, default_parameter; 11, default_parameter; 12, default_parameter; 13, default_parameter; 14, expression... | 0, 1; 1, 2; 1, 3; 1, 4; 3, 5; 3, 6; 3, 7; 3, 8; 3, 9; 3, 10; 3, 11; 3, 12; 3, 13; 4, 14; 4, 15; 4, 16; 4, 17; 4, 18; 6, 19; 6, 20; 7, 21; 7, 22; 8, 23; 8, 24; 9, 25; 9, 26; 10, 27; 10, 28; 11, 29; 11, 30; 12, 31; 12, 32; 13, 33; 13, 34; 14, 35; 15, 36; 16, 37; 16, 38; 17, 39; 17, 40; 18, 41; 22, 42; 36, 43; 36, 44; 38,... | 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; 1, function_definition; 2, function_name:get_snapshots; 3, parameters; 4, block; 5, identifier:self; 6, identifier:volume_id_or_uri; 7, default_parameter; 8, default_parameter; 9, default_parameter; 10, default_parameter; 11, expression_statement; 12, expression_statement; 13, return_statement; 14, identifie... | 0, 1; 1, 2; 1, 3; 1, 4; 3, 5; 3, 6; 3, 7; 3, 8; 3, 9; 3, 10; 4, 11; 4, 12; 4, 13; 7, 14; 7, 15; 8, 16; 8, 17; 9, 18; 9, 19; 10, 20; 10, 21; 11, 22; 12, 23; 13, 24; 17, 25; 23, 26; 23, 27; 24, 28; 24, 29; 27, 30; 27, 31; 28, 32; 28, 33; 29, 34; 29, 35; 29, 36; 29, 37; 29, 38; 30, 39; 30, 40; 31, 41; 32, 42; 32, 43; 36, ... | 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; 1, function_definition; 2, function_name:get_extra_managed_storage_volume_paths; 3, parameters; 4, block; 5, identifier:self; 6, default_parameter; 7, default_parameter; 8, default_parameter; 9, default_parameter; 10, expression_statement; 11, expression_statement; 12, return_statement; 13, identifier:start;... | 0, 1; 1, 2; 1, 3; 1, 4; 3, 5; 3, 6; 3, 7; 3, 8; 3, 9; 4, 10; 4, 11; 4, 12; 6, 13; 6, 14; 7, 15; 7, 16; 8, 17; 8, 18; 9, 19; 9, 20; 10, 21; 11, 22; 12, 23; 16, 24; 22, 25; 22, 26; 23, 27; 23, 28; 26, 29; 26, 30; 27, 31; 27, 32; 28, 33; 28, 34; 28, 35; 28, 36; 28, 37; 29, 38; 29, 39; 30, 40; 31, 41; 31, 42; 35, 43; 35, 4... | 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; 1, function_definition; 2, function_name:get_attachable_volumes; 3, parameters; 4, block; 5, identifier:self; 6, default_parameter; 7, default_parameter; 8, default_parameter; 9, default_parameter; 10, default_parameter; 11, default_parameter; 12, default_parameter; 13, expression_statement; 14, expression_s... | 0, 1; 1, 2; 1, 3; 1, 4; 3, 5; 3, 6; 3, 7; 3, 8; 3, 9; 3, 10; 3, 11; 3, 12; 4, 13; 4, 14; 4, 15; 4, 16; 6, 17; 6, 18; 7, 19; 7, 20; 8, 21; 8, 22; 9, 23; 9, 24; 10, 25; 10, 26; 11, 27; 11, 28; 12, 29; 12, 30; 13, 31; 14, 32; 15, 33; 15, 34; 16, 35; 20, 36; 32, 37; 32, 38; 34, 39; 35, 40; 35, 41; 38, 42; 38, 43; 39, 44; 4... | 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; 1, function_definition; 2, function_name:get_available_storage_systems; 3, parameters; 4, block; 5, identifier:self; 6, default_parameter; 7, default_parameter; 8, default_parameter; 9, default_parameter; 10, dictionary_splat_pattern; 11, expression_statement; 12, expression_statement; 13, return_statement; ... | 0, 1; 1, 2; 1, 3; 1, 4; 3, 5; 3, 6; 3, 7; 3, 8; 3, 9; 3, 10; 4, 11; 4, 12; 4, 13; 6, 14; 6, 15; 7, 16; 7, 17; 8, 18; 8, 19; 9, 20; 9, 21; 10, 22; 11, 23; 12, 24; 13, 25; 17, 26; 24, 27; 24, 28; 25, 29; 25, 30; 28, 31; 28, 32; 29, 33; 29, 34; 30, 35; 30, 36; 30, 37; 30, 38; 30, 39; 31, 40; 31, 41; 32, 42; 32, 43; 33, 44... | 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; 1, function_definition; 2, function_name:build_query_uri; 3, parameters; 4, block; 5, identifier:self; 6, default_parameter; 7, default_parameter; 8, default_parameter; 9, default_parameter; 10, default_parameter; 11, default_parameter; 12, default_parameter; 13, default_parameter; 14, default_parameter; 15,... | 0, 1; 1, 2; 1, 3; 1, 4; 3, 5; 3, 6; 3, 7; 3, 8; 3, 9; 3, 10; 3, 11; 3, 12; 3, 13; 3, 14; 4, 15; 4, 16; 4, 17; 4, 18; 4, 19; 4, 20; 4, 21; 4, 22; 4, 23; 4, 24; 4, 25; 4, 26; 6, 27; 6, 28; 7, 29; 7, 30; 8, 31; 8, 32; 9, 33; 9, 34; 10, 35; 10, 36; 11, 37; 11, 38; 12, 39; 12, 40; 13, 41; 13, 42; 14, 43; 14, 44; 15, 45; 16,... | 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; 1, function_definition; 2, function_name:build_query_uri; 3, parameters; 4, block; 5, identifier:self; 6, default_parameter; 7, default_parameter; 8, default_parameter; 9, default_parameter; 10, default_parameter; 11, default_parameter; 12, default_parameter; 13, default_parameter; 14, default_parameter; 15,... | 0, 1; 1, 2; 1, 3; 1, 4; 3, 5; 3, 6; 3, 7; 3, 8; 3, 9; 3, 10; 3, 11; 3, 12; 3, 13; 3, 14; 4, 15; 4, 16; 4, 17; 4, 18; 4, 19; 4, 20; 4, 21; 4, 22; 4, 23; 4, 24; 4, 25; 4, 26; 6, 27; 6, 28; 7, 29; 7, 30; 8, 31; 8, 32; 9, 33; 9, 34; 10, 35; 10, 36; 11, 37; 11, 38; 12, 39; 12, 40; 13, 41; 13, 42; 14, 43; 14, 44; 15, 45; 16,... | 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; 1, function_definition; 2, function_name:get_all_without_ethernet; 3, parameters; 4, block; 5, identifier:self; 6, default_parameter; 7, default_parameter; 8, default_parameter; 9, default_parameter; 10, expression_statement; 11, expression_statement; 12, return_statement; 13, identifier:start; 14, integer:0... | 0, 1; 1, 2; 1, 3; 1, 4; 3, 5; 3, 6; 3, 7; 3, 8; 3, 9; 4, 10; 4, 11; 4, 12; 6, 13; 6, 14; 7, 15; 7, 16; 8, 17; 8, 18; 9, 19; 9, 20; 10, 21; 11, 22; 12, 23; 16, 24; 22, 25; 22, 26; 23, 27; 23, 28; 26, 29; 26, 30; 27, 31; 27, 32; 28, 33; 28, 34; 28, 35; 28, 36; 30, 37; 30, 38; 35, 39; 35, 40; 36, 41; 36, 42; 37, 43; 37, 4... | 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; 1, function_definition; 2, function_name:reduce_sort; 3, parameters; 4, block; 5, identifier:self; 6, default_parameter; 7, default_parameter; 8, expression_statement; 9, if_statement; 10, if_statement; 11, return_statement; 12, identifier:js_cmp; 13, None; 14, identifier:options; 15, None; 16, comment:"""
... | 0, 1; 1, 2; 1, 3; 1, 4; 3, 5; 3, 6; 3, 7; 4, 8; 4, 9; 4, 10; 4, 11; 6, 12; 6, 13; 7, 14; 7, 15; 8, 16; 9, 17; 9, 18; 10, 19; 10, 20; 11, 21; 17, 22; 17, 23; 18, 24; 20, 25; 21, 26; 21, 27; 24, 28; 25, 29; 26, 30; 26, 31; 27, 32; 27, 33; 28, 34; 28, 35; 29, 36; 29, 37; 33, 38; 33, 39; 35, 40; 35, 41; 36, 42; 36, 43; 43,... | 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.