Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
bitmath converts almost anything https://github.com/tbielawa/bitmath More information: https://blog.lnx.cx/?p=521
>>> from bitmath import *
>>> four_mibibits = Mib(4)
>>> four_mibibits.to_kB()
kB(524.288)
>>> ninty_nine_bits = Bit(99)
>>> a_small_exbibyte = ninty_nine_bits.to_EiB()
>>> print "This might as well be zero: %s" % a_small_exbibyte
This might as well be zero: 1.07336015076e-17EiB
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.