Did I find the right examples for you? yes no

All Samples(8)  |  Call(6)  |  Derive(0)  |  Import(2)
list(grouper(2, range(4))) -> [(0, 1), (2, 3)] 

        def grouper(n, iterable):
    ''' list(grouper(2, range(4))) -> [(0, 1), (2, 3)] '''
    args = [iter(iterable)] * n
    return itertools.izip(*args)
        


src/j/u/JumpScale-core-6.0.0/lib/JumpScale/baselib/mercurial/hglib/client.py   JumpScale-core(Download)
    def _parserevs(splitted):
        ''' splitted is a list of fields according to our rev.style, where each 6
        fields compose one revision. '''
        revs = []
        for rev in util.grouper(7, splitted):
            fieldcount -= 1
 
        return util.grouper(fieldcount, out)
 
    def heads(self, rev=[], startrev=[], topological=False, closed=False):

src/p/y/python-hglib-1.2/hglib/client.py   python-hglib(Download)
    def _parserevs(splitted):
        ''' splitted is a list of fields according to our rev.style, where each 6
        fields compose one revision. '''
        revs = []
        for rev in util.grouper(7, splitted):
            fieldcount -= 1
 
        return util.grouper(fieldcount, out)
 
    def heads(self, rev=[], startrev=[], topological=False, closed=False):

src/s/v/svg.charts-2.3/svg/charts/schedule.py   svg.charts(Download)
 
from .graph import Graph
from .util import (grouper, date_range, divide_timedelta_float, TimeScale,
	reverse_mapping, flatten_mapping,)
 
	def process_data(self, conf):
		super(Schedule, self).process_data(conf)
		data = conf['data']
		triples = grouper(3, data)
 

src/s/i/sitebucket-HEAD/sitebucket/monitor.py   sitebucket(Download)
from listener import SiteStream, FOLLOW_LIMIT
from thread import ListenThread
from util import grouper
from parser import DefaultParser
 
        '''
        threads = []
        chunks = list(grouper(FOLLOW_LIMIT, follow))
 
        for follow in chunks: