Skip to content

Instantly share code, notes, and snippets.

@mazz
Created December 16, 2016 04:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mazz/62db05300db5e5e6da0e0e5382e2484b to your computer and use it in GitHub Desktop.
Save mazz/62db05300db5e5e6da0e0e5382e2484b to your computer and use it in GitHub Desktop.
notebook has password by default
http://localhost:6543/notebook/login?next=%2Fnotebook%2Fnotebooks%2Fdefault-1589979049.ipynb
@mazz
Copy link
Author

mazz commented Dec 16, 2016

screenshot at 2016-12-15 23 16 27

@mazz
Copy link
Author

mazz commented Dec 17, 2016

maz@maz-alpha:/tmp/pyramid_notebook/foo@bar.com$ cat context.json | python -m json.tool
{
    "allow_origin": "http://localhost:6543",
    "context_hash": 1484605921,
    "extra_template_paths": [
        "/home/maz/webapp/websauna/lib/python3.5/site-packages/pyramid_notebook/server/templates"
    ],
    "greeting": "\n\nAvailable variables and functions:\n\n* **app** - The [WSGI application](http://docs.pylonsproject.org/docs/pyramid/en/latest/api/paster.html?highlight=wsgi%20application#pyramid.paster.get_app) object generated by bootstrapping.\n* **request** - A [pyramid.request.Request](http://docs.pylonsproject.org/projects/pyramid/en/latest/api/request.html#pyramid.request.Request) object implying the current request state for your script.\n* **root** - The resource [root](http://docs.pylonsproject.org/docs/pyramid/en/latest/glossary.html#term-root) of your Pyramid application. This is an object generated by the [root factory](http://docs.pylonsproject.org/docs/pyramid/en/latest/glossary.html#term-root-factory) configured in your application.\n* **registry** - The application [registry](http://docs.pylonsproject.org/docs/pyramid/en/latest/glossary.html#term-application-registry) of your Pyramid application.\n\n* **datetime** - Python [datetime module](https://docs.python.org/3.5/library/datetime.html)\n* **time** - Python [time module](https://docs.python.org/3.5/library/time.html)\n* **transaction** - Zope [transaction manager](http://zodb.readthedocs.org/en/latest/transactions.html), e.g. `transaction.commit()`\n\n* **sqlalchemy** - sqlachemy module\n* **dbsession** - SQLAlchemy database session\n* **now()** - UTC time as timezone aware datetime object\n* **initializer** - websauna.system.Initializer instance\n\n* **Activation** - websauna.system.user.models.Activation\n* **Group** - websauna.system.user.models.Group\n* **User** - websauna.system.user.models.User\n* **UserGroup** - websauna.system.user.models.UserGroup\n\n",
    "http_port": 40008,
    "jinja_environment_options": {},
    "kill_timeout": 1800,
    "notebook_name": "default-1484605921.ipynb",
    "notebook_path": "/notebook/",
    "pid": 6185,
    "startup": "\n\nfrom pkg_resources import load_entry_point\nfrom pyramid_notebook.utils import change_directory\n\n# We need to use this to trigger a proper namespaced package loading\n# due to different approaches between pip / easy_install / python setup.py develop\n# (it doesn't matter which entry point we load as long as it's from websauna package)\nentry_point  = load_entry_point('websauna', 'console_scripts', 'ws-shell')\n\nfrom websauna.system.devop.cmdline import init_websauna_script_env\n\n# Our development.ini, production.ini, etc.\nconfig_file = '/home/maz/webapp/websauna/myapp/myapp/conf/development.ini'\n\nwith change_directory('/home/maz/webapp/websauna/myapp'):\n    script_env = init_websauna_script_env(config_file)\n    globals().update(script_env)\n\n\nimport datetime\nimport time\nimport transaction\n\n\ndbsession = request.dbsession\nfrom websauna.utils.time import now\nimport sqlalchemy\n\nfrom websauna.system.user.models import Activation\nfrom websauna.system.user.models import Group\nfrom websauna.system.user.models import User\nfrom websauna.system.user.models import UserGroup\n\n",
    "websocket_url": "ws://localhost:40008"
}

