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

All Samples(8)  |  Call(4)  |  Derive(0)  |  Import(4)

src/i/p/ipython-HEAD/IPython/utils/data.py   ipython(Download)
#-----------------------------------------------------------------------------
 
from .py3compat import xrange
 
def uniq_stable(elems):
def chop(seq, size):
    """Chop a sequence into chunks of the given size."""
    return [seq[i:i+size] for i in xrange(0,len(seq),size)]
 
 

src/i/p/ipython-2.0.0/IPython/utils/data.py   ipython(Download)
#-----------------------------------------------------------------------------
 
from .py3compat import xrange
 
def uniq_stable(elems):
def chop(seq, size):
    """Chop a sequence into chunks of the given size."""
    return [seq[i:i+size] for i in xrange(0,len(seq),size)]
 
 

src/i/p/ipython-HEAD/IPython/utils/timing.py   ipython(Download)
import time
 
from .py3compat import xrange
 
#-----------------------------------------------------------------------------
        tot_time = clock()-start
    else:
        rng = xrange(reps-1) # the last time is executed separately to store output
        start = clock()
        for dummy in rng: func(*args,**kw)

src/i/p/ipython-2.0.0/IPython/utils/timing.py   ipython(Download)
import time
 
from .py3compat import xrange
 
#-----------------------------------------------------------------------------
        tot_time = clock()-start
    else:
        rng = xrange(reps-1) # the last time is executed separately to store output
        start = clock()
        for dummy in rng: func(*args,**kw)