Query ( List ) datasets
        :param visibility: If provided as 'public', retrieves public datasets
        :param api: Api instance
        :return: Collection object
191218
def query(cls, visibility=None, api=None):
        
        api = api if api else cls._API

        return super(Dataset, cls)._query(
            url=cls._URL['query'],
            visibility=visibility,
            fields='_all', api=api
        )
1059817
def _get_datapoints(self, params):
        
        url = self.query_uri + '/v1/datapoints'
        return self.service._get(url, params=params)
1200101
def search(self,
               q=None,
               per_page=None,
               page=None,
               bbox=None,
               sort_by="relavance",
               sort_order="asc"):
        
        url = self._url + "/datasets.json"
        param_dict = {
            "sort_by" : sort_by,
            "f" : "json"
        }
        if q is not None:
            param_dict['q'] = q
        if per_page is not None:
            param_dict['per_page'] = per_page
        if page is not None:
            param_dict['page'] = page
        if bbox is not None:
            param_dict['bbox'] = bbox
        if sort_by is not None:
            param_dict['sort_by'] = sort_by
        if sort_order is not None:
            param_dict['sort_order'] = sort_order
        ds_data =  self._get(url=url,
                    param_dict=param_dict,
                    securityHandler=self._securityHandler,
                    additional_headers=[],
                    proxy_url=self._proxy_url,
                    proxy_port=self._proxy_port)
        return ds_data
600590
def get_view(self, table):
        

        request = self.client.tables().get(projectId=table.project_id,
                                           datasetId=table.dataset_id,
                                           tableId=table.table_id)

        try:
            response = request.execute()
        except http.HttpError as ex:
            if ex.resp.status == 404:
                return None
            raise

        return response['view']['query'] if 'view' in response else None
1191057
def get_dataset(self, datasetid):
        """"""

        path = '/api/1.0/meta/dataset/{}'
        return self._api_get(definition.Dataset, path.format(datasetid))
1201501
def get_reply_visibility(self, status_dict):
        
        # Visibility rankings (higher is more limited)
        visibility = ("public", "unlisted", "private", "direct")

        default_visibility = visibility.index(self.default_visibility)
        status_visibility = visibility.index(status_dict["visibility"])

        return visibility[max(default_visibility, status_visibility)]
686701
def get_queryset(self):
        ''''''
        if self.action == 'list':
            archived = get_true_false_both(
                self.request.query_params, 'archived', 'false')
            if archived == 'true':
                return self.queryset.filter(archived=True)
            if archived == 'false':
                return self.queryset.filter(archived=False)
        return self.queryset
1346240
def open_dataset(path, **kwargs):
    # type: (str, T.Any) -> xr.Dataset
    
    if 'engine' in kwargs and kwargs['engine'] != 'cfgrib':
        raise ValueError("only engine=='cfgrib' is supported")
    kwargs['engine'] = 'cfgrib'
    return xr.backends.api.open_dataset(path, **kwargs)
420198
def get_data(
    dataset,
    query=None,
    crs="epsg:4326",
    bounds=None,
    sortby=None,
    pagesize=10000,
    max_workers=5,
):
    
    param_dicts = define_request(dataset, query, crs, bounds, sortby, pagesize)

    with ThreadPoolExecutor(max_workers=max_workers) as executor:
        results = executor.map(make_request, param_dicts)

    outjson = dict(type="FeatureCollection", features=[])
    for result in results:
        outjson["features"] += result
    return outjson
139329
def get_visible_scopes(self):
        
        return [k for k, s in current_oauth2server.scope_choices()
                if k in self.scopes]
1321899
def get_queryset(self):
        
        return self.queryset.all().accessible_to(user=self.request.user)
586771
def queryset(self, request, queryset):
        
        if self.value():
            params = {self.lookup_key: self.value()}
            return queryset.filter(**params)
558100
def get_queryset(self, request):
        
        if request.GET.get(ShowHistoryFilter.parameter_name) == '1':
            queryset = self.model.objects.with_active_flag()
        else:
            # Show only the most recent row for each key.
            queryset = self.model.objects.current_set()
        ordering = self.get_ordering(request)
        if ordering:
            return queryset.order_by(*ordering)
        return queryset
175065
def list(self, request, *args, **kwargs):
        
        return super(ServicesViewSet, self).list(request, *args, **kwargs)
388381
def where(options={})
      options.merge!(key: @api_key, vintage: @api_vintage)
      fail "Client requires a dataset (#{DATASETS})." if @dataset.nil?
      [:fields, :level].each do |f|
        fail ArgumentError, "#{f} is a requied parameter" if options[f].nil?
      end
      options[:within] = [options[:within]] unless options[:within].nil?
      Request.find(dataset, options)
    end
633260
def get_datasets(self):
        # type: () -> List[hdx.data.dataset.Dataset]
        
        assoc_result, datasets_dicts = self._read_from_hdx('showcase', self.data['id'], fieldname='showcase_id',
                                                           action=self.actions()['list_datasets'])
        datasets = list()
        if assoc_result:
            for dataset_dict in datasets_dicts:
                dataset = hdx.data.dataset.Dataset(dataset_dict, configuration=self.configuration)
                datasets.append(dataset)
        return datasets
1330830
def get_collection_datasets(collection_id,**kwargs):
    
    collection_datasets = db.DBSession.query(Dataset).filter(Dataset.id==DatasetCollectionItem.dataset_id,
                                        DatasetCollectionItem.collection_id==DatasetCollection.id,
                                        DatasetCollection.id==collection_id).all()
    return collection_datasets