4 ms·
You could use https://github.com/dzop/emacs-jupyter https://github.com/dzop/emacs-jupyter to combine Org mode + Jupyter. Here's an example emacs configuration:
by d0mine 6y ago
You could use https://github.com/dzop/emacs-jupyter https://github.com/dzop/emacs-jupyter
to combine Org mode + Jupyter.
Here's an example emacs configuration:
(use-package jupyter
:after org
:config
(org-babel-do-load-languages 'org-babel-load-languages '((jupyter . t)))
;; default args for jupyter-python
(setq org-babel-default-header-args:jupyter-python
'((:results . "replace")
(:async . "yes")
(:session . "py")
(:kernel . "python3"))))
After that, you could execute jupyter code block (Org Babel):
#+begin_src jupyter-python
1+1
#+end_src
#+RESULTS:
: 2
You can use latex in org-mode, generate pictures, get nice git diff, export it to pdf, etc.
- amake 6y agoJust curious: That code could be run by just plain `#+begin_src python`. What does using Jupyter gain you?
- d0mine 6y agoNothing inherent to Jupyter (it is not like Jupyter notebooks vs. Python REPL), just some niceties: - low latency (it feels more responsive) - interactive output (tqdm works) - how Python objects are displayed by default Essentially a good implementation of Python code blocks would reimplement half of Jupyter anyway.