This is a [[ipynb:(:url-or-port%20"http://localhost:8888"%20:name%20"emacs-ipython-notebook/The%20Emacs%20IPython%20Notebook.ipynb")][link]] to an ein notebook. It might not work if your setup is not the same as mine!
Note that code is executed asynchronously, so executing the following won't
block Emacs. You can even queue up a number of source code blocks and they will
execute sequentially as the previous finishes execution!
#+NAME: 6d0ec9b7-249c-46e9-bdf1-c48b7bcf7fbd
#+BEGIN_SRC ein :session http://localhost:8888/The Emacs IPython Notebook.ipynb
import sys
import time
time.sleep(10)
print("Hello dood!")
#+END_SRC
#+RESULTS: 6d0ec9b7-249c-46e9-bdf1-c48b7bcf7fbd
: Hello dood!
#+NAME: 744c7889-aec1-495f-9d07-6efc17329e94
#+BEGIN_SRC ein :session http://localhost:8888/The Emacs IPython Notebook.ipynb
1+4
#+END_SRC
#+RESULTS: 744c7889-aec1-495f-9d07-6efc17329e94
: 5
Tracebacks will be printed out, but if you want to use ein's traceback and
debugging support you have to jump to the ~*ein:shared-output*~ buffer for
traceback support or the notebook running the session and execute ~%debug~ in a
cell there.
#+NAME: 47c36fa5-1b53-413b-8f5b-814f1ae66a3b
#+BEGIN_SRC ein :session http://localhost:8888/The Emacs IPython Notebook.ipynb :results output drawer