Returns a generator over the (expressionLevel, nextPageToken) pairs
        defined by the specified request.

        Currently only supports searching over a specified rnaQuantification
333468
def expressionLevelsGenerator(self, request):
        
        rnaQuantificationId = request.rna_quantification_id
        compoundId = datamodel.RnaQuantificationCompoundId.parse(
            request.rna_quantification_id)
        dataset = self.getDataRepository().getDataset(compoundId.dataset_id)
        rnaQuantSet = dataset.getRnaQuantificationSet(
            compoundId.rna_quantification_set_id)
        rnaQuant = rnaQuantSet.getRnaQuantification(rnaQuantificationId)
        rnaQuantificationId = rnaQuant.getLocalId()
        iterator = paging.ExpressionLevelsIterator(
            request, rnaQuant)
        return iterator
1026302
async def getiter(self, url: str, url_vars: Dict[str, str] = {},
                      *, accept: str = sansio.accept_format(),
                      jwt: Opt[str] = None,
                      oauth_token: Opt[str] = None
                      ) -> AsyncGenerator[Any, None]:
        """"""
        data, more = await self._make_request("GET", url, url_vars, b"", accept,
                                              jwt=jwt, oauth_token=oauth_token)

        if isinstance(data, dict) and "items" in data:
            data = data["items"]

        for item in data:
            yield item
        if more:
            # `yield from` is not supported in coroutines.
            async for item in self.getiter(more, url_vars, accept=accept,
                                           jwt=jwt, oauth_token=oauth_token):
                yield item
903260
def get_v1_batch_token_from_headers(headers)
      if headers.is_a?(Hash) && headers.has_key?('Link')
        match = /^<([^>]+)>;rel='next'$/.match(headers['Link'])
        if match
          uri = URI.parse(match[1])
          params = CGI.parse(uri.query)
          return params['batch_token'][0]
        end
      end
    end
508938
public String getMediaQuery(Scope scope, Generator gen) {
        StringBuilder sb = new StringBuilder();
        for (Expression expr : mediaQueries) {
            if (sb.length() > 0) {
                sb.append(" and ");
            }
            sb.append(expr.eval(scope, gen));
        }
        return sb.toString();
    }
428067
function genSign(urlQuery, appSecret){
    var urlObj = querystring.parse(urlQuery);
    urlObj.appSecret = appSecret;

    var keysSortAsc = Object.keys(urlObj).sort(function(a, b){
        return a.localeCompare(b);
    });
    var valueSortStr = keysSortAsc.map(function(key){
        return urlObj[key];
    }).join('');

    var md5 = crypto.createHash('md5');
    return md5.update(valueSortStr, 'utf8').digest('hex');
}
152897
def get(self, request, slug):
        
        matching_datasets = self.generate_matching_datasets(slug)

        if matching_datasets is None:
            raise Http404("Datasets meeting these criteria do not exist.")

        base_context = {
            'datasets': matching_datasets,
            'num_datasets': matching_datasets.count(),
            'page_title': self.generate_page_title(slug),
        }

        additional_context = self.generate_additional_context(
            matching_datasets
        )

        base_context.update(additional_context)
        context = base_context

        return render(
            request,
            self.template_path,
            context
        )
64806
def getRnaQuantificationById(self, rnaQuantificationId):
        
        sql = ("SELECT * FROM RnaQuantification WHERE id = ?")
        query = self._dbconn.execute(sql, (rnaQuantificationId,))
        try:
            return sqlite_backend.fetchOne(query)
        except AttributeError:
            raise exceptions.RnaQuantificationNotFoundException(
                rnaQuantificationId)
532079
@Override
    public Page<Factor> nextPage(final Page<Factor> page, 
                                 final TwilioRestClient client) {
        Request request = new Request(
            HttpMethod.GET,
            page.getNextPageUrl(
                Domains.AUTHY.toString(),
                client.getRegion()
            )
        );
        return pageForRequest(client, request);
    }
290611
def _generate(self, request):
        
        payload = {}
        for field, gen in self._generators.items():
            value = None
            if callable(gen):
                value = gen(request)
            else:
                value = gen

            if value:
                payload[field] = value
        return payload
557440
function getURLFromRequest(request) {
	const queryString = makeQueryString(request.query || {});
	let formatted = request.route;
	let value;
	let regexp;

	// Replace route params with their values. If the route param is specified
	// with an extension (e.g., ':id.json'), keep the extension.
	Object.keys(request.params || {}).forEach((name) => {
		value = request.params[name];
		regexp = new RegExp(':' + name + '(?=(?:\\.|\\/|$|\\?))');
		formatted = formatted.replace(regexp, value);
	});

	return formatted + (queryString ? '?' + queryString : '');
}
553773
def get(self, request):
        
        sections = self.generate_sections()

        if self.paginated:
            p = Paginator(sections, 25)

            page = request.GET.get('page')

            try:
                sections = p.page(page)
            except PageNotAnInteger:
                # If page is not an integer, deliver first page.
                sections = p.page(1)
            except EmptyPage:
                # If page is out of range (e.g. 9999), return last page
                # of results.
                sections = p.page(p.num_pages)

            pageUpper = int(p.num_pages) / 2

            try:
                pageLower = int(page) / 2
            except TypeError:
                pageLower = -999
        else:
            pageUpper = None
            pageLower = None

        context = {
            'sections': sections,
            'page_title': self.generate_page_title(),
            'browse_type': self.browse_type,
            'pageUpper': pageUpper,
            'pageLower': pageLower
        }

        return render(
            request,
            self.template_path,
            context
        )
