Get the full dict of maps {map_name: map_class}.
971144
def get_maps():
  """"""
  maps = {}
  for mp in Map.all_subclasses():
    if mp.filename:
      map_name = mp.__name__
      if map_name in maps:
        raise DuplicateMapException("Duplicate map found: " + map_name)
      maps[map_name] = mp
  return maps
1296409
def mapped(cls, key='id', **kwargs):
    """"""
    kwargs.setdefault('metadata', {})
    kwargs['metadata']['jsonldPredicate'] = {'mapSubject': key}
    kwargs.setdefault('default', attr.Factory(list))

    def converter(value):
        """Convert mapping to a list of instances."""
        if isinstance(value, dict):
            result = []
            for k, v in iteritems(value):
                if not hasattr(cls, 'from_cwl'):
                    vv = dict(v)
                    vv[key] = k
                else:
                    vv = attr.evolve(cls.from_cwl(v), **{key: k})
                result.append(vv)
        else:
            result = value

        def fix_keys(data):
            """Fix names of keys."""
            for a in fields(cls):
                a_name = a.name.rstrip('_')
                if a_name in data:
                    yield a.name, data[a_name]

        return [
            cls(**{kk: vv
                   for kk, vv in fix_keys(v)}) if not isinstance(v, cls) else v
            for v in result
        ]

    kwargs['converter'] = converter
    return attr.ib(**kwargs)
1056304
def get_map_data(self):
        

        return {
            'containerSelector': '#' + self.get_map_element_id(),
            'center': self.map_center_description,
            'marker': self.map_marker_description or self.map_center_description,
            'zoom': self.map_zoom,
            'href': self.get_map_href(),
            'key': getattr(settings, 'GOOGLE_MAPS_API_KEY', ''),
            # Python's line-splitting is more cross-OS compatible, so we feed
            # a pre-built array to the front-end
            'description': [
                line for line in self.map_description.splitlines() if line
            ],
        }
297490
public Map<String, ClassInfo> getAllClassesAsMap() {
        if (closed.get()) {
            throw new IllegalArgumentException("Cannot use a ScanResult after it has been closed");
        }
        if (!scanSpec.enableClassInfo) {
            throw new IllegalArgumentException("Please call ClassGraph#enableClassInfo() before #scan()");
        }
        return classNameToClassInfo;
    }
742520
def _get_name_map(saltenv='base'):
    '''
    
    '''
    u_name_map = {}
    name_map = get_repo_data(saltenv).get('name_map', {})

    if not six.PY2:
        return name_map

    for k in name_map:
        u_name_map[k] = name_map[k]
    return u_name_map
1362868
def get_all_classes(module_name):
    """"""
    module = importlib.import_module(module_name)
    return getmembers(module, lambda m: isclass(m) and not isabstract(m))
3816
def items(self):
        ""
        return (list(self._pb.IntMap.items()) + list(self._pb.StringMap.items()) +
                list(self._pb.FloatMap.items()) + list(self._pb.BoolMap.items()))
938172
private static Map<Object, Object> getAllFieldsByClassIntern (Class<?> pvClass, Map<Object, Object> pvFieldsMap) {
		putAllFieldsIntern( pvClass.getFields(), pvFieldsMap) ;		
		putAllFieldsIntern( pvClass.getDeclaredFields(), pvFieldsMap);
		
		if (!(pvClass.getSuperclass().equals(Object.class))) {
			getAllFieldsByClassIntern(pvClass.getSuperclass(), pvFieldsMap);
		}
		return pvFieldsMap;
	}
1032250
def _mapper(self):
        
        return {
            'card': Payment.Card,
            'customer': Payment.Customer,
            'hosted_payment': Payment.HostedPayment,
            'notification': Payment.Notification,
            'failure': Payment.Failure,
        }
632709
def load_maps(maps_dir):
    
    maps_dir = os.path.abspath(maps_dir)
    maps = {}
    for root, dirnames, filenames in os.walk(maps_dir):
        for filename in filenames:
            if filename.endswith(".xml"):
                xml_file = os.path.join(root, filename)
                map = MapSource.from_xml(xml_file, maps_dir)
                if map.id in maps:
                    raise MapSourceException("duplicate map id: {} in file {}".format(map.id, xml_file))
                else:
                    maps[map.id] = map
    return maps
654068
def dict_contents(self, use_dict=None, as_class=dict):
        """"""
        if _debug: Choice._debug("dict_contents use_dict=%r as_class=%r", use_dict, as_class)

        # make/extend the dictionary of content
        if use_dict is None:
            use_dict = as_class()

        # look for the chosen element
        for element in self.choiceElements:
            value = getattr(self, element.name, None)
            if value is None:
                continue

            if issubclass(element.klass, Atomic):
                mapped_value = value                    ### ambiguous
            elif issubclass(element.klass, AnyAtomic):
                mapped_value = value.value              ### ambiguous
            elif isinstance(value, element.klass):
                mapped_value = value.dict_contents(as_class=as_class)

            use_dict.__setitem__(element.name, mapped_value)
            break

        # return what we built/updated
        return use_dict
22774
def get_mapping(self, meta_fields=True):
        '''
        
        '''
        return {'properties': dict((name, field.json()) for name, field in iteritems(self.fields) if meta_fields or name not in AbstractField.meta_fields)}
567208
def data(self):
        
        d = {}
        for name in self.key_names:
            d[name] = self.__dict__.get(name, None)
        return d
885834
@SuppressWarnings("rawtypes")
	public static Class<?> getMapKeyType(Class<? extends Map> mapClass) {
		return ResolvableType.forClass(mapClass).asMap().resolveGeneric(0);
	}
869631
def get_mapping(self):  # TODO: rename to _as_dict
        
        return {
            key: val
            for key, val in self.__dict__.iteritems()
            if val
        }
236870
@JsonIgnore
    @SuppressWarnings("unchecked")
    public Map<String, Object> getDataMap() {
        if (data instanceof Map) {
            return (Map<String, Object>) data;
        }
        return Collections.emptyMap();
    }
1198141
public Map<K, V> getMap() {
        if (mode == StorageMode.LIST) {
            synchronized (this) {
                if (mode == StorageMode.LIST) {
                    mapData = convertListToMap(listData);
                    mode = StorageMode.BOTH;
                }
            }
        }
        return Collections.unmodifiableMap(mapData);
    }