Get an integer-valued environment variable `key`, if it exists and parses
    as an integer, otherwise return `default`.
194911
def getenv_int(key, default=0):
    
    try:
        return int(os.environ.get(key, str(default)))
    except ValueError:
        return default
1288805
private static String getPropertyValue(String key) {
        String env = System.getProperty(key);
        if (env == null) {
            if (DEFAULT_PROPS.containsKey(key)) {
                return DEFAULT_PROPS.get(key);
            } else {
                return null;
            }
        }
        return env;
    }
905428
def get(key, default=-1):
        """"""
        if isinstance(key, int):
            return ReturnCode(key)
        if key not in ReturnCode._member_map_:
            extend_enum(ReturnCode, key, default)
        return ReturnCode[key]
121197
public Integer getIntegerProperty(String key, Integer defaultValue) {
        String val = getProperty(key, defaultValue.toString());
        try {
            Integer intVal = Integer.parseInt(val);
            return intVal;
        } catch (NumberFormatException e) {
            return defaultValue;
        }
    }
466492
public int getInt(String key, int defaultValue) {
    Object value = get(key);
    if (value instanceof Integer) {
      return (int) value;
    }
    if (value instanceof Number) {
      return ((Number) value).intValue();
    } else if (value instanceof String) {
      try {
        return Integer.valueOf((String) value);
      } catch (NumberFormatException ignored) {
      }
    }
    return defaultValue;
  }
1366646
def get(self, key, default=None):
        
        if key in self.__cli:
            return self.__cli[key]
        if key in self.__config:
            return self.__config.get(key)
        if key in self.__defaults:
            return self.__defaults.get(key)
        return default
263690
def to_int(d, key, default_to_zero=False, default=None, required=True):
    
    value = d.get(key) or default
    if (value in ["", None]) and default_to_zero:
        return 0
    if value is None:
        if required:
            raise ParseError("Unable to read %s from %s" % (key, d))
    else:
        return int(value)
745799
@Override
    public Integer getInteger(final String key) {
        return retrieve(new Callable<Integer>() {
            @Override
            public Integer call() throws Exception {
                return configuration.getInt(key);
            }
        }, null);
    }
574844
public int getInteger(int key) {
        Any3<Boolean, Integer, String> value = data.get(Any2.<Integer, String>left(key));
        if (value == null)
            throw new IllegalArgumentException("missing argument for param " + key);
        return value.get2().orElseThrow(() -> new IllegalArgumentException("expected integer argument for param " + key));
    }
539779
public int getIntegerConfigAttribute(Map<String, Object> props, String key, int defaultValue) {
        if (props.containsKey(key)) {
            return (Integer) props.get(key);
        }
        return defaultValue;
    }
237055
def get(key, default=0)
      with_failure_grace(default) {
        val = @redis.get(key)
        return default if val.nil?
        val.numeric? ? val.to_i : val
      }
    end
161727
public static int getInt(final String key, final int def) {
		try {
			return systemRoot.getInt(fixKey(key), def);
		} catch (final Exception e) {
			// just eat the exception to avoid any system crash on system issues
			return def;
		}
	}
412274
public int getInt(Enum<?> key, int defaultValue)
    {
        if (key == null)
        {
            return defaultValue;
        }

        return getInt(key.name(), defaultValue);
    }
113775
public static int getInt(Properties props, String key, int defaultValue) {
    String value = props.getProperty(key);
    if (value != null) {
      return Integer.parseInt(value);
    } else {
      return defaultValue;
    }
  }
253132
Optional<Integer> getInteger(String key) {
        String value = (String) get(key);
        return Optional.ofNullable(Integer.parseInt(value));
    }
1195786
def get(self, key, default=None):
        
        if not isinstance(key, bytes):
            key = key.encode('utf8')

        return self.b_get_value(key) or default
449412
def get(self, key, default=None):
        
        result = self._loads(self._client.get(self.get_key(key)))
        if result is not None:
            return result
        else:
            return default or self._default