569315
private List<T> computePagedList(List<T> result, HeaderAndBody httpResponse, JSONObject where, Pipe<T> requestingPipe) {
        ReadFilter previousRead = null;
        ReadFilter nextRead = null;

        if (PageConfig.MetadataLocations.WEB_LINKING.equals(pageConfig.getMetadataLocation())) {
            String webLinksRaw = "";
            final String relHeader = "rel";
            final String nextIdentifier = pageConfig.getNextIdentifier();
            final String prevIdentifier = pageConfig.getPreviousIdentifier();
            try {
                webLinksRaw = getWebLinkHeader(httpResponse);
                if (webLinksRaw == null) { // no paging, return result
                    return result;
                }
                List<WebLink> webLinksParsed = WebLinkParser.parse(webLinksRaw);
                for (WebLink link : webLinksParsed) {
                    if (nextIdentifier.equals(link.getParameters().get(relHeader))) {
                        nextRead = new ReadFilter();
                        nextRead.setLinkUri(new URI(link.getUri()));
                    } else if (prevIdentifier.equals(link.getParameters().get(relHeader))) {
                        previousRead = new ReadFilter();
                        previousRead.setLinkUri(new URI(link.getUri()));
                    }

                }
            } catch (URISyntaxException ex) {
                Log.e(TAG, webLinksRaw + " did not contain a valid context URI", ex);
                throw new RuntimeException(ex);
            } catch (ParseException ex) {
                Log.e(TAG, webLinksRaw + " could not be parsed as a web link header", ex);
                throw new RuntimeException(ex);
            }
        } else if (pageConfig.getMetadataLocation().equals(PageConfig.MetadataLocations.HEADERS)) {
            nextRead = pageConfig.getPageParameterExtractor().getNextFilter(httpResponse, RestAdapter.this.pageConfig);
            previousRead = pageConfig.getPageParameterExtractor().getPreviousFilter(httpResponse, RestAdapter.this.pageConfig);
        } else if (pageConfig.getMetadataLocation().equals(PageConfig.MetadataLocations.BODY)) {
            nextRead = pageConfig.getPageParameterExtractor().getNextFilter(httpResponse, RestAdapter.this.pageConfig);
            previousRead = pageConfig.getPageParameterExtractor().getPreviousFilter(httpResponse, RestAdapter.this.pageConfig);
        } else {
            throw new IllegalStateException("Not supported");
        }
        if (nextRead != null) {
            nextRead.setWhere(where);
        }

        if (previousRead != null) {
            previousRead.setWhere(where);
        }

        return new WrappingPagedList<T>(requestingPipe, result, nextRead, previousRead);
    }
542088
def get_pairs(self, format_string):
        
        for token in self.get_tokens(format_string):
            match = self.name_pattern.search(token)
            name = match.group(1) if match else None
            yield FormatStringToken(name=name, text=token)
219776
def datasetsGenerator(self, request):
        
        return self._topLevelObjectGenerator(
            request, self.getDataRepository().getNumDatasets(),
            self.getDataRepository().getDatasetByIndex)
1226877
function get (req, res, next) {
    var prop = pluralize.singular(req.params.resource)
    req.query[prop + 'Id'] = utils.toNative(req.params.id)
    if (!req.query._filter) {
      req.query._filter = prop + 'Id=' + req.params.id
    } else {
      req.query._filter += ',' + prop + 'Id=' + req.params.id
    }
    req.url = '/' + req.params.nested
    next()
  }
513781
def _continued_query(self, query_params, key="pages"):
        
        query_params.update(self.__title_query_param())

        last_cont = dict()
        prop = query_params.get("prop")

        while True:
            params = query_params.copy()
            params.update(last_cont)

            request = self.mediawiki.wiki_request(params)

            if "query" not in request:
                break

            pages = request["query"][key]
            if "generator" in query_params:
                for datum in pages.values():
                    yield datum
            elif isinstance(pages, list):
                for datum in list(enumerate(pages)):
                    yield datum[1]
            else:
                for datum in pages[self.pageid].get(prop, list()):
                    yield datum

            if "continue" not in request or request["continue"] == last_cont:
                break

            last_cont = request["continue"]
1254589
def pagination_for(context, current_page, page_var="page", exclude_vars=""):
    
    querystring = context["request"].GET.copy()
    exclude_vars = [v for v in exclude_vars.split(",") if v] + [page_var]
    for exclude_var in exclude_vars:
        if exclude_var in querystring:
            del querystring[exclude_var]
    querystring = querystring.urlencode()
    return {
        "current_page": current_page,
        "querystring": querystring,
        "page_var": page_var,
    }