Extend list1 with list2 as list.extend(), but doesn't append duplicates
    to list1
511372
def extend_unique(list1, list2):
    """"""
    for item in list2:
        if item not in list1:
            list1.append(item)
128833
def list_same(list_a, list_b):
    
    result = []
    for item in list_b:
        if item in list_a:
            result.append(item)
    return result
397720
protected final void append (
        ArrayList<String> list, int index, String value)
    {
        // expand the list as necessary
        while (list.size() <= index) {
            list.add("");
        }
        list.set(index, list.get(index) + value);
    }
554867
def extend_unique(seq, more):
    
    seen = set(seq)
    new = []
    for item in more:
        if item not in seen:
            seen.add(item)
            new.append(item)

    return seq + type(seq)(new)
185814
def deduplicate(list_object):
    """"""
    new = []
    for item in list_object:
        if item not in new:
            new.append(item)
    return new
251336
function extendPreventingOverrides (a, b) {
          Object.keys(b).forEach(addContentFromBtoA)
          return a

          function addContentFromBtoA (key) {
            if (a.hasOwnProperty(key)) {
              mergeIntoAnArray(a, b, key)
            } else {
              a[key] = b[key]
            }
          }
        }
429491
def extend(self, iterable):
        
        # perhaps: self[len(self):len(self)] = iterable
        self._values.extend(self.coerce_value(item) for item in iterable)
153401
def extend(self, other):
        
        def extend_trans(pipe):
            values = list(other.__iter__(pipe)) if use_redis else other
            for v in values:
                self._append_helper(v, pipe)

        if self._same_redis(other, RedisCollection):
            use_redis = True
            self._transaction(extend_trans, other.key)
        else:
            use_redis = False
            self._transaction(extend_trans)
840201
def list_merge(list_a, list_b):
    
    #return list(collections.OrderedDict.fromkeys(list_a + list_b))
    #result = list(list_b)
    result = []
    for item in list_a:
        if not item in result:
            result.append(item)
    for item in list_b:
        if not item in result:
            result.append(item)
    return result
685141
def merge_dicts(dict1, dict2, append_lists=False):
    
    for key in dict2:
        if isinstance(dict2[key], dict):
            if key in dict1 and key in dict2:
                merge_dicts(dict1[key], dict2[key], append_lists)
            else:
                dict1[key] = dict2[key]
        # If the value is a list and the ``append_lists`` flag is set,
        # append the new values onto the original list
        elif isinstance(dict2[key], list) and append_lists:
            # The value in dict1 must be a list in order to append new
            # values onto it. Don't add duplicates.
            if key in dict1 and isinstance(dict1[key], list):
                dict1[key].extend(
                    [k for k in dict2[key] if k not in dict1[key]])
            else:
                dict1[key] = dict2[key]
        else:
            dict1[key] = dict2[key]
1065308
def equal(list1, list2):
    
    return [item1 == item2 for item1, item2 in broadcast_zip(list1, list2)]
837229
def extend(self, *args, **kwargs):
        
        if len(args) > 1:
            raise TypeError("extend() takes at most 1 positional "
                            "arguments ({0} given)".format(len(args)))
        other = args[0] if len(args) >= 1 else ()

        if isinstance(other, HTTPHeaderDict):
            for key, val in other.iteritems():
                self.add(key, val)
        elif isinstance(other, Mapping):
            for key in other:
                self.add(key, other[key])
        elif hasattr(other, "keys"):
            for key in other.keys():
                self.add(key, other[key])
        else:
            for key, value in other:
                self.add(key, value)

        for key, value in kwargs.items():
            self.add(key, value)
385938
def append_to_list(self, source, start=None, hasIndex=False):
        '''
        '''
        nfy = Numberify()
        try:
            if start is None:
                if type(source) is str:
                    if hasIndex is True:
                        newList = self.get_from_indexedFile(source)
                else:
                    newList = nfy.numberify_data(source,
                                                 len(self.nameDict) + 1)
            else:
                newList = nfy.numberify_data(source, start)
            self.nameDict = dict(self.nameDict.items() + newList.items())
            self.totalCount = len(self.nameDict)
        except:
            print 'Unknown error:', exc_info()[0]
1218516
def _extend_nodelist(extends_node, context, instance_types):
    
    results = []

    # Find all blocks in the complete inheritance chain
    blocks = extends_node.blocks.copy()  # dict with all blocks in the current template
    _extend_blocks(extends_node, blocks, context)

    # Dive into all blocks of the page one by one
    all_block_names = list(blocks.keys())
    for block in list(blocks.values()):
        results += _scan_nodes(block.nodelist, context, instance_types, block, ignore_blocks=all_block_names)

    # Scan topmost template for nodes that exist outside of blocks
    parent_template = _find_topmost_template(extends_node, context)
    if not parent_template:
        return []
    else:
        results += _scan_nodes(parent_template.nodelist, context, instance_types, ignore_blocks=all_block_names)
        return results
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
248347
def extend(self, iterable):
        
        new_right_list, new_left_list, extend_count = self._extend(self._right_list, self._left_list, iterable)
        return PDeque(new_left_list, new_right_list, self._length + extend_count, self._maxlen)
1363077
def uniqify(list_):
  ""
  a=[]
  for x in list_:
    if x not in a: a.append(x)
  return a