Return unique list of ``iterable`` items preserving order.

    >>> uniqued('spameggs')
    ['s', 'p', 'a', 'm', 'e', 'g']
960518
def uniqued(iterable):
    
    seen = set()
    return [item for item in iterable if item not in seen and not seen.add(item)]
77702
def titles(self, unique=False):
        
        if unique:
            return tools.uniqued(s.title for s in self._items)
        return [s.title for s in self._items]
601747
def unique(iterable):
    
    seen = set()
    return [x for x in iterable if x not in seen and not seen.add(x)]
108577
def unique_everseen(seq):
    """"""
    seen = set()
    seen_add = seen.add
    return [x for x in seq if not (x in seen or seen_add(x))]
52227
def unique(seq):
    """"""
    seen = {}
    result = []
    for item in seq:
        marker = item
        if marker in seen:
            continue
        seen[marker] = 1
        result.append(item)
    return result
390799
def unique_justseen(iterable, key=None):
    ""
    # unique_justseen('AAAABBBCCDAABBB') --> A B C D A B
    # unique_justseen('ABBCcAD', str.lower) --> A B C A D
    return imap(next, imap(operator.itemgetter(1), groupby(iterable, key)))
904022
def distinct(self, key=lambda x: x):
        
        return Enumerable(self.group_by(key=key).select(lambda g: g.first()).to_list())
1032558
def uniqueTags(tagList):
    '''
        
    '''
    ret = []
    alreadyAdded = set()
    for tag in tagList:
        myUid = tag.getUid()
        if myUid in alreadyAdded:
            continue
        ret.append(tag)
    return TagCollection(ret)
708161
def distinct(keys):
    
    known = set()
    outlist = []
    for key in keys:
        if key not in known:
            outlist.append(key)
        known.add(key)
    return outlist
1089614
def _duplicates(list_):
    """"""
    item_indices = {}
    for i, item in enumerate(list_):
        try:
            item_indices[item].append(i)
        except KeyError:  # First time seen
            item_indices[item] = [i]
    return item_indices
298387
def make_unique_ngrams(s, n):
    """"""
    return set(s[i:i + n] for i in range(len(s) - n + 1))
1272906
def _uniquewords(*args):
    """"""
    words = {}
    n = 0
    for word in itertools.chain(*args):
        if word not in words:
            words[word] = n
            n += 1
    return words
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)]
177034
def all_unique(keys, axis=semantics.axis_default):
    """"""
    index = as_index(keys, axis)
    return index.groups == index.size
778438
def uniquify_list(L):
    """"""
    return [e for i, e in enumerate(L) if L.index(e) == i]
420558
def unique(list1, list2):
    
    set2 = set(list2)
    list1_unique = [x for x in tqdm(list1, desc='Unique', total=len(list1)) if x not in set2]
    return list1_unique
930324
def inverable_unique_two_lists(item1_list, item2_list):
    
    import utool as ut
    unique_list1, inverse1 = np.unique(item1_list, return_inverse=True)
    unique_list2, inverse2 = np.unique(item2_list, return_inverse=True)

    flat_stacked, cumsum = ut.invertible_flatten2((unique_list1, unique_list2))
    flat_unique, inverse3 = np.unique(flat_stacked, return_inverse=True)
    reconstruct_tup = (inverse3, cumsum, inverse2, inverse1)
    return flat_unique, reconstruct_tup