Removes duplicate elements from given @seq

        @seq: a #list or sequence-like object

        -> #list
161683
def unique_list(seq):
    
    seen = set()
    seen_add = seen.add
    return [x for x in seq if not (x in seen or seen_add(x))]
905532
void removeEQ(Object o) {
        final ReentrantLock lock = this.lock;
        lock.lock();
        try {
            for (Iterator<E> it = q.iterator(); it.hasNext(); ) {
                if (o == it.next()) {
                    it.remove();
                    break;
                }
            }
        } finally {
            lock.unlock();
        }
    }
389847
def unique(objects, key=None):
    
    dupl = []
    for obj, group in itertools.groupby(sorted(objects), key):
        if sum(1 for _ in group) > 1:
            dupl.append(obj)
    if dupl:
        raise ValueError('Found duplicates %s' % dupl)
    return objects
181902
def tolist(expr, **kwargs):
    
    unique = kwargs.get('unique', kwargs.get('_unique', False))
    output_type = None

    if isinstance(expr, (SequenceExpr, SequenceGroupBy)):
        output_type = types.List(expr._data_type)
    return _reduction(expr, ToList, output_type, _unique=unique)
940434
def dedup_sequence(sequence)
      sequence.uniq { |item| [item.class, item.middleware, item.config] }
    end
990884
def purge_duplicates(list_in):
    
    _list = []
    for item in list_in:
        if item not in _list:
            _list.append(item)
    return _list
185814
def deduplicate(list_object):
    """"""
    new = []
    for item in list_object:
        if item not in new:
            new.append(item)
    return new
892407
def remove_duplicates(errors):
    
    passed = defaultdict(list)
    for error in errors:
        key = error.linter, error.number
        if key in DUPLICATES:
            if key in passed[error.lnum]:
                continue
            passed[error.lnum] = DUPLICATES[key]
        yield error
41111
function filter(seq, pred, ctx) {
        return sequencep(seq)?  __filter.call(seq, pred, ctx)
             : /* non-seq */    []
    }
229585
def filter_seq(seq):
     ''''''
     if seq.res:
          return None
     n = nt.Factors(seq.factors)
     guide, s, t = aq.canonical_form(n)
     seq.guide = guide
     # The target_tau for the composite is at most the class minus extant prime factor count
     cls = aq.get_class(guide=guide)
     num_larges = seq.factors.count('P')
     upper_bound_tau = cls - num_larges - len(t)

     if cls < 2 or upper_bound_tau < 2: # Cheap tests to eliminate almost all sequences
          return None

     # Next we ignore sequences whose guide is solely a power of 2 greater than 3
     v = nt.Factors({p: a for p, a in guide.items() if p != 2 and a > 0})
     if int(v) == 1 and cls > 3:
          return None
     # This condition greatly reduces fdb load, but excludes a lot of sequences
     if not aq.is_driver(guide=guide):
          return None

     return n, guide
411169
public static ObjectSequence<TimeSeriesCollection> mergeSequences(ObjectSequence<TimeSeriesCollection>... tsSeq) {
        if (tsSeq.length == 0)
            return ObjectSequence.empty();
        if (tsSeq.length == 1)
            return tsSeq[0];

        // Sort sequences and remove any that are empty.
        final Queue<ObjectSequence<TimeSeriesCollection>> seq = new PriorityQueue<>(Comparator.comparing(ObjectSequence::first));
        seq.addAll(Arrays.stream(tsSeq)
                .filter(s -> !s.isEmpty())
                .collect(Collectors.toList()));
        // It's possible the filtering reduced the number of elements to 0 or 1...
        if (seq.isEmpty())
            return ObjectSequence.empty();
        if (seq.size() == 1)
            return seq.element();

        final List<ObjectSequence<TimeSeriesCollection>> output = new ArrayList<>(tsSeq.length);
        while (!seq.isEmpty()) {
            final ObjectSequence<TimeSeriesCollection> head = seq.remove();
            if (seq.isEmpty()) {
                output.add(head);
                continue;
            }

            if (head.last().compareTo(seq.element().first()) < 0) {
                output.add(head);
                continue;
            }

            final List<ObjectSequence<TimeSeriesCollection>> toMerge = new ArrayList<>();

            // Find the intersecting range.
            final int headProblemStart = head.equalRange(tsc -> tsc.compareTo(seq.element().first())).getBegin();
            output.add(head.limit(headProblemStart));  // Add non-intersecting range to output.
            toMerge.add(head.skip(headProblemStart));  // Add problematic area to 'toMerge' collection.

            // Find all remaining intersecting ranges and add them to 'toMerge', replacing them with their non-intersecting ranges.
            final TimeSeriesCollection headLast = head.last();
            while (!seq.isEmpty() && seq.element().first().compareTo(headLast) <= 0) {
                final ObjectSequence<TimeSeriesCollection> succ = seq.remove();
                TimeSeriesCollection succFirst = succ.first();
                System.err.println("succ.first: " + succ.first() + ", head.last: " + headLast);

                // Add intersecting range of succ to 'toMerge'.
                final int succProblemEnd = succ.equalRange(tsc -> tsc.compareTo(headLast)).getEnd();
                assert succProblemEnd > 0;
                toMerge.add(succ.limit(succProblemEnd));

                // Add non-intersecting range of succ back to 'seq'.
                ObjectSequence<TimeSeriesCollection> succNoProblem = succ.skip(succProblemEnd);
                if (!succNoProblem.isEmpty())
                    seq.add(succNoProblem);
            }

            assert (toMerge.size() > 1);
            output.add(fixSequence(ObjectSequence.concat(toMerge, false, false)));
        }

        return ObjectSequence.concat(output, true, true);
    }
972203
function sequence ( map, components, results, missing, recursive, nest ) {
  components.forEach( component => {
    if ( results.indexOf( component ) !== -1 ) {
      return; // de-dup results
    }

    const deps = map.get( component );

    if ( ! deps ) {
      missing.push( component );
    } else if ( nest.indexOf( component ) > -1 ) {
      nest.push( component );
      recursive.push( nest.slice(0) );
      nest.pop( component );
    } else if ( deps.length ) {
      nest.push( component );
      sequence( map, deps, results, missing, recursive, nest ); // recurse
      nest.pop( component );
    }
    results.push( component );
  });
}
1005073
def _join_sequence(seq, last_separator=''):
    """"""
    count = len(seq)
    return ', '.join(_format_element(element, count, i, last_separator)
                     for i, element in enumerate(seq))
1216017
public <T> List<T> reorder( List<T> sequence)
    {
    int elementCount = sequence.size();
    if( elementCount > 1)
      {
      List<T> elements = new ArrayList<T>( sequence);
      sequence.clear();

      for( ; elementCount > 0; elementCount--)
        {
        sequence.add( elements.remove( generator_.nextInt( elementCount)));
        }
      }

    return sequence;
    }
178742
function replace_at(seq, index, sub) { var result
        result = copy(seq)
        result[index] = sub
        return result
    }
807088
function dedupe(list){
	var retlist = [];
	if( list && list.length > 1 ){
	    retlist = get_keys(hashify(list));
	}
	return retlist;
    }
804725
def is_unique(seq):
    ''''''
    try:
        s = set(seq)
        return len(s) == len(seq)
    except TypeError:
        buf = []
        for item in seq:
            if item in buf:
                return False
            buf.append(item)
        return True