Skip to content

Instantly share code, notes, and snippets.

@nitroluke
nitroluke / powersOfTwo.py
Last active March 23, 2016 18:28
Round up to the nearest power of 2.
def nearesetPow2(x):
x = x - 1
for i in [1, 2, 4, 8, 16, 32]:
x = x | (x >> i)
return x + 1
@nitroluke
nitroluke / keybase.md
Created July 13, 2018 00:25
keybase verification

Keybase proof

I hereby claim:

  • I am nitroluke on github.
  • I am nitroluke (https://keybase.io/nitroluke) on keybase.
  • I have a public key ASCFtsfwGLwPuUgoIiWsbDnHt4H8WdmqpIxYaoNyh9h7Awo

To claim this, I am signing this object: