Did I find the right examples for you? yes no

All Samples(87)  |  Call(87)  |  Derive(0)  |  Import(0)
float.fromhex(string) -> float

Create a floating-point number from a hexadecimal string.
>>> float.fromhex('0x1.ffffp10')
2047.984375
>>> float.fromhex('-0x1p-1074')
-4.9406564584124654e-324

src/b/l/ble-sensor-pi-HEAD/sensortag/sensortag_xively.py   ble-sensor-pi(Download)
def floatfromhex(h):
    t = float.fromhex(h)
    if t > float.fromhex('7FFF'):
        t = -(float.fromhex('FFFF') - t)
        pass
        after = self.con.after
        rval = after.split()[1:]
        return [long(float.fromhex(n)) for n in rval]
 
    # Notification handle = 0x0025 value: 9b ff 54 07
                after = self.con.after
	        hxstr = after.split()[3:]
            	handle = long(float.fromhex(hxstr[0]))
            	#try:
	        if True:

src/b/l/ble-sensor-pi-HEAD/sensortag/sensortag.py   ble-sensor-pi(Download)
def floatfromhex(h):
    t = float.fromhex(h)
    if t > float.fromhex('7FFF'):
        t = -(float.fromhex('FFFF') - t)
        pass
        after = self.con.after
        rval = after.split()[1:]
        return [long(float.fromhex(n)) for n in rval]
 
    # Notification handle = 0x0025 value: 9b ff 54 07
                after = self.con.after
	        hxstr = after.split()[3:]
            	handle = long(float.fromhex(hxstr[0]))
            	#try:
	        if True:

src/p/e/PeachPy-0.0.1/peachpy/x86.py   PeachPy(Download)
		elif isinstance(number, str):
			# Validity check
			float.hex(float.fromhex(number))
		is_negative = number.startswith("-")
		point_position = number.index('.')

src/p/e/PeachPy-0.0.1/peachpy/__init__.py   PeachPy(Download)
			else:
				# Validity check
				float.hex(float.fromhex(number))
		else:
			raise TypeError('Unsupported constant type {0} for constant {1}'.format(type(number), number))

src/i/r/ironpython3-HEAD/Src/StdLib/Lib/antigravity.py   ironpython3(Download)
    # http://xkcd.com/426/
    h = hashlib.md5(datedow).hexdigest()
    p, q = [('%f' % float.fromhex('0.' + x)) for x in (h[:16], h[16:32])]
    print('%d%s %d%s' % (latitude, p[1:], longitude, q[1:]))
 

src/t/r/TrustRouter-HEAD/client/packaging/Windows/Python32/Lib/antigravity.py   TrustRouter(Download)
    # http://xkcd.com/426/
    h = hashlib.md5(datedow).hexdigest()
    p, q = [('%f' % float.fromhex('0.' + x)) for x in (h[:16], h[16:32])]
    print('%d%s %d%s' % (latitude, p[1:], longitude, q[1:]))
 

src/g/a/gaupol-HEAD/gaupol/player.py   gaupol(Download)
       alpha = "{:02x}".format(int(conf.subtitle_alpha * 255))
       color = conf.subtitle_color.replace("#", "")
       color = int(float.fromhex("".join((alpha, color))))
       self._text_overlay.props.color = color
 
       alpha = "{:02x}".format(int(conf.time_alpha * 255))
       color = conf.time_color.replace("#", "")
       color = int(float.fromhex("".join((alpha, color))))
       self._time_overlay.props.color = color
 

src/k/r/Krakatau-HEAD/Krakatau/assembler/parse.py   Krakatau(Download)
def parseFloat(s):
    s = s[:-1]
    if s.strip('-')[:2].lower() == '0x':
        f = float.fromhex(s)
    else:
def parseDouble(s):
    if s.strip('-')[:2].lower() == '0x':
        f = float.fromhex(s)
    else:
        f = float(s)

src/c/p/cpython-HEAD/Lib/antigravity.py   cpython(Download)
    # http://xkcd.com/426/
    h = hashlib.md5(datedow).hexdigest()
    p, q = [('%f' % float.fromhex('0.' + x)) for x in (h[:16], h[16:32])]
    print('%d%s %d%s' % (latitude, p[1:], longitude, q[1:]))
 

src/s/t/static-python-HEAD/Lib/antigravity.py   static-python(Download)
    # http://xkcd.com/426/
    h = hashlib.md5(datedow).hexdigest()
    p, q = [('%f' % float.fromhex('0.' + x)) for x in (h[:16], h[16:32])]
    print('%d%s %d%s' % (latitude, p[1:], longitude, q[1:]))
 

  1 | 2 | 3 | 4 | 5  Next