@mazz
Copy link
Author

mazz commented Dec 17, 2016

maz@maz-alpha:/tmp/pyramid_notebook/foo@bar.com$ cat notebook.stderr.log 
Starting notebook, daemon True
Starting with context {'extra_template_paths': ['/home/maz/webapp/websauna/lib/python3.5/site-packages/pyramid_notebook/server/templates'], 'jinja_environment_options': {}, 'allow_origin': 'http://localhost:6543', 'context_hash': 1484605921, 'http_port': 40008, 'websocket_url': 'ws://localhost:40008', 'greeting': '\n\nAvailable variables and functions:\n\n* **app** - The [WSGI application](http://docs.pylonsproject.org/docs/pyramid/en/latest/api/paster.html?highlight=wsgi%20application#pyramid.paster.get_app) object generated by bootstrapping.\n* **request** - A [pyramid.request.Request](http://docs.pylonsproject.org/projects/pyramid/en/latest/api/request.html#pyramid.request.Request) object implying the current request state for your script.\n* **root** - The resource [root](http://docs.pylonsproject.org/docs/pyramid/en/latest/glossary.html#term-root) of your Pyramid application. This is an object generated by the [root factory](http://docs.pylonsproject.org/docs/pyramid/en/latest/glossary.html#term-root-factory) configured in your application.\n* **registry** - The application [registry](http://docs.pylonsproject.org/docs/pyramid/en/latest/glossary.html#term-application-registry) of your Pyramid application.\n\n* **datetime** - Python [datetime module](https://docs.python.org/3.5/library/datetime.html)\n* **time** - Python [time module](https://docs.python.org/3.5/library/time.html)\n* **transaction** - Zope [transaction manager](http://zodb.readthedocs.org/en/latest/transactions.html), e.g. `transaction.commit()`\n\n* **sqlalchemy** - sqlachemy module\n* **dbsession** - SQLAlchemy database session\n* **now()** - UTC time as timezone aware datetime object\n* **initializer** - websauna.system.Initializer instance\n\n* **Activation** - websauna.system.user.models.Activation\n* **Group** - websauna.system.user.models.Group\n* **User** - websauna.system.user.models.User\n* **UserGroup** - websauna.system.user.models.UserGroup\n\n', 'notebook_path': '/notebook/', 'startup': "\n\nfrom pkg_resources import load_entry_point\nfrom pyramid_notebook.utils import change_directory\n\n# We need to use this to trigger a proper namespaced package loading\n# due to different approaches between pip / easy_install / python setup.py develop\n# (it doesn't matter which entry point we load as long as it's from websauna package)\nentry_point  = load_entry_point('websauna', 'console_scripts', 'ws-shell')\n\nfrom websauna.system.devop.cmdline import init_websauna_script_env\n\n# Our development.ini, production.ini, etc.\nconfig_file = '/home/maz/webapp/websauna/myapp/myapp/conf/development.ini'\n\nwith change_directory('/home/maz/webapp/websauna/myapp'):\n    script_env = init_websauna_script_env(config_file)\n    globals().update(script_env)\n\n\nimport datetime\nimport time\nimport transaction\n\n\ndbsession = request.dbsession\nfrom websauna.utils.time import now\nimport sqlalchemy\n\nfrom websauna.system.user.models import Activation\nfrom websauna.system.user.models import Group\nfrom websauna.system.user.models import User\nfrom websauna.system.user.models import UserGroup\n\n"}
Launching on localhost:40008, having context {'notebook_name': 'default-1484605921.ipynb', 'jinja_environment_options': {}, 'pid': 6185, 'context_hash': 1484605921, 'http_port': 40008, 'kill_timeout': 1800, 'allow_origin': 'http://localhost:6543', 'greeting': '\n\nAvailable variables and functions:\n\n* **app** - The [WSGI application](http://docs.pylonsproject.org/docs/pyramid/en/latest/api/paster.html?highlight=wsgi%20application#pyramid.paster.get_app) object generated by bootstrapping.\n* **request** - A [pyramid.request.Request](http://docs.pylonsproject.org/projects/pyramid/en/latest/api/request.html#pyramid.request.Request) object implying the current request state for your script.\n* **root** - The resource [root](http://docs.pylonsproject.org/docs/pyramid/en/latest/glossary.html#term-root) of your Pyramid application. This is an object generated by the [root factory](http://docs.pylonsproject.org/docs/pyramid/en/latest/glossary.html#term-root-factory) configured in your application.\n* **registry** - The application [registry](http://docs.pylonsproject.org/docs/pyramid/en/latest/glossary.html#term-application-registry) of your Pyramid application.\n\n* **datetime** - Python [datetime module](https://docs.python.org/3.5/library/datetime.html)\n* **time** - Python [time module](https://docs.python.org/3.5/library/time.html)\n* **transaction** - Zope [transaction manager](http://zodb.readthedocs.org/en/latest/transactions.html), e.g. `transaction.commit()`\n\n* **sqlalchemy** - sqlachemy module\n* **dbsession** - SQLAlchemy database session\n* **now()** - UTC time as timezone aware datetime object\n* **initializer** - websauna.system.Initializer instance\n\n* **Activation** - websauna.system.user.models.Activation\n* **Group** - websauna.system.user.models.Group\n* **User** - websauna.system.user.models.User\n* **UserGroup** - websauna.system.user.models.UserGroup\n\n', 'notebook_path': '/notebook/', 'extra_template_paths': ['/home/maz/webapp/websauna/lib/python3.5/site-packages/pyramid_notebook/server/templates'], 'websocket_url': 'ws://localhost:40008', 'startup': "\n\nfrom pkg_resources import load_entry_point\nfrom pyramid_notebook.utils import change_directory\n\n# We need to use this to trigger a proper namespaced package loading\n# due to different approaches between pip / easy_install / python setup.py develop\n# (it doesn't matter which entry point we load as long as it's from websauna package)\nentry_point  = load_entry_point('websauna', 'console_scripts', 'ws-shell')\n\nfrom websauna.system.devop.cmdline import init_websauna_script_env\n\n# Our development.ini, production.ini, etc.\nconfig_file = '/home/maz/webapp/websauna/myapp/myapp/conf/development.ini'\n\nwith change_directory('/home/maz/webapp/websauna/myapp'):\n    script_env = init_websauna_script_env(config_file)\n    globals().update(script_env)\n\n\nimport datetime\nimport time\nimport transaction\n\n\ndbsession = request.dbsession\nfrom websauna.utils.time import now\nimport sqlalchemy\n\nfrom websauna.system.user.models import Activation\nfrom websauna.system.user.models import Group\nfrom websauna.system.user.models import User\nfrom websauna.system.user.models import UserGroup\n\n"}
Dropping startup script /tmp/pyramid_notebook/foo@bar.com/.jupyter/profile_default/startup/startup.py
[TerminalIPythonApp] Config changed:
[TerminalIPythonApp] {'Application': {'log_level': 10}, 'NotebookApp': {'extra_template_paths': ['/tmp/pyramid_notebook/foo@bar.com/.jupyter/custom'], 'open_browser': False, 'websocket_url': 'ws://localhost:40008', 'port': 40008, 'allow_origin': 'http://localhost:6543', 'base_url': '/notebook/'}}
[TerminalIPythonApp] WARNING | Subcommand `ipython notebook` is deprecated and will be removed in future versions.
[TerminalIPythonApp] WARNING | You likely want to use `jupyter notebook` in the future
[D 23:32:51.152 NotebookApp] Config changed:
[D 23:32:51.152 NotebookApp] {'Application': {'log_level': 10}, 'NotebookApp': {'extra_template_paths': ['/tmp/pyramid_notebook/foo@bar.com/.jupyter/custom'], 'open_browser': False, 'websocket_url': 'ws://localhost:40008', 'port': 40008, 'allow_origin': 'http://localhost:6543', 'base_url': '/notebook/'}}
[D 23:32:51.171 NotebookApp] Searching ['/tmp/pyramid_notebook/foo@bar.com', '/tmp/pyramid_notebook/foo@bar.com/.jupyter', '/home/maz/webapp/websauna/etc/jupyter', '/usr/local/etc/jupyter', '/etc/jupyter'] for config files
[D 23:32:51.174 NotebookApp] Looking for jupyter_config in /etc/jupyter
[D 23:32:51.176 NotebookApp] Looking for jupyter_config in /usr/local/etc/jupyter
[D 23:32:51.177 NotebookApp] Looking for jupyter_config in /home/maz/webapp/websauna/etc/jupyter
[D 23:32:51.177 NotebookApp] Looking for jupyter_config in /tmp/pyramid_notebook/foo@bar.com/.jupyter
[D 23:32:51.178 NotebookApp] Looking for jupyter_config in /tmp/pyramid_notebook/foo@bar.com
[D 23:32:51.184 NotebookApp] Looking for jupyter_notebook_config in /etc/jupyter
[D 23:32:51.185 NotebookApp] Looking for jupyter_notebook_config in /usr/local/etc/jupyter
[D 23:32:51.187 NotebookApp] Looking for jupyter_notebook_config in /home/maz/webapp/websauna/etc/jupyter
[D 23:32:51.188 NotebookApp] Looking for jupyter_notebook_config in /tmp/pyramid_notebook/foo@bar.com/.jupyter
[D 23:32:51.189 NotebookApp] Looking for jupyter_notebook_config in /tmp/pyramid_notebook/foo@bar.com
[I 23:32:51.381 NotebookApp] Serving notebooks from local directory: /tmp/pyramid_notebook/foo@bar.com
[I 23:32:51.381 NotebookApp] 0 active kernels 
[I 23:32:51.382 NotebookApp] The Jupyter Notebook is running at: http://localhost:40008/notebook/?token=39077f6281cc9044a7f91ee114bd6a785825a3d481984f50
[I 23:32:51.382 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[I 23:33:16.225 NotebookApp] 302 GET /notebook/notebooks/default-1484605921.ipynb (127.0.0.1) 10.62ms
[D 23:33:16.377 NotebookApp] Using contents: services/contents
[D 23:33:16.528 NotebookApp] Path base/images/favicon.ico served from /home/maz/webapp/websauna/lib/python3.5/site-packages/notebook/static/base/images/favicon.ico
[D 23:33:16.529 NotebookApp] Path components/jquery-ui/themes/smoothness/jquery-ui.min.css served from /home/maz/webapp/websauna/lib/python3.5/site-packages/notebook/static/components/jquery-ui/themes/smoothness/jquery-ui.min.css
[D 23:33:16.530 NotebookApp] Path components/jquery-typeahead/dist/jquery.typeahead.min.css served from /home/maz/webapp/websauna/lib/python3.5/site-packages/notebook/static/components/jquery-typeahead/dist/jquery.typeahead.min.css
[D 23:33:16.531 NotebookApp] Path style/style.min.css served from /home/maz/webapp/websauna/lib/python3.5/site-packages/notebook/static/style/style.min.css
[D 23:33:16.534 NotebookApp] Path auth/css/override.css served from /home/maz/webapp/websauna/lib/python3.5/site-packages/notebook/static/auth/css/override.css
[D 23:33:16.535 NotebookApp] Path components/es6-promise/promise.min.js served from /home/maz/webapp/websauna/lib/python3.5/site-packages/notebook/static/components/es6-promise/promise.min.js
[D 23:33:16.536 NotebookApp] Path components/requirejs/require.js served from /home/maz/webapp/websauna/lib/python3.5/site-packages/notebook/static/components/requirejs/require.js
[D 23:33:16.538 NotebookApp] Path base/images/logo.png served from /home/maz/webapp/websauna/lib/python3.5/site-packages/notebook/static/base/images/logo.png
[D 23:33:16.541 NotebookApp] 200 GET /notebook/login?next=%2Fnotebook%2Fnotebooks%2Fdefault-1484605921.ipynb (127.0.0.1) 175.29ms
[D 23:33:16.928 NotebookApp] 304 GET /notebook/static/components/jquery-ui/themes/smoothness/jquery-ui.min.css?v=9b2c8d3489227115310662a343fce11c (127.0.0.1) 11.22ms
[D 23:33:16.934 NotebookApp] 304 GET /notebook/static/style/style.min.css?v=974839a888beb55bbba87883fafd90fa (127.0.0.1) 3.15ms
[D 23:33:16.942 NotebookApp] 304 GET /notebook/static/auth/css/override.css?v=19ec59d2c4f1203c49fe47462028cd9a (127.0.0.1) 5.38ms
[D 23:33:16.948 NotebookApp] 304 GET /notebook/static/components/jquery-typeahead/dist/jquery.typeahead.min.css?v=7afb461de36accb1aa133a1710f5bc56 (127.0.0.1) 3.38ms
[D 23:33:17.211 NotebookApp] 304 GET /notebook/static/components/es6-promise/promise.min.js?v=f004a16cb856e0ff11781d01ec5ca8fe (127.0.0.1) 4.36ms
[D 23:33:17.217 NotebookApp] Path custom.css served from /tmp/pyramid_notebook/foo@bar.com/.jupyter/custom/custom.css
[D 23:33:17.223 NotebookApp] 200 GET /notebook/custom/custom.css (127.0.0.1) 7.27ms
[D 23:33:17.232 NotebookApp] 304 GET /notebook/static/components/requirejs/require.js?v=6da8be361b9ee26c5e721e76c6d4afce (127.0.0.1) 4.05ms
[D 23:33:17.863 NotebookApp] Path auth/js/main.min.js served from /home/maz/webapp/websauna/lib/python3.5/site-packages/notebook/static/auth/js/main.min.js
[D 23:33:17.869 NotebookApp] 200 GET /notebook/static/auth/js/main.min.js?v=20161216233251 (127.0.0.1) 7.10ms
[D 23:33:17.966 NotebookApp] 304 GET /notebook/static/base/images/logo.png?v=641991992878ee24c6f3826e81054a0f (127.0.0.1) 3.76ms
maz@maz-alpha:/tmp/pyramid_notebook/foo@bar.com$ 

@mazz
Copy link
Author

mazz commented Dec 17, 2016

maz@maz-alpha:/tmp/pyramid_notebook/foo@bar.com$ ll
total 44
drwxrwxr-x 3 maz maz  4096 Dec 16 23:32 ./
drwxrwxr-x 3 maz maz  4096 Dec 16 22:36 ../
-rw-rw-r-- 1 maz maz  3176 Dec 16 23:32 context.json
-rw-r--r-- 1 maz maz  2244 Dec 16 23:09 default-1008239163.ipynb
-rw-r--r-- 1 maz maz  2244 Dec 16 23:32 default-1484605921.ipynb
-rw-r--r-- 1 maz maz  2244 Dec 16 22:36 default-459196633.ipynb
drwxr-xr-x 4 maz maz  4096 Dec 16 22:36 .jupyter/
-rw-r--r-- 1 maz maz     4 Dec 16 23:32 notebook.pid
-rw-r--r-- 1 maz maz 12184 Dec 16 23:33 notebook.stderr.log
-rw-r--r-- 1 maz maz     0 Dec 16 23:32 notebook.stdout.log

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment