Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(8)  |  Call(6)  |  Derive(0)  |  Import(2)
xrange(stop) -> xrange object
xrange(start, stop[, step]) -> xrange object

Like range(), but instead of returning a list, returns an object that
generates the numbers in the range on demand.  For looping, this is 
slightly faster than range() and more memory efficient.

src/d/y/dynts-HEAD/dynts/utils/populate.py   dynts(Download)
from numpy import ndarray
 
from .py2py3 import range
 
def_converter = lambda x: x
def datepopulate(size = 10, start = None, delta = 1):
    dt = start or date.today() - timedelta(days = delta*(size-1))
    td = timedelta(days=delta)
    return [dt+s*td for s in range(size)]
 
def populate(size = 100, cols = 1, generator = None):
    generator = generator or def_generator
    data = ndarray([size,cols])
    for c in range(0,cols):
        data[:,c] = [generator(i) for i in range(0,size)]

src/d/y/dynts-0.4.1/dynts/utils/populate.py   dynts(Download)
from numpy import ndarray
 
from .py2py3 import range
 
def_converter = lambda x: x
def datepopulate(size = 10, start = None, delta = 1):
    dt = start or date.today() - timedelta(days = delta*(size-1))
    td = timedelta(days=delta)
    return [dt+s*td for s in range(size)]
 
def populate(size = 100, cols = 1, generator = None):
    generator = generator or def_generator
    data = ndarray([size,cols])
    for c in range(0,cols):
        data[:,c] = [generator(i) for i in range(0,size)]