Is this an integer.

    :param object obj:
    :return:
427183
def is_integer(obj):
    
    if PYTHON3:
        return isinstance(obj, int)
    return isinstance(obj, (int, long))
102371
def get_as_integer(self, key):
        
        value = self.get(key)
        return IntegerConverter.to_integer(value)
12439
def ishex(obj):
    
    return isinstance(obj, str) and (len(obj) == 1) and (obj in string.hexdigits)
1289033
def is_valid_int_param(param):
    
    if param is None:
        return False
    try:
        param = int(param)
        if param < 0:
            return False
    except (TypeError, ValueError):
        return False
    return True
98002
def is_numeric(value):
        
        return type(value) in [
            int,
            float,
            
            np.int8,
            np.int16,
            np.int32,
            np.int64,

            np.float16,
            np.float32,
            np.float64,
            np.float128
        ]
139304
def float2int(x):
    
    if not pd.isnull(x):
        if is_numeric(x):
            x=int(x)
    return x
1262983
def numberp(v):
    """"""
    return (not(isinstance(v, bool)) and
            (isinstance(v, int) or isinstance(v, float)))
1293642
def is_int_like(value):
    
    try:
        if isinstance(value, int): return True
        return int(value) == value and str(value).isdigit()
    except:
        return False
136780
def _value(obj):
    
    # TODO: this is ugly and makes everything ugly
    # can we handle this with a clean decorator or just requiring that only floats be passed??
    if hasattr(obj, 'value'):
        return obj.value
    elif isinstance(obj, np.ndarray):
        return np.array([o.value for o in obj])
    elif hasattr(obj, '__iter__'):
        return [_value(o) for o in obj]
    return obj
208370
def is_float(obj):
    
    is_f = isinstance(obj, float)
    if not is_f:
        try:
            float(obj)
            is_f = True
        except (ValueError, TypeError):
            is_f = False
    return is_f and not is_bool(obj)
567241
def to_int(self):
        
        num = self.to_uint()
        if num and self._items[-1].unbox():
            return num - (1 << self.size)
        else:
            return num
1256471
def small_integer(anon, obj, field, val):
    
    return anon.faker.small_integer(field=field)
675438
def is_int_type(val):
    """"""
    try:               # Python 2
        return isinstance(val, (int, long))
    except NameError:  # Python 3
        return isinstance(val, int)
432847
def check_int(num,
              num_descr='number',
              min_value=0,
              max_value=np.Inf):
    """"""

    if not np.isfinite(num) or num < min_value or num > max_value:
        raise ValueError('{}={} is not finite or '
                         'is not >= {} or '
                         'is not < {}'.format(num_descr, num, min_value, max_value))

    return int(num)
689923
def _check_for_int(x):
    
    try:
        y = int(x)
    except (OverflowError, ValueError):
        pass
    else:
        # There is no way in AMF0 to distinguish between integers and floats
        if x == x and y == x:
            return y

    return x
950004
def value_to_int(attrib, key):
    
    val = attrib.get(key, 0)
    if isinstance(val, str):
        if val.isspace() or val == '':
            return 0
    return val
508107
function ( obj, arg ) {
		var min = 0,
		    max = obj.length - 1,
		    idx, val;

		while ( min <= max ) {
			idx = Math.floor( ( min + max ) / 2 );
			val = obj[idx];

			if ( val < arg ) {
				min = idx + 1;
			}
			else if ( val > arg ) {
				max = idx - 1;
			}
			else {
				return idx;
			}
		}

		return -1;
	}