Moving the hash-function to a separate file.

Adding a gitignore file to ignore the __pycache__ folder.