def excerpts(n_samples, n_excerpts=None, excerpt_size=None):
    assert n_excerpts >= 2
    step = _excerpt_step(n_samples,
                         n_excerpts=n_excerpts,
                         excerpt_size=excerpt_size)
    for i in range(n_excerpts):
        start = i * step
        if start >= n_samples:
            break
        end = min(start + excerpt_size, n_samples)
        yield start, end
Find a virtual machine by it's name and return it
dataset/ETHPy150Open kwikteam/phy/phy/io/array.py/excerpts--crossover with--dataset/ETHPy150Open ngageoint/cocreate/ccl-cookbook/files/default/cocreatelite/cocreate/createvm/pyvmutils.py/get_resource_pool