Demo of RISE for slides with Jupyter notebooks (Python)

By Lilian Besson, Sept.2017.


Title 2

Title 3

Title 4

Title 5
Title 6

Text

With text, emphasis, bold, striked, inline code and

Quote.

-- By a guy.

Maths

With inline math $\sin(x)^2 + \cos(x)^2 = 1$ and equations: $$\sin(x)^2 + \cos(x)^2 = \left(\frac{\mathrm{e}^{ix} - \mathrm{e}^{-ix}}{2i}\right)^2 + \left(\frac{\mathrm{e}^{ix} + \mathrm{e}^{-ix}}{2}\right)^2 = \frac{-\mathrm{e}^{2ix}-\mathrm{e}^{-2ix}+2 \; ++\mathrm{e}^{2ix}+\mathrm{e}^{-2ix}+2}{4} = 1.$$

And code

In Markdown:

Sys.command "ocaml -version";;

And in a executable cell (with OCaml 4.04.2 kernel) :


In [1]:
Sys.command "ocaml -version";;


The OCaml toplevel, version 4.04.2
Out[1]:
- : int = 0

More demo of Markdown code

Lists

  • Unordered
  • lists
  • are easy.

And

  1. and ordered also ! Just
  2. start lines by 1., 2. etc
  3. or simply 1., 1., ...

Images

With a HTML <img/> tag or the ![alt](url) Markdown code:


In [6]:
#thread ;;
#require "jupyter.notebook" ;;
(* https://akabe.github.io/ocaml-jupyter/notebook/JupyterNotebook.html *)

let youtube_video url = JupyterNotebook.display "text/html"
    (Printf.sprintf "<iframe width=560 height=315 src='%s'></iframe>" url)
;;


Out[6]:
val youtube_video : string -> JupyterNotebook.display_id = <fun>

And Markdown can include raw HTML

This is a centered span, colored in green.

Iframes are disabled by default, but by using the IPython internals we can include let say a YouTube video:


In [7]:
youtube_video "https://www.youtube.com/embed/FNg5_2UUCNU";;


Out[7]:
- : JupyterNotebook.display_id = <abstr>

End of this demo