Fetches a float parameter via :func:`get_string_relative`.
321143
def get_float_relative(strings: Sequence[str],
                       prefix1: str,
                       delta: int,
                       prefix2: str,
                       ignoreleadingcolon: bool = False) -> Optional[float]:
    
    return get_float_raw(get_string_relative(
        strings, prefix1, delta, prefix2,
        ignoreleadingcolon=ignoreleadingcolon))
230515
def _get_float(data, position, dummy0, dummy1, dummy2):
    """"""
    end = position + 8
    return _UNPACK_FLOAT(data[position:end])[0], end
1182426
def getSize(string):
    
    try:
        # We open the web page
        with urllib.request.urlopen(string, None, 1) as f:
            return sum(len(line) for line in f)
    except (urllib.error.URLError, socket.timeout) as e:
        return 0
174468
def get_float(self, input_string):
        

        if input_string == '--training_fraction':

            # was the flag set?
            try:
                index = self.args.index(input_string) + 1
            except ValueError:
                # it wasn't, it's optional, so return the appropriate default
                return None

            # the flag was set, so check if a value was set, otherwise exit
            try:
                if self.args[index] in self.flags:
                    print("\n {flag} was set but a value was not specified".format(flag=input_string))
                    print_short_help()
                    sys.exit(1)
            except IndexError:
                print("\n {flag} was set but a value was not specified".format(flag=input_string))
                print_short_help()
                sys.exit(1)

            # a value was set, so check if its the correct type
            try:
                value = float(self.args[index])
            except ValueError:
                print("\n {flag} must be a float less than or equal to 1, e.g. 0.4".format(flag=input_string))
                print_short_help()
                sys.exit(1)
            if value > 1.0 or value < 0:
                print("\n {flag} must be a float less than or equal to 1, e.g. 0.4".format(flag=input_string))
                print_short_help()
                sys.exit(1)

            # everything checks out, so return the appropriate value
            return value
969690
public Float getFloat(String name) {
        Object o = get(name);
        if (o instanceof Number) {
            return ((Number)o).floatValue();
        }

        if (o != null) {
            try {
                String string = o.toString();
                if (string != null) {
                    return Float.parseFloat(string);
                }
            }
            catch (NumberFormatException e) {}
        }
        return null;
    }
826031
def get_value(cls, value):
        ''''''
        if isinstance(value, (basestring, int)):
            value = cls.fetch_by(id=value)
        return value if isinstance(value, cls) else None
1143058
def getString(t):
    
    slen = c_int()
    s = c_char_p()
    if PL_get_string_chars(t, byref(s), byref(slen)):
        return s.value
    else:
        raise InvalidTypeError("string")
784131
public static float getFloat(final String key, final float def) {
		try {
			return systemRoot.getFloat(fixKey(key), def);
		} catch (final Exception e) {
			// just eat the exception to avoid any system
			// crash on system issues
			return def;
		}
	}
154346
def getdata(self, tree, location, force_string=False):
        """"""
        found = tree.xpath('%s/text()' % location)
        if not found:
            return None
        else:
            data = found[0]
        if force_string:
            return data
        if data == 'True':
            return True
        elif data == 'False':
            return False
        else:
            try:
                return int(data)
            except ValueError:
                try:
                    return float(data)
                except ValueError:
                    # It's a string
                    return data
1020862
def get(self, attr: FetchAttribute) -> MaybeBytes:
        
        attr_name = attr.value.decode('ascii')
        method = getattr(self, '_get_' + attr_name.replace('.', '_'))
        return method(attr)
541799
def convert_float(value, parameter):
    '''
    
    '''
    value = _check_default(value, parameter, ( '', '-', None ))
    if value is None or isinstance(value, float):
        return value
    try:
        return float(value)
    except Exception as e:
        raise ValueError(str(e))
82121
def get_float(self, key, optional=False):
        
        return self._get_typed_value(key, float, lambda x: float(x), optional)
1090051
def get_param(self, number):
        
        logger.debug("retreiving param number %s" % number)
        value = ctypes.c_int()
        code = self.library.Srv_GetParam(self.pointer, number,
                                         ctypes.byref(value))
        check_error(code)
        return value.value
956967
def num(string):
    """"""
    if not isinstance(string, type('')):
        raise ValueError(type(''))
    try:
        string = re.sub('[^a-zA-Z0-9\.\-]', '', string)
        number = re.findall(r"[-+]?\d*\.\d+|[-+]?\d+", string)
        return float(number[0])
    except Exception as e:
        logger = logging.getLogger('tradingAPI.utils.num')
        logger.debug("number not found in %s" % string)
        logger.debug(e)
        return None
674828
def get_string_offset(edge):
    """"""
    onset_label = edge.find('labels[@name="SEND"]')
    onset_str = onset_label.xpath('@valueString')[0]
    return int(onset_str)
21653
def get_as_float(self, key):
        
        value = self.get(key)
        return FloatConverter.to_float(value)
552325
def fetch(self, R, pk, depth=1):
        ""
        d, e = self._fetcher.fetch(R, pk, depth)
        if e: raise e
        return d