Skip to content

Instantly share code, notes, and snippets.

@manics
Last active September 6, 2019 19:37
Show Gist options
  • Save manics/6c80abdef351342dce45e506ff8d32f2 to your computer and use it in GitHub Desktop.
Save manics/6c80abdef351342dce45e506ff8d32f2 to your computer and use it in GitHub Desktop.

Connect to OMERO, passing parameters as URL query parameters

Binder

This notebook requires the parameters host, username, passwd

If you already have a notebook opened you can pass the parameters by adding this query string to the URL in your browser:

?host='HOST'&username='USERNAME'&passwd='PASSWD'

or

?host='HOST'&username='USERNAME'&passwd='PASSWD'&autorun=true

to automatically run the whole notebook.

If you are launching the notebook on mybinder you can pass the parameters in the launch URL but they need to be URL escaped:

https://mybinder.org/v2/gist/manics/6c80abdef351342dce45e506ff8d32f2/master?urlpath=notebooks%2Fomero-websocket.ipynb%3Fhost%3D'HOST'%26username%3D'USERNAME'%26passwd%3D'PASSWD'%26autorun%3Dtrue

name: jupyter
channels:
- defaults
- manics
dependencies:
- pip
- python=2.7
- zeroc-ice-python=3.6.5
- pip:
# https://github.com/ome/omero-py/pull/18
- https://github.com/manics/omero-py/archive/ccdb6053f749ffcc9cf7d3e438236f3b625a56a3.zip
# Doesn't work here, needs to be installed into a different environment
# - jupyter-notebookparams
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
pip install jupyter-notebookparams==0.0.3
jupyter nbextension install --py jupyter_notebookparams --user
jupyter nbextension enable --py jupyter_notebookparams --user
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment