Remove duplicated elements in a list.
    Args:
        lista: List with elements to clean duplicates.
324591
def remove_list_duplicates(lista, unique=False):
    
    result = []
    allready = []

    for elem in lista:
        if elem not in result:
            result.append(elem)
        else:
            allready.append(elem)

    if unique:
        for elem in allready:
            result = list(filter((elem).__ne__, result))

    return result
910188
def _deduplicate(lst):
    """"""
    out = []
    for i in lst:
        if i not in out:
            out.append(i)
    return out
107477
public static List<String> removeDuplicates(List<String> list) {
		return list.stream().distinct().collect(Collectors.toList());
	}
1018167
@SafeVarargs
    public static double[] removeAll(final double[] a, final double... elements) {
        if (N.isNullOrEmpty(a)) {
            return N.EMPTY_DOUBLE_ARRAY;
        } else if (N.isNullOrEmpty(elements)) {
            return a.clone();
        } else if (elements.length == 1) {
            return removeAllOccurrences(a, elements[0]);
        }

        final DoubleList list = DoubleList.of(a.clone());
        list.removeAll(DoubleList.of(elements));
        return list.trimToSize().array();
    }
277549
def list_remove_by_index(l, index):
    ''''''
    if index < 0 or index >= len(l):
        raise ValueError('index out of range')
    if index == (len(l) - 1):
        l.pop()
    elif index == 0:
        l = l[1:]
    else:
        l = l[0:index] + l[index+1:]

    return l
92559
def remove_duplicate_faces(self):
        
        unique, inverse = grouping.unique_rows(np.sort(self.faces, axis=1))
        self.update_faces(unique)
594875
def dedupe_list(l):
    
    result = []

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

    return result
425752
def clean(self, elements):
		'''  '''

		cleanelements = []
		for i in xrange(len(elements)):
			if isempty(elements[i]):
				return []
			next = elements[i]
			if isinstance(elements[i], (list, tuple)):
				next = self.clean(elements[i])
			if next:
				cleanelements.append(elements[i])
		return cleanelements
799896
@SafeVarargs
    public static boolean[] removeAll(final boolean[] a, final boolean... elements) {
        if (N.isNullOrEmpty(a)) {
            return N.EMPTY_BOOLEAN_ARRAY;
        } else if (N.isNullOrEmpty(elements)) {
            return a.clone();
        } else if (elements.length == 1) {
            return removeAllOccurrences(a, elements[0]);
        }

        final BooleanList list = BooleanList.of(a.clone());
        list.removeAll(BooleanList.of(elements));
        return list.trimToSize().array();
    }
264924
def unlist(list_thing, complain=True):
    """"""
    if complain and len(list_thing) > 1:
        raise ValueError("More than one element in {}".format(list_thing))
    elif len(list_thing) == 1:
        return list_thing[0]

    if complain:
        raise ValueError("Nothing in {}".format(list_thing))
    return None
1163997
public static int removeDuplicateNodeList(List<String> list) {

        int originCount = list.size();
        // add elements to all, including duplicates
        HashSet<String> hs = new LinkedHashSet<String>();
        hs.addAll(list);
        list.clear();
        list.addAll(hs);

        return originCount - list.size();
    }
358564
def duplicates_removed(it, already_seen=()):
    
    lst = []
    seen = set()
    for i in it:
        if i in seen or i in already_seen:
            continue
        lst.append(i)
        seen.add(i)
    return lst
707390
def remove_duplicates_from_list(array):
    ""
    output = []
    unique = set()
    for a in array:
        if a not in unique:
            unique.add(a)
            output.append(a)
    return output
954443
protected static Object clear (
        EqualityComparator eqc, Object[] list, Object element)
    {
        int dex = indexOf(eqc, list, element);
        if (dex == -1) {
            return null;
        }
        Object elem = list[dex];
        list[dex] = null;
        return elem;
    }
470500
def delete_duplicates(seq):
    
    seen = set()
    seen_add = seen.add
    return [x for x in seq if not (x in seen or seen_add(x))]
917155
def remove_duplicates(vector_tuple):
    
    array = np.column_stack(vector_tuple)
    a = np.ascontiguousarray(array)
    unique_a = np.unique(a.view([('', a.dtype)]*a.shape[1]))
    b = unique_a.view(a.dtype).reshape((unique_a.shape[0], a.shape[1]))
    return list(b.T)
1333819
def remove_duplicate_entities(self):
        
        entity_hashes = np.array([hash(i) for i in self.entities])
        unique, inverse = grouping.unique_rows(entity_hashes)
        if len(unique) != len(self.entities):
            self.entities = self.entities[unique]