Return list of objects shared by listA, listB.
165784
def overlap(listA, listB):
    
    if (listA is None) or (listB is None):
        return []
    else:
        return list(set(listA) & set(listB))
662902
private static <A, B> Map<A, B> listToMap(List<Map.Entry<A, B>> list) {
    Map<A, B> result = new LinkedHashMap<A, B>();
    for (Iterator<Map.Entry<A, B>> it = list.iterator(); it.hasNext();) {
      Map.Entry<A, B> entry = (Map.Entry<A, B>) it.next();
      result.put(entry.getKey(), entry.getValue());
    }
    return result;
  }
638409
def from_list(cls, l):
        """"""
        if len(l) == 3:
                x, y, z = map(float, l)
                return cls(x, y, z)
        elif len(l) == 2:
            x, y = map(float, l)
            return cls(x, y)
        else:
            raise AttributeError
39884
def _get_list(self, key, operation, create=False):
        
        return self._get_by_type(key, operation, create, b'list', [])
1322849
def get_list_representation(self):
        """"""
        if self.is_list:
            return self.list_or_slice
        else:
            return self[list(range(self.num_examples))]
976182
private List<String> getObjectList() {
        if (cachedIds != null) return cachedIds;

        SharedPreferences prefs = loadSharedPreferences("objectList");

        String list = prefs.getString("list", null);

        cachedIds = (list == null) ? new ArrayList<String>() : new ArrayList<>(Arrays.asList(list.split(",")));
        return cachedIds;
    }
12169
def get_shared_nodes(G1: nx.DiGraph, G2: nx.DiGraph) -> List[str]:
    """"""
    return list(set(G1.nodes()).intersection(set(G2.nodes())))
42419
def items(self):
        ""
        return list(zip(list(self.keys()), list(self.values())))
160748
def _format_list_objects(result):
    """"""

    all_keys = set()
    for item in result:
        all_keys = all_keys.union(item.keys())

    all_keys = sorted(all_keys)
    table = Table(all_keys)

    for item in result:
        values = []
        for key in all_keys:
            value = iter_to_table(item.get(key))
            values.append(value)

        table.add_row(values)

    return table
356464
def list_objects_access(f):
    """"""

    @functools.wraps(f)
    def wrapper(request, *args, **kwargs):
        if not django.conf.settings.PUBLIC_OBJECT_LIST:
            trusted(request)
        return f(request, *args, **kwargs)

    return wrapper
259867
public void getInterestingObjects (ArrayList<ObjectInfo> list)
    {
        for (Iterator<Section> iter = getSections(); iter.hasNext(); ) {
            Section sect = iter.next();
            for (ObjectInfo element : sect.objectInfo) {
                list.add(element);
            }
        }
    }
1178195
def getobjects(bunchdt, data, commdct, key, places=7, **kwargs):
    """"""
    idfobjects = bunchdt[key]
    allobjs = []
    for obj in idfobjects:
        if __objecthasfields(
                bunchdt, data, commdct,
                obj, places=places, **kwargs):
            allobjs.append(obj)
    return allobjs
50860
public static boolean sameList(final Object[] a, final Object[] b) {
    if (a == null || b == null || a.length != b.length) {
      return false;
    }
    for (int i = 0; i < a.length; i++) {
      if (!a[i].equals(b[i])) {
        return false;
      }
    }
    return true;
  }
227815
def items(self, founditems=[]): #pylint: disable=dangerous-default-value
        """"""
        l = []
        for e in self.data:
            if  e not in founditems: #prevent going in recursive loops
                l.append(e)
                if isinstance(e, AbstractElement):
                    l += e.items(l)
        return l
868826
def get_objects_of_class(cls):
        
        return list(o for o in gc.get_objects() if isinstance(o, cls))
85210
def _as_list(obj):
    """"""
    if obj is None:
        return None
    elif isinstance(obj, string_types):
        return [obj]
    elif isinstance(obj, tuple):
        return list(obj)
    elif not hasattr(obj, '__len__'):
        return [obj]
    else:
        return obj
1103607
def as_list(self):
        """"""
        return [self.name, self.value, [x.as_list for x in self.children]]