Here is a in Python of generating a Bitcoin private key: