Return a filtered iteration over a list of items.
769697
def filterCollapsedItems(data):
  """"""
  return ((key, value)\
          for key, value in six.iteritems(data) \
          if not (isinstance(value, StatContainer) and value.isCollapsed()))
841515
def filtered_entries(self):
        """"""
        return [
            e for e in self.entries if not any(fnmatch.fnmatch(e.name.lower(), p.lower()) for p in self.exclude_list)
        ]
987279
function (query, items) {
            var expression = query.query.where,
                ret = [];

            for (var i = 0; i < items.length; i++) {
                if (this._filterItem(items[i], expression)) {
                    ret.push(items[i]);
                }
            }

            return ret;

        }
1180858
public static <T> List<T> filtered(Collection<T> data, Filter<T> filter) {
        List<T> list = new ArrayList<>();
        if (!Utils.isEmpty(data)) {
            for (T item : data) {
                if (filter.accept(item)) {
                    list.add(item);
                }
            }
        }
        return list;
    }
1215277
def _filter_none(items):
    """"""
    type_ = list if isinstance(items, list) else tuple
    return type_(filter(_not_none, items))
396005
def _filter_classes(cls_list, cls_type):
    """"""
    for cls in cls_list:
        if isinstance(cls, type) and issubclass(cls, cls_type):
            if cls_type == TempyPlace and cls._base_place:
                pass
            else:
                yield cls
1080500
def filter(self, table, snapshots, filter_string):
        """"""
        query = filter_string.lower()
        return [snapshot for snapshot in snapshots
                if query in snapshot.name.lower()]
630773
def _process_items(cls, vals):
        ""
        if type(vals) is cls:
            return vals.data
        elif not isinstance(vals, (list, tuple)):
            vals = [vals]
        items = []
        counts = defaultdict(lambda: 1)
        cls._unpack_paths(vals, items, counts)
        items = cls._deduplicate_items(items)
        return items
1280494
def filter(self, base_collection):
        ''''''
        for item in base_collection:
            excluded = []
            for (name, exclude) in self._filters:
                if exclude(item):
                    excluded.append(name)
            if excluded:
                filter_value = "; ".join(excluded)
            else:
                filter_value = None
            yield item, filter_value
1068492
def items(self):
        """"""
        keycol = self._keycol
        for row in self.__iter__():
            yield (row[keycol], dict(row))
116420
def filter(self, collection, data, **kwargs):
        """"""
        ops = self.parse(data)
        collection = self.apply(collection, ops, **kwargs)
        return ops, collection
1101364
function () {
    var items = [];
    for (var i = 0, length = this.getFilteredItemCount(); i < length; i++) {
      items.push(this.items[this.convertViewIndexToModel(i)]);
    }
    return items;
  }
833424
def dremove(self, **kwds):
        
        filtered_dr = self.dfilter(**kwds)
        for item in filtered_dr:
            self.remove(item)
        return filtered_dr
1297509
function(_items) {
        var list = new List();
        if(_items) list.push.apply(list, _items);
        return list;
      }
815447
def get_item_by_key(passed_list, key, value):
    '''
    
    '''

    if value in [None, '']:
        return

    if type(passed_list) in [QuerySet, PolymorphicQuerySet]:
        sub_list = passed_list.filter(**{key: value})
    else:
        sub_list = [x for x in passed_list if x.get(key) == value]

    if len(sub_list) == 1:
        return sub_list[0]
    return sub_list
861088
def filter(self, func):
        
        return TList([v for k, v in self.items() if func(k, v)])
495081
def filter_dict(d, keys):
    
    return {k: v for k, v in d.items() if k in keys}