Iterates over all items in all groups
511296
def each_item(group=nil, &block)
      group = group || @groups

      group.each do |item|
        if item["items"]
          each_item(item["items"], &block)
        else
          block.call(item)
        end
      end
    end
50090
def enumerate(self, **kwargs):
        '''
        '''
        for item in self.set.enumerate(**kwargs):
            yield flattened(item)
17280
def all(cls):
        
        result = []
        for name in dir(cls):
            if not name.isupper():
                continue
            value = getattr(cls, name)
            if isinstance(value, ItemsList):
                result.append(value[0])
            else:
                result.append(value)
        return result
254010
def i_batch(max_size, iterable):
    
    iterable_items = iter(iterable)
    for items_batch in iter(lambda: tuple(islice(iterable_items, max_size)),
                            tuple()):
        yield items_batch
241517
def split_every(n, iterable):
    """"""
    items = iter(iterable)
    return itertools.takewhile(bool, (list(itertools.islice(items, n)) for _ in itertools.count()))
299531
def iteritems(self):
        """"""
        for key in self:
            vals = _dict_getitem(self, key)
            for val in vals[1:]:
                yield vals[0], val
647629
def _iter_grouped(self):
        """"""
        for indices in self._group_indices:
            yield self._obj.isel(**{self._group_dim: indices})
117329
def iter_islast(iterable):
    
    it = iter(iterable)
    prev = next(it)
    for item in it:
        yield prev, False
        prev = item
    yield prev, True
500390
def get_grouped(self, go_ntsets, go_all, gosubdag, **kws):
        """"""
        kws_grpd = {k:v for k, v in kws.items() if k in Grouped.kws_dict}
        kws_grpd['go2nt'] = self._init_go2ntpresent(go_ntsets, go_all, gosubdag)
        return Grouped(gosubdag, self.godag.version, **kws_grpd)
1220865
def full_groupby(iterable, key=None):
    

    return groupby(sorted(iterable, key=key), key=key)
474107
def _grouped(iterable, n):
        
        args = [iter(iterable)] * n
        return [[e for e in t if not e is None] for t in zip_longest(*args, fillvalue=None)]
449716
def iter_finds(regex_obj, s):
    """"""
    if isinstance(regex_obj, str):
        for m in re.finditer(regex_obj, s):
            yield m.group()
    else:
        for m in regex_obj.finditer(s):
            yield m.group()
1222293
function isGroupResult(item) {
  log.trace('isGroupResult(%j)', item);

  if (! item) return(false);
  if (item.groupType) return(true);
  if (item.objectCategory) {
    re.isGroupResult.lastIndex = 0; // Reset the regular expression
    return(re.isGroupResult.test(item.objectCategory));
  }
  if ((item.objectClass) && (item.objectClass.length > 0)) {
    return(_.any(item.objectClass, function(c) { return(c.toLowerCase() === 'group'); }));
  }
  return(false);
}
1068492
def items(self):
        """"""
        keycol = self._keycol
        for row in self.__iter__():
            yield (row[keycol], dict(row))
1191435
def items(iterable):
    
    if hasattr(iterable, 'iteritems'):
        return (p for p in iterable.iteritems())
    elif hasattr(iterable, 'items'):
        return (p for p in iterable.items())
    else:
        return (p for p in enumerate(iterable))
1034831
function groupBy(collection, iteratee) {
    return collection.reduce(function (records, record) {
        var key = iteratee(record);
        if (records[key] === undefined) {
            records[key] = [];
        }
        records[key].push(record);
        return records;
    }, {});
}
1075325
def groups_of(n, iterable):
    
    args = [iter(iterable)] * n
    for x in izip_longest(*args):
        yield [v for v in x if v is not None]