Get all values for a enum (gtype).
196004
def values_for_enum(gtype):
    """"""

    g_type_class = gobject_lib.g_type_class_ref(gtype)
    g_enum_class = ffi.cast('GEnumClass *', g_type_class)

    values = []

    # -1 since we always have a "last" member.
    for i in range(0, g_enum_class.n_values - 1):
        value = _to_string(g_enum_class.values[i].value_nick)
        values.append(value)

    return values
1188365
def itervalues(self):
        ""
        return chain(self._pb.StringMap.values(),
                     self._pb.IntMap.values(),
                     self._pb.FloatMap.values(),
                     self._pb.BoolMap.values())
924520
public static <T extends Enum<T>> T getEnumValue(Class<T> enumType,
            String name) {
        if (StringUtils.isEmpty(name)) {
            return null;
        }
        
        try {
            T v = Enum.valueOf(enumType, name);
            return v;
        } catch (IllegalArgumentException e) {
            return null;
        }
    }
680720
def _iter_vals(key):
    
    for i in range(winreg.QueryInfoKey(key)[1]):
        yield winreg.EnumValue(key, i)
748782
def _get_types(type_):
    

    return list(
        itertools.chain.from_iterable(
            map(lambda x: TYPE_MAPPINGS[x].get(type_, []), TYPE_MAPPINGS)
        )
    )
299012
private static String getValue(Enum<?> value){
		try{
			Method m = value.getClass().getDeclaredMethod("value");
			return (String) m.invoke(value);
		} catch (NoSuchMethodException ex){
		} catch (IllegalAccessException ex){
		} catch (InvocationTargetException ex){
		}
		return value.toString();
	}
347609
def GameTypeEnum(ctx):
    """"""
    return Enum(
        ctx,
        RM=0,
        Regicide=1,
        DM=2,
        Scenario=3,
        Campaign=4,
        KingOfTheHill=5,
        WonderRace=6,
        DefendTheWonder=7,
        TurboRandom=8
    )
147603
function _enumKeys(it) {
	  var result = _objectKeys(it);
	  var getSymbols = _objectGops.f;
	  if (getSymbols) {
	    var symbols = getSymbols(it);
	    var isEnum = _objectPie.f;
	    var i = 0;
	    var key;
	    while (symbols.length > i) {
	      if (isEnum.call(it, key = symbols[i++])) result.push(key);
	    }
	  }return result;
	}
1138901
def _get_all(self, _type):
        
        if _type not in self.modules:
            raise ValueError("No such module, %s" % _type)
        if not self.insts_implementing.get(_type, None):
            raise ValueError("No instance implementing %s" % _type)
        return self.insts_implementing[_type]
1064383
def _values(self):
        """"""
        return [
            val for serie in self.series for val in serie.values
            if val is not None
        ]
384891
def nvalues(self):
        """"""
        if self._nvalues is None:
            self._nvalues = 0
            for val in self.values:
                if type(val) == type(int):
                    self._nvalues += val
                else:
                    self._nvalues = -1
                    break

        return self._nvalues
595577
def get_all_objects(self):
        ""
        for i, generation in enumerate(self.gc_generations):
            generation_head_ptr = pygc_head_ptr = generation.head.get_pointer()
            generation_head_addr = generation_head_ptr._value
            while True:
                # _PyObjectBase_GC_UNTRACK macro says that
                # gc_prev always points to some value
                # there is still a race condition if PyGC_Head
                # gets free'd and overwritten just before we look
                # at him
                pygc_head_ptr = pygc_head_ptr.deref().gc_next
                if pygc_head_ptr._value == generation_head_addr:
                    break
                yield pygc_head_ptr.deref().get_object_ptr()
510774
def get_vals(self, field, goids=None):
        """"""
        go2nt = self.go2nt
        if goids is None:
            goids = set(go2nt)
        return [getattr(go2nt[go], field) for go in goids]
581826
def _parse_caps_loader(node):
    '''
    
    '''
    enums = [_parse_caps_enum(enum) for enum in node.findall('enum')]
    result = {item[0]: item[1] for item in enums if item[0]}

    values = [child.text for child in node.findall('value')]

    if values:
        result['values'] = values

    return result
739436
def get_values(self, dtype=None):
        
        if is_object_dtype(dtype):
            return self.values.astype(object)
        return self.values
1314196
def _get_types(self):
		
		types = []
		num_values = []
		for hp in self.configspace.get_hyperparameters():
			#print(hp)
			if isinstance(hp, CS.CategoricalHyperparameter):
				types.append('U')
				num_values.append(len(hp.choices))
			elif isinstance(hp, CS.UniformIntegerHyperparameter):
				types.append('I')
				num_values.append((hp.upper - hp.lower + 1))
			elif isinstance(hp, CS.UniformFloatHyperparameter):
				types.append('C')
				num_values.append(np.inf)
			elif isinstance(hp, CS.OrdinalHyperparameter):
				types.append('O')
				num_values.append(len(hp.sequence))
			else:
				raise ValueError('Unsupported Parametertype %s'%type(hp))
		return(types, num_values)
518702
private static Map<String, Object> getEnumNamesMap(Class<? extends Enum<?>> enumType) {
		final String sourceMethod = "getEnumNameMap"; //$NON-NLS-1$
		final boolean isTraceLogging = log.isLoggable(Level.FINER);
		if (isTraceLogging) {
			log.entering(sourceClass, sourceMethod, new Object[]{enumType});
		}
		Map<String, Object> result = new HashMap<String, Object>();
		Enum<?>[] values = enumType.getEnumConstants();
		for (Enum<?> value : values) {
			result.put(value.name(), value);
		}
		if (isTraceLogging) {
			log.exiting(sourceMethod, sourceMethod, result);
		}
		return result;
	}