Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mooc-rr-ressources
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Learning Lab
mooc-rr-ressources
Commits
c224d95c
Commit
c224d95c
authored
Sep 21, 2018
by
Marie-Gabrielle Dondon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ajout section IRKernel
parent
2783c13c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
10 deletions
+37
-10
jupyter.org
module2/ressources/jupyter.org
+37
-10
No files found.
module2/ressources/jupyter.org
View file @
c224d95c
...
@@ -34,7 +34,31 @@ an other possibility is to use =%R= to have a single line of R within a
...
@@ -34,7 +34,31 @@ an other possibility is to use =%R= to have a single line of R within a
python cell.
python cell.
* 2. Installing and configuring Jupyter on your machine
* 2. Installing and configuring Jupyter on your machine
** 2.1 Installing =rpy2= on an existing install of Jupyter
** 2.1 Existing install of Jupyter
*** • Installing [[https://github.com/IRkernel/IRkernel][IRKernel]] (R package)
Do the following in R console:
Install =devtools= package:
#+begin_src R :results output :session *R* :exports both
install.packages('devtools',dep=TRUE)
#+end_src
Define proxy if needed:
#+begin_src R :results output :session *R* :exports both
library(httr)
set_config(use_proxy(url="proxy", port=80, username="username", password="password"))
#+end_src
Install =IRkernel= package:
#+begin_src R :results output :session *R* :exports both
devtools::install_github('IRkernel/IRkernel')
IRkernel::installspec() # to register the kernel in the current R installation
#+end_src
*** • Installing rpy2 (Python package)
#+begin_src shell :results output :exports both
#+begin_src shell :results output :exports both
sudo apt-get install python3-rpy2 python3-tzlocal
sudo apt-get install python3-rpy2 python3-tzlocal
#+end_src
#+end_src
...
@@ -44,7 +68,8 @@ alternative consists in going through the python package manager with
...
@@ -44,7 +68,8 @@ alternative consists in going through the python package manager with
pip3 install rpy2
pip3 install rpy2
#+end_src
#+end_src
**** /Windows/
*Windows*
Download =rpy2= [[https://www.lfd.uci.edu/~gohlke/pythonlibs/#rpy2][binary file]] by choosing the right operating system.
Download =rpy2= [[https://www.lfd.uci.edu/~gohlke/pythonlibs/#rpy2][binary file]] by choosing the right operating system.
Open a DOS console and type the following command:
Open a DOS console and type the following command:
...
@@ -81,7 +106,7 @@ jupyter notebook
...
@@ -81,7 +106,7 @@ jupyter notebook
** 2.3 Additional tips
** 2.3 Additional tips
*** Exporting a notebook
***
•
Exporting a notebook
Here is what we had to install on our recent debian machine to make sure
Here is what we had to install on our recent debian machine to make sure
the notebook export via latex works:
the notebook export via latex works:
#+begin_src shell :results output :exports both
#+begin_src shell :results output :exports both
...
@@ -104,12 +129,13 @@ Instead of going directly through LaTeX and playing too much with the
...
@@ -104,12 +129,13 @@ Instead of going directly through LaTeX and playing too much with the
and playing with [[https://pandoc.org/][pandoc]]. Both approaches work, it's rather a matter of
and playing with [[https://pandoc.org/][pandoc]]. Both approaches work, it's rather a matter of
taste.
taste.
**** /Windows/
*Windows*
Download and install MiKTeX from the [[https://miktex.org/download][MiKTeX webpage]]
Download and install MiKTeX from the [[https://miktex.org/download][MiKTeX webpage]]
by choosing the right operating system. You will be prompted to install some specific
by choosing the right operating system. You will be prompted to install some specific
packages when exporting to pdf.
packages when exporting to pdf.
*** Side note about Jupyter, JupyterLab, JupyterHub...
***
•
Side note about Jupyter, JupyterLab, JupyterHub...
Note that Jupyter notebooks are only a small part of the picture and
Note that Jupyter notebooks are only a small part of the picture and
that Jupyter is now part of a bigger project: [[https://blog.jupyter.org/jupyterlab-is-ready-for-users-5a6f039b8906][JupyterLab]], which allows
that Jupyter is now part of a bigger project: [[https://blog.jupyter.org/jupyterlab-is-ready-for-users-5a6f039b8906][JupyterLab]], which allows
you to mix various components (including notebooks) in your
you to mix various components (including notebooks) in your
...
@@ -118,7 +144,7 @@ benefit from JupyterLab which was still under active development but
...
@@ -118,7 +144,7 @@ benefit from JupyterLab which was still under active development but
this is probably the best option now if you want to benefit from
this is probably the best option now if you want to benefit from
cutting-edge Jupyter notebooks.
cutting-edge Jupyter notebooks.
*** Improving notebook readability
***
•
Improving notebook readability
Here are a few extensions that can ease your life:
Here are a few extensions that can ease your life:
- [[https://stackoverflow.com/questions/33159518/collapse-cell-in-jupyter-notebook][Code folding]] to improve readability when browsing the notebook.
- [[https://stackoverflow.com/questions/33159518/collapse-cell-in-jupyter-notebook][Code folding]] to improve readability when browsing the notebook.
#+begin_src shell :results output :exports both
#+begin_src shell :results output :exports both
...
@@ -133,7 +159,7 @@ Here are a few extensions that can ease your life:
...
@@ -133,7 +159,7 @@ Here are a few extensions that can ease your life:
jupyter-serverextension enable --py hide_code
jupyter-serverextension enable --py hide_code
#+end_src
#+end_src
*** Interacting with GitLab and GitHub
***
•
Interacting with GitLab and GitHub
To ease your experience, we added some pull/push buttons that allow
To ease your experience, we added some pull/push buttons that allow
you to commit and sync with GitLab. This development was specific to
you to commit and sync with GitLab. This development was specific to
the MOOC but inspired from a previous [[https://github.com/Lab41/sunny-side-up][proof of concept]]. We have
the MOOC but inspired from a previous [[https://github.com/Lab41/sunny-side-up][proof of concept]]. We have
...
@@ -156,11 +182,12 @@ part of the picture and that Jupyter is now part of a bigger project:
...
@@ -156,11 +182,12 @@ part of the picture and that Jupyter is now part of a bigger project:
[[https://blog.jupyter.org/jupyterlab-is-ready-for-users-5a6f039b8906][JupyterLab]], which allows you to mix various components (including
[[https://blog.jupyter.org/jupyterlab-is-ready-for-users-5a6f039b8906][JupyterLab]], which allows you to mix various components (including
notebooks) in your browser. A specific [[https://github.com/jupyterlab/jupyterlab-git][JupyterLab git plugin]] has been
notebooks) in your browser. A specific [[https://github.com/jupyterlab/jupyterlab-git][JupyterLab git plugin]] has been
developed to offer a nice version control experience.
developed to offer a nice version control experience.
*** Using other languages (e.g., SAS, Matlab, Mathematica, etc.)
*** • Using other languages (e.g., SAS, Matlab, Mathematica, etc.)
For any reason, you may be unsatisfied with the use of R or of
For any reason, you may be unsatisfied with the use of R or of
Python. Many other languages are available:
Python. Many other languages are available:
https://github.com/jupyter/jupyter/wiki/Jupyter-kernels
, including
[[https://github.com/jupyter/jupyter/wiki/Jupyter-kernels][https://github.com/jupyter/jupyter/wiki/Jupyter-kernels]]
, including
non-free languages like SAS, Mathematica, Matlab
,
...
non-free languages like SAS, Mathematica, Matlab...
Since the question was asked several times, if you really need to stay
Since the question was asked several times, if you really need to stay
with SAS, you should know that SAS can be used within Jupyter using
with SAS, you should know that SAS can be used within Jupyter using
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment