sequence stringlengths 1.19k 35k | code stringlengths 75 8.58k |
|---|---|
{'id': '0', 'type': 'module', 'children': ['1']}, {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '6']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'title_from_rdf'}, {'id': '3', 'type': 'parameters', 'children': ['4', '5']}; {'id': '4', 'type': 'identifier', 'children': [], 'value'... | 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... |
{'id': '0', 'type': 'module', 'children': ['1']}, {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '9']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'sort'}, {'id': '3', 'type': 'parameters', 'children': ['4', '5', '6']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'se... | def sort(self, by, desc=False):
if callable(by):
key = by
else:
def key(feature):
return feature[by]
sorted_features = sorted(list(self), reverse=desc, key=key)
return self.__class__(sorted_features) |
{'id': '0', 'type': 'module', 'children': ['1']}, {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '7']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'shellc'}, {'id': '3', 'type': 'parameters', 'children': ['4', '5', '6']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': '... | def shellc(ndim, lenvals, array):
array = stypes.listToCharArray(array, xLen=lenvals, yLen=ndim)
ndim = ctypes.c_int(ndim)
lenvals = ctypes.c_int(lenvals)
libspice.shellc_c(ndim, lenvals, ctypes.byref(array))
return stypes.cVectorToPython(array) |
{'id': '0', 'type': 'module', 'children': ['1']}, {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '6']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'shelld'}, {'id': '3', 'type': 'parameters', 'children': ['4', '5']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'ndim'... | def shelld(ndim, array):
array = stypes.toDoubleVector(array)
ndim = ctypes.c_int(ndim)
libspice.shelld_c(ndim, ctypes.cast(array, ctypes.POINTER(ctypes.c_double)))
return stypes.cVectorToPython(array) |
{'id': '0', 'type': 'module', 'children': ['1']}, {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '6']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'shelli'}, {'id': '3', 'type': 'parameters', 'children': ['4', '5']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'ndim'... | def shelli(ndim, array):
array = stypes.toIntVector(array)
ndim = ctypes.c_int(ndim)
libspice.shelli_c(ndim, ctypes.cast(array, ctypes.POINTER(ctypes.c_int)))
return stypes.cVectorToPython(array) |
{'id': '0', 'type': 'module', 'children': ['1']}, {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '16']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'make_retrieveParameters'}, {'id': '3', 'type': 'parameters', 'children': ['4', '7', '10', '13']}; {'id': '4', 'type': 'default_parame... | def make_retrieveParameters(offset=1, count=100, name='RS', sort='D'):
return _OrderedDict([
('firstRecord', offset),
('count', count),
('sortField', _OrderedDict([('name', name), ('sort', sort)]))
]) |
{'id': '0', 'type': 'module', 'children': ['1']}, {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'sorted_names'}, {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'name... | def sorted_names(names):
names = list(names)
have_default = False
if 'default' in names:
names.remove('default')
have_default = True
sorted_names = sorted(names)
if have_default:
sorted_names = ['default'] + sorted_names
return sorted_names |
{'id': '0', 'type': 'module', 'children': ['1']}, {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '22']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'getArticles'}, {'id': '3', 'type': 'parameters', 'children': ['4', '5', '8', '11', '14', '17']}; {'id': '4', 'type': 'identifier', 'c... | def getArticles(self,
page=1,
count=100,
sortBy = "rel",
sortByAsc = False,
returnInfo=ReturnInfo()):
assert page >= 1
assert count <= 100
params = {
"action": "getArticlesForTopicPage",
"resu... |
{'id': '0', 'type': 'module', 'children': ['1']}, {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '33']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'pprint'}, {'id': '3', 'type': 'parameters', 'children': ['4', '5', '8', '11', '14', '17', '18', '21', '24', '27', '30']}; {'id': '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'
):
sdocs = python_to_sdocs(
obje... |
{'id': '0', 'type': 'module', 'children': ['1']}, {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '36']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'cpprint'}, {'id': '3', 'type': 'parameters', 'children': ['4', '5', '8', '11', '14', '17', '18', '21', '24', '27', '30', '33']}; {'id... | 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'
):
sdocs = python_to_sd... |
{'id': '0', 'type': 'module', 'children': ['1']}, {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '6']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': '_encrypted_data_keys_hash'}, {'id': '3', 'type': 'parameters', 'children': ['4', '5']}; {'id': '4', 'type': 'identifier', 'children': ... | def _encrypted_data_keys_hash(hasher, encrypted_data_keys):
hashed_keys = []
for edk in encrypted_data_keys:
serialized_edk = serialize_encrypted_data_key(edk)
_hasher = hasher.copy()
_hasher.update(serialized_edk)
hashed_keys.append(_hasher.finalize())
return b"".join(sorted... |
{'id': '0', 'type': 'module', 'children': ['1']}, {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '6']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'getOverlaySortOrder'}, {'id': '3', 'type': 'parameters', 'children': ['4', '5']}; {'id': '4', 'type': 'identifier', 'children': [], 'v... | def getOverlaySortOrder(self, ulOverlayHandle):
fn = self.function_table.getOverlaySortOrder
punSortOrder = c_uint32()
result = fn(ulOverlayHandle, byref(punSortOrder))
return result, punSortOrder.value |
{'id': '0', 'type': 'module', 'children': ['1']}, {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'naturalize_string'}, {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': ... | def naturalize_string(key):
return [int(text) if text.isdigit() else text.lower()
for text in re.split(numregex, key)] |
{'id': '0', 'type': 'module', 'children': ['1']}, {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '6']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': '_get_rows'}, {'id': '3', 'type': 'parameters', 'children': ['4', '5']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'se... | def _get_rows(self, options):
if options["oldsortslice"]:
rows = copy.deepcopy(self._rows[options["start"]:options["end"]])
else:
rows = copy.deepcopy(self._rows)
if options["sortby"]:
sortindex = self._field_names.index(options["sortby"])
rows = [... |
{'id': '0', 'type': 'module', 'children': ['1']}, {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '6']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': '_resolve_sort_by'}, {'id': '3', 'type': 'parameters', 'children': ['4', '5']}; {'id': '4', 'type': 'identifier', 'children': [], 'valu... | def _resolve_sort_by(sort_by, flag_radius_query):
if sort_by is None:
if flag_radius_query:
sort_by = SORT_BY_DIST
elif isinstance(sort_by, string_types):
if sort_by.lower() == SORT_BY_DIST:
if flag_radius_query is False:
msg = ... |
{'id': '0', 'type': 'module', 'children': ['1']}, {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'getOPOrUserServices'}, {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value'... | def getOPOrUserServices(openid_services):
op_services = arrangeByType(openid_services, [OPENID_IDP_2_0_TYPE])
openid_services = arrangeByType(openid_services,
OpenIDServiceEndpoint.openid_type_uris)
return op_services or openid_services |
{'id': '0', 'type': 'module', 'children': ['1']}, {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '9']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'AdvSearch'}, {'id': '3', 'type': 'parameters', 'children': ['4', '5', '6']}; {'id': '4', 'type': 'identifier', 'children': [], 'value'... | 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 a... |
{'id': '0', 'type': 'module', 'children': ['1']}, {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '4']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'get_project_files'}, {'id': '3', 'type': 'parameters', 'children': []}; {'id': '4', 'type': 'block', 'children': ['5', '14', '18', '77... | def get_project_files():
if is_git_project():
return get_git_project_files()
project_files = []
for top, subdirs, files in os.walk('.'):
for subdir in subdirs:
if subdir.startswith('.'):
subdirs.remove(subdir)
for f in files:
if f.startswith('.... |
{'id': '0', 'type': 'module', 'children': ['1']}, {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': '_validate_path'}, {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'pa... | def _validate_path(path):
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 largest to smallest.")
return new_path |
{'id': '0', 'type': 'module', 'children': ['1']}, {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'count'}, {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}, {'i... | def count(self):
request_params = dict(self.request_params)
request_url = str(self.request_url)
request_params['rows'] = 0
result = self.do_http_request(
'get',
request_url,
data=request_params,
custom_header=str(self.etiquette)
).j... |
{'id': '0', 'type': 'module', 'children': ['1']}, {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'url'}, {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}, {'id'... | def url(self):
request_params = self._escaped_pagging()
sorted_request_params = sorted([(k, v) for k, v in request_params.items()])
req = requests.Request(
'get', self.request_url, params=sorted_request_params).prepare()
return req.url |
{'id': '0', 'type': 'module', 'children': ['1']}, {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '6']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'sortByNamespacePrefix'}, {'id': '3', 'type': 'parameters', 'children': ['4', '5']}; {'id': '4', 'type': 'identifier', 'children': [], ... | def sortByNamespacePrefix(urisList, nsList):
exit = []
urisList = sort_uri_list_by_name(urisList)
for ns in nsList:
innerexit = []
for uri in urisList:
if str(uri).startswith(str(ns)):
innerexit += [uri]
exit += innerexit
for uri in urisList:
i... |
{'id': '0', 'type': 'module', 'children': ['1']}, {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '8']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'sort_uri_list_by_name'}, {'id': '3', 'type': 'parameters', 'children': ['4', '5']}; {'id': '4', 'type': 'identifier', 'children': [], ... | def sort_uri_list_by_name(uri_list, bypassNamespace=False):
def get_last_bit(uri_string):
try:
x = uri_string.split("
except:
x = uri_string.split("/")[-1]
return x
try:
if bypassNamespace:
return sorted(uri_list, key=lambda x: get_last_bit(x._... |
{'id': '0', 'type': 'module', 'children': ['1']}, {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '6']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'try_sort_fmt_opts'}, {'id': '3', 'type': 'parameters', 'children': ['4', '5']}; {'id': '4', 'type': 'identifier', 'children': [], 'val... | def try_sort_fmt_opts(rdf_format_opts_list, uri):
filename, file_extension = os.path.splitext(uri)
if file_extension == ".ttl" or file_extension == ".turtle":
return ['turtle', 'n3', 'nt', 'json-ld', 'rdfa', 'xml']
elif file_extension == ".xml" or file_extension == ".rdf":
return ['xml', 'tu... |
{'id': '0', 'type': 'module', 'children': ['1']}, {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'collect_results'}, {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'w... | def collect_results(working_folder):
results = {}
working_folder = Path(working_folder)
output_folders = working_folder/'output_folders'
for rec_name in os.listdir(output_folders):
if not os.path.isdir(output_folders / rec_name):
continue
results[rec_name] = {}
for s... |
{'id': '0', 'type': 'module', 'children': ['1']}, {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '23']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'run_sorter'}, {'id': '3', 'type': 'parameters', 'children': ['4', '5', '6', '9', '12', '15', '18', '21']}; {'id': '4', 'type': 'ident... | def run_sorter(sorter_name_or_class, recording, output_folder=None, delete_output_folder=False,
grouping_property=None, parallel=False, debug=False, **params):
if isinstance(sorter_name_or_class, str):
SorterClass = sorter_dict[sorter_name_or_class]
elif sorter_name_or_class in sorter_ful... |
{'id': '0', 'type': 'module', 'children': ['1']}, {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '11']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'compute_performance'}, {'id': '3', 'type': 'parameters', 'children': ['4', '5', '8']}; {'id': '4', 'type': 'identifier', 'children': ... | def compute_performance(SC, verbose=True, output='dict'):
counts = SC._counts
tp_rate = float(counts['TP']) / counts['TOT_ST1'] * 100
cl_rate = float(counts['CL']) / counts['TOT_ST1'] * 100
fn_rate = float(counts['FN']) / counts['TOT_ST1'] * 100
fp_st1 = float(counts['FP']) / counts['TOT_ST1'] * 100... |
{'id': '0', 'type': 'module', 'children': ['1']}, {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '12']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'add_color_stop_rgba'}, {'id': '3', 'type': 'parameters', 'children': ['4', '5', '6', '7', '8', '9']}; {'id': '4', 'type': 'identifier... | def add_color_stop_rgba(self, offset, red, green, blue, alpha=1):
cairo.cairo_pattern_add_color_stop_rgba(
self._pointer, offset, red, green, blue, alpha)
self._check_status() |
{'id': '0', 'type': 'module', 'children': ['1']}, {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '27']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'get_all'}, {'id': '3', 'type': 'parameters', 'children': ['4', '5', '8', '12', '15', '18', '21', '24']}; {'id': '4', 'type': 'identif... | def get_all(self, start=0, count=-1, filter='', fields='', query='', sort='', view=''):
return self._client.get_all(start, count, filter=filter, sort=sort, query=query, fields=fields, view=view) |
{'id': '0', 'type': 'module', 'children': ['1']}, {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '27']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'get_appliances'}, {'id': '3', 'type': 'parameters', 'children': ['4', '5', '8', '12', '15', '18', '21', '24']}; {'id': '4', 'type': '... | def get_appliances(self, start=0, count=-1, filter='', fields='', query='', sort='', view=''):
uri = self.URI + '/image-streamer-appliances'
return self._client.get_all(start, count, filter=filter, sort=sort, query=query, fields=fields, view=view,
uri=uri) |
{'id': '0', 'type': 'module', 'children': ['1']}, {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '15']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'get_all'}, {'id': '3', 'type': 'parameters', 'children': ['4', '5', '8', '12']}; {'id': '4', 'type': 'identifier', 'children': [], 'v... | def get_all(self, start=0, count=-1, sort=''):
return self._helper.get_all(start, count, sort=sort) |
{'id': '0', 'type': 'module', 'children': ['1']}, {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '18']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'get_endpoints'}, {'id': '3', 'type': 'parameters', 'children': ['4', '5', '8', '12', '15']}; {'id': '4', 'type': 'identifier', 'child... | def get_endpoints(self, start=0, count=-1, filter='', sort=''):
uri = "{}/endpoints/".format(self.data["uri"])
return self._helper.get_all(start, count, filter=filter, sort=sort, uri=uri) |
{'id': '0', 'type': 'module', 'children': ['1']}, {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '8']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': '__findFirstMissing'}, {'id': '3', 'type': 'parameters', 'children': ['4', '5', '6', '7']}; {'id': '4', 'type': 'identifier', 'children... | def __findFirstMissing(self, array, start, end):
if (start > end):
return end + 1
if (start != array[start]):
return start
mid = int((start + end) / 2)
if (array[mid] == mid):
return self.__findFirstMissing(array, mid + 1, end)
return self.__fi... |
{'id': '0', 'type': 'module', 'children': ['1']}, {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '30']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'get_reachable_storage_pools'}, {'id': '3', 'type': 'parameters', 'children': ['4', '5', '8', '12', '15', '18', '21', '24', '27']}; {'... | def get_reachable_storage_pools(self, start=0, count=-1, filter='', query='', sort='',
networks=None, scope_exclusions=None, scope_uris=''):
uri = self.URI + "/reachable-storage-pools"
if networks:
elements = "\'"
for n in networks:
... |
{'id': '0', 'type': 'module', 'children': ['1']}, {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '19']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'get_snapshots'}, {'id': '3', 'type': 'parameters', 'children': ['4', '5', '6', '9', '13', '16']}; {'id': '4', 'type': 'identifier', '... | def get_snapshots(self, volume_id_or_uri, start=0, count=-1, filter='', sort=''):
uri = self.__build_volume_snapshot_uri(volume_id_or_uri)
return self._client.get_all(start, count, filter=filter, sort=sort, uri=uri) |
{'id': '0', 'type': 'module', 'children': ['1']}, {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '18']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'get_extra_managed_storage_volume_paths'}, {'id': '3', 'type': 'parameters', 'children': ['4', '5', '8', '12', '15']}; {'id': '4', 'ty... | def get_extra_managed_storage_volume_paths(self, start=0, count=-1, filter='', sort=''):
uri = self.URI + '/repair?alertFixType=ExtraManagedStorageVolumePaths'
return self._client.get_all(start, count, filter=filter, sort=sort, uri=uri) |
{'id': '0', 'type': 'module', 'children': ['1']}, {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '27']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'get_attachable_volumes'}, {'id': '3', 'type': 'parameters', 'children': ['4', '5', '8', '12', '15', '18', '21', '24']}; {'id': '4', '... | def get_attachable_volumes(self, start=0, count=-1, filter='', query='', sort='', scope_uris='', connections=''):
uri = self.URI + '/attachable-volumes'
if connections:
uri += str('?' + 'connections=' + connections.__str__())
return self._client.get_all(start, count, filter=filter, q... |
{'id': '0', 'type': 'module', 'children': ['1']}, {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '20']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'get_available_storage_systems'}, {'id': '3', 'type': 'parameters', 'children': ['4', '5', '8', '12', '15', '18']}; {'id': '4', 'type'... | def get_available_storage_systems(self, start=0, count=-1, filter='', sort='', **kwargs):
uri = self._helper.build_uri_with_query_string(kwargs, '/available-storage-systems')
return self._helper.get_all(start=start, count=count, filter=filter, sort=sort, uri=uri) |
{'id': '0', 'type': 'module', 'children': ['1']}, {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '33']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'build_query_uri'}, {'id': '3', 'type': 'parameters', 'children': ['4', '5', '8', '11', '15', '18', '21', '24', '27', '30']}; {'id': '... | def build_query_uri(self, uri=None, start=0, count=-1, filter='', query='', sort='', view='', fields='', scope_uris=''):
if filter:
filter = self.make_query_filter(filter)
if query:
query = "&query=" + quote(query)
if sort:
sort = "&sort=" + quote(sort)
... |
{'id': '0', 'type': 'module', 'children': ['1']}, {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '33']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'build_query_uri'}, {'id': '3', 'type': 'parameters', 'children': ['4', '5', '8', '12', '15', '18', '21', '24', '27', '30']}; {'id': '... | def build_query_uri(self, start=0, count=-1, filter='', query='', sort='', view='', fields='', uri=None, scope_uris=''):
if filter:
filter = self.__make_query_filter(filter)
if query:
query = "&query=" + quote(query)
if sort:
sort = "&sort=" + quote(sort)
... |
{'id': '0', 'type': 'module', 'children': ['1']}, {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '18']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'get_all_without_ethernet'}, {'id': '3', 'type': 'parameters', 'children': ['4', '5', '8', '12', '15']}; {'id': '4', 'type': 'identifi... | def get_all_without_ethernet(self, start=0, count=-1, filter='', sort=''):
without_ethernet_client = ResourceClient(
self._connection, "/rest/logical-downlinks/withoutEthernet")
return without_ethernet_client.get_all(start, count, filter=filter, sort=sort) |
{'id': '0', 'type': 'module', 'children': ['1']}, {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '11']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'reduce_sort'}, {'id': '3', 'type': 'parameters', 'children': ['4', '5', '8']}; {'id': '4', 'type': 'identifier', 'children': [], 'val... | def reduce_sort(self, js_cmp=None, options=None):
if options is None:
options = dict()
if js_cmp:
options['arg'] = js_cmp
return self.reduce("Riak.reduceSort", options=options) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.