Return only unique items from the collection list.

        :rtype: Collection
334405
def unique(self):
        
        seen = set()
        seen_add = seen.add

        return Collection([x for x in self._items if not (x in seen or seen_add(x))])
930287
def distinct(self):
        
        new_query_set = self.clone()
        new_query_set.query.distinct = True
        return new_query_set
298845
def items(self):
        """"""
        if self.scraper.current_item is not self:
            self._move_here()

        if self._items is None:
            self._items = ItemList()
            self._items.scraper = self.scraper
            self._items.collection = self
            for i in self.scraper._fetch_itemslist(self):
                i.parent = self
                if i.type == TYPE_DATASET and i.dialect is None:
                    i.dialect = self.scraper.dialect
                self._items.append(i)
        return self._items
7191
def list_unique(cls):
		'''

		'''
		query = meta.Session.query(Predicate).distinct(Predicate.namespace)
		return query.all()
433259
def unique(cls, iterable, key=None):
    

    if key is None:
      key = lambda x: x
    def generator():
      seen = set()
      seen_add = seen.add
      for item in iterable:
        key_val = key(item)
        if key_val not in seen:
          seen_add(key_val)
          yield item
    return cls(generator())
1026226
def get_not_unique_values(array):
    '''
    '''
    s = np.sort(array, axis=None)
    s = s[s[1:] == s[:-1]]
    return np.unique(s)
1306161
def filter_vectors(self, input_list):
        
        unique_dict = {}
        for v in input_list:
            unique_dict[v[1]] = v
        return list(unique_dict.values())
279300
def unique(seq, idfunc=None):
	
	if idfunc is None:
		idfunc = lambda x: x
	preserved_type = type(seq)
	seen = {}
	result = []
	for item in seq:
		marker = idfunc(item)
		if marker in seen:
			continue
		seen[marker] = 1
		result.append(item)
	return preserved_type(result)
710284
def get_objects(self):
        
        # Create a mapping of source ARs for copy
        uids = self.request.form.get("uids", "")
        if not uids:
            # check for the `items` parammeter
            uids = self.request.form.get("items", "")
        if isinstance(uids, basestring):
            uids = uids.split(",")
        unique_uids = OrderedDict().fromkeys(uids).keys()
        return filter(None, map(self.get_object_by_uid, unique_uids))
336435
def distinct():
    
    def validate(value):
        for i, item in enumerate(value):
            if item in value[i+1:]:
                return e("{} is not a distinct set of values", value)
    return validate
978933
def get_uniques(l):
    
    result = []

    for i in l:
        if i not in result:
            result.append(i)

    return result
248454
def only(self, *keys):
        
        items = []

        for key, value in enumerate(self.items):
            if key in keys:
                items.append(value)

        return self.__class__(items)
623084
def distinct(xs):
    """"""
    # don't use collections.OrderedDict because we do support Python 2.6
    seen = set()
    return [x for x in xs if x not in seen and not seen.add(x)]
366360
def unique_deps(deps):
    """"""
    deps.sort()
    return list(k for k, _ in itertools.groupby(deps))
917321
def fast_distinct(self):
        
        return self.model.objects.filter(pk__in=self.values_list('pk', flat=True))
960518
def uniqued(iterable):
    
    seen = set()
    return [item for item in iterable if item not in seen and not seen.add(item)]
1253034
def distinct(self, key):
        
        return set(d[key] for d in filter(lambda d: key in d, self.find()))