diff options
author | Stefan Proell <stefan.proell@cropster.com> | 2018-02-13 09:36:34 +0000 |
---|---|---|
committer | Stefan Proell <stefan.proell@cropster.com> | 2018-02-13 09:36:34 +0000 |
commit | 68964bf8f63280f0cb7355108ac1f5e1a62455c9 (patch) | |
tree | 8a1032673d7ea0ed6a4c573df31811b260c73a4e /generate_token.py | |
download | jupyter-notebook-docker-compose-68964bf8f63280f0cb7355108ac1f5e1a62455c9.tar.gz jupyter-notebook-docker-compose-68964bf8f63280f0cb7355108ac1f5e1a62455c9.zip |
Adds a docker--compose file and an environment file for launching Jupyter Notebooks
Diffstat (limited to 'generate_token.py')
-rwxr-xr-x | generate_token.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/generate_token.py b/generate_token.py new file mode 100755 index 0000000..54e3c39 --- /dev/null +++ b/generate_token.py @@ -0,0 +1,17 @@ +#!/usr/bin/env sh +import IPython as IPython + +if __name__ == "__main__": + print("Generate a access token") + from argparse import ArgumentParser + parser = ArgumentParser() + parser.add_argument("-p", + "--password", + dest="password", + help="The password you want to use for authentication.", + required=True) + args = parser.parse_args() + + print("\nCopy this line into the .env file:\n") + hash = IPython.lib.passwd(args.password) + print("ACCESS_TOKEN=" + hash) |