Did I find the right examples for you? yes no

All Samples(2)  |  Call(1)  |  Derive(0)  |  Import(1)
Iterate over the collection files stored at Google.

        def iter_google_store(ngram_len, verbose=False):
    """Iterate over the collection files stored at Google."""
    version = '20120701'
    session = requests.Session()

    for index in get_indices(ngram_len):
        fname = FILE_TEMPLATE.format(
            ngram_len=ngram_len,
            version=version,
            index=index,
        )

        url = URL_TEMPLATE.format(fname)

        if verbose:
            sys.stderr.write(
                'Downloading {url} '
                ''.format(
                    url=url,
                ),
            )
            sys.stderr.flush()

        request = session.get(url, stream=True)
        assert request.status_code == 200

        yield fname, url, request

        if verbose:
            sys.stderr.write('\n')
        


src/g/o/google-ngram-downloader-3.1.1/google_ngram_downloader/__main__.py   google-ngram-downloader(Download)
from py.path import local
 
from .util import iter_google_store, readline_google_store, count_coccurrence
 
 
    output.ensure_dir()
 
    for fname, url, request in iter_google_store(ngram_len, verbose=verbose):
        with output.join(fname).open('wb') as f:
            for num, chunk in enumerate(request.iter_content(1024)):