Commit b5411fd4 authored by Arnaud Legrand's avatar Arnaud Legrand

Regenerate HTML versions (should be propagated in FUN)

parent d59f4f84
...@@ -4,46 +4,46 @@ ...@@ -4,46 +4,46 @@
<h2>Table of Contents</h2> <h2>Table of Contents</h2>
<div id="text-table-of-contents"> <div id="text-table-of-contents">
<ul style="margin:0 0;"> <ul style="margin:0 0;">
<li style="margin-bottom:0;"><a href="#orge8af769">Installing emacs, org-mode, ess, and auctex.</a> <li style="margin-bottom:0;"><a href="#org886dc6c">Installing emacs, org-mode, ess, and auctex.</a>
<ul style="margin:0 0;"> <ul style="margin:0 0;">
<li style="margin-bottom:0;"><a href="#orgc328951">Linux (Debian, Ubuntu)</a></li> <li style="margin-bottom:0;"><a href="#org33170b6">Linux (Debian, Ubuntu)</a></li>
<li style="margin-bottom:0;"><a href="#orga08d528">macOS</a></li> <li style="margin-bottom:0;"><a href="#orga368aae">macOS</a></li>
<li style="margin-bottom:0;"><a href="#org14261c3">Windows</a> <li style="margin-bottom:0;"><a href="#orgbd810a7">Windows</a>
<ul style="margin:0 0;"> <ul style="margin:0 0;">
<li style="margin-bottom:0;"><a href="#org03fa89f">Directory naming conventions</a></li> <li style="margin-bottom:0;"><a href="#org2a1e237">Directory naming conventions</a></li>
<li style="margin-bottom:0;"><a href="#orgf5bfe14">Making R and Python available to the console</a></li> <li style="margin-bottom:0;"><a href="#org09f39e6">Making R and Python available to the console</a></li>
<li style="margin-bottom:0;"><a href="#org3e45416">Installing and configuring Matplotlib (graphic python library)</a></li> <li style="margin-bottom:0;"><a href="#org5d1dfdc">Installing and configuring Matplotlib (graphic python library)</a></li>
</ul> </ul>
</li> </li>
</ul> </ul>
</li> </li>
<li style="margin-bottom:0;"><a href="#org2d311a7">A simple "<i>reproducible research</i>" emacs configuration</a> <li style="margin-bottom:0;"><a href="#orgabdfcf5">A simple "<i>reproducible research</i>" emacs configuration</a>
<ul style="margin:0 0;"> <ul style="margin:0 0;">
<li style="margin-bottom:0;"><a href="#org1bacdf3">Step 0: Backup and download our configuration</a></li> <li style="margin-bottom:0;"><a href="#org83bdf4d">Step 0: Backup and download our configuration</a></li>
<li style="margin-bottom:0;"><a href="#org4eb14d4">Step 1: Prepare your journal</a></li> <li style="margin-bottom:0;"><a href="#orgedbc05d">Step 1: Prepare your journal</a></li>
<li style="margin-bottom:0;"><a href="#org07e0765">Step 2: Set up Emacs configuration</a></li> <li style="margin-bottom:0;"><a href="#org2d3412e">Step 2: Set up Emacs configuration</a></li>
<li style="margin-bottom:0;"><a href="#orgacb816c">Step 3: Adapt the configuration to your specific needs if required</a></li> <li style="margin-bottom:0;"><a href="#orgf8c57a2">Step 3: Adapt the configuration to your specific needs if required</a></li>
<li style="margin-bottom:0;"><a href="#orgd30758f">Step 4: Check whether the installation is working or not</a></li> <li style="margin-bottom:0;"><a href="#orgcd0dd6a">Step 4: Check whether the installation is working or not</a></li>
<li style="margin-bottom:0;"><a href="#org4a14b59">Step 5: Open and play with your journal:</a></li> <li style="margin-bottom:0;"><a href="#org7a25e13">Step 5: Open and play with your journal:</a></li>
</ul> </ul>
</li> </li>
<li style="margin-bottom:0;"><a href="#org86b127a">A stub of replicable article</a></li> <li style="margin-bottom:0;"><a href="#orgb88bcaf">A stub of replicable article</a></li>
<li style="margin-bottom:0;"><a href="#orgc35cb3d">Emacs Tips and tricks</a> <li style="margin-bottom:0;"><a href="#org01b2658">Emacs Tips and tricks</a>
<ul style="margin:0 0;"> <ul style="margin:0 0;">
<li style="margin-bottom:0;"><a href="#org5c2276e">Cheat-sheets</a> <li style="margin-bottom:0;"><a href="#orgd56b777">Cheat-sheets</a>
<ul style="margin:0 0;"> <ul style="margin:0 0;">
<li style="margin-bottom:0;"><a href="#org791742d">Emacs</a></li> <li style="margin-bottom:0;"><a href="#orge166ddb">Emacs</a></li>
<li style="margin-bottom:0;"><a href="#orgc1c8d4c">Org-mode</a></li> <li style="margin-bottom:0;"><a href="#org408f38a">Org-mode</a></li>
</ul> </ul>
</li> </li>
<li style="margin-bottom:0;"><a href="#org5cd28fb">Video tutorials</a></li> <li style="margin-bottom:0;"><a href="#org0d09525">Video tutorials</a></li>
<li style="margin-bottom:0;"><a href="#org1442129">Additional useful emacs packages</a> <li style="margin-bottom:0;"><a href="#org5254050">Additional useful emacs packages</a>
<ul style="margin:0 0;"> <ul style="margin:0 0;">
<li style="margin-bottom:0;"><a href="#org1df4647">Company-mode</a></li> <li style="margin-bottom:0;"><a href="#orgb7773c1">Company-mode</a></li>
<li style="margin-bottom:0;"><a href="#orgdb2e273">Magit</a></li> <li style="margin-bottom:0;"><a href="#org700813f">Magit</a></li>
</ul> </ul>
</li> </li>
<li style="margin-bottom:0;"><a href="#org79d87f6">Other resources</a></li> <li style="margin-bottom:0;"><a href="#org5e0e6f3">Other resources</a></li>
</ul> </ul>
</li> </li>
</ul> </ul>
...@@ -64,13 +64,13 @@ the <a href="https://www.fun-mooc.fr/courses/course-v1:inria+41016+session01bis/ ...@@ -64,13 +64,13 @@ the <a href="https://www.fun-mooc.fr/courses/course-v1:inria+41016+session01bis/
The next section provides information on how to install emacs. The next section provides information on how to install emacs.
</p> </p>
<div id="outline-container-orge8af769" class="outline-2"> <div id="outline-container-org886dc6c" class="outline-2">
<h2 id="orge8af769">Installing emacs, org-mode, ess, and auctex.</h2> <h2 id="org886dc6c">Installing emacs, org-mode, ess, and auctex.</h2>
<div class="outline-text-2" id="text-orge8af769"> <div class="outline-text-2" id="text-org886dc6c">
</div> </div>
<div id="outline-container-orgc328951" class="outline-3"> <div id="outline-container-org33170b6" class="outline-3">
<h3 id="orgc328951">Linux (Debian, Ubuntu)</h3> <h3 id="org33170b6">Linux (Debian, Ubuntu)</h3>
<div class="outline-text-3" id="text-orgc328951"> <div class="outline-text-3" id="text-org33170b6">
<p> <p>
We provide here only instructions for debian-based distributions. Feel We provide here only instructions for debian-based distributions. Feel
free to contribute to this document to provide up-to-date information free to contribute to this document to provide up-to-date information
...@@ -132,11 +132,11 @@ which is now deprecated. ...@@ -132,11 +132,11 @@ which is now deprecated.
</p> </p>
</div> </div>
</div> </div>
<div id="outline-container-orga08d528" class="outline-3"> <div id="outline-container-orga368aae" class="outline-3">
<h3 id="orga08d528">macOS</h3> <h3 id="orga368aae">macOS</h3>
<div class="outline-text-3" id="text-orga08d528"> <div class="outline-text-3" id="text-orga368aae">
<p> <p>
<b>Note:</b> macOS comes with a prehistoric command-line-only version of Emacs located at /usr/bin/emacs. It's best to forget about it. <b>Note:</b> macOS comes with a prehistoric command-line-only version of Emacs located at <code>/usr/bin/emacs</code>. It's best to forget about it.
</p> </p>
<ul class="org-ul"> <ul class="org-ul">
...@@ -189,9 +189,9 @@ in order to make Emacs accessible directly from <code>/Applications</code>. ...@@ -189,9 +189,9 @@ in order to make Emacs accessible directly from <code>/Applications</code>.
</ul> </ul>
</div> </div>
</div> </div>
<div id="outline-container-org14261c3" class="outline-3"> <div id="outline-container-orgbd810a7" class="outline-3">
<h3 id="org14261c3">Windows</h3> <h3 id="orgbd810a7">Windows</h3>
<div class="outline-text-3" id="text-org14261c3"> <div class="outline-text-3" id="text-orgbd810a7">
<p> <p>
Install the <code>.exe</code> file from <a href="http://vgoulet.act.ulaval.ca/">Vincent Goulet</a>: Install the <code>.exe</code> file from <a href="http://vgoulet.act.ulaval.ca/">Vincent Goulet</a>:
<a href="https://vigou3.github.io/emacs-modified-windows/">https://vigou3.github.io/emacs-modified-windows/</a>. It ships with recent <a href="https://vigou3.github.io/emacs-modified-windows/">https://vigou3.github.io/emacs-modified-windows/</a>. It ships with recent
...@@ -202,10 +202,19 @@ versions: ...@@ -202,10 +202,19 @@ versions:
<li style="margin-bottom:0;">Org-mode 9.1.13</li> <li style="margin-bottom:0;">Org-mode 9.1.13</li>
<li style="margin-bottom:0;">ESS 17.11</li> <li style="margin-bottom:0;">ESS 17.11</li>
</ul> </ul>
<p>
To have code pretty printing when exporting to html, it appears like
you should install the <code>htmlize</code> package, which is done by opening emacs
and typing the following command:
</p>
<pre style="padding-left: 30px; background-color: #f6f8fa;" class="example">
M-x package-install RET htmlize RET # where M-x means pressing the "Esc" key then the "x" key
</pre>
</div> </div>
<div id="outline-container-org03fa89f" class="outline-4">
<h4 id="org03fa89f">Directory naming conventions</h4> <div id="outline-container-org2a1e237" class="outline-4">
<div class="outline-text-4" id="text-org03fa89f"> <h4 id="org2a1e237">Directory naming conventions</h4>
<div class="outline-text-4" id="text-org2a1e237">
<p> <p>
In all the following instructions, it is common to refer to your home In all the following instructions, it is common to refer to your home
directory through the (UNIX) <code>~/</code> notation. On Windows, your home directory through the (UNIX) <code>~/</code> notation. On Windows, your home
...@@ -216,9 +225,9 @@ means we are referring to <code>C:\Users\yourname\org</code> (resp. ...@@ -216,9 +225,9 @@ means we are referring to <code>C:\Users\yourname\org</code> (resp.
</p> </p>
</div> </div>
</div> </div>
<div id="outline-container-orgf5bfe14" class="outline-4"> <div id="outline-container-org09f39e6" class="outline-4">
<h4 id="orgf5bfe14">Making R and Python available to the console</h4> <h4 id="org09f39e6">Making R and Python available to the console</h4>
<div class="outline-text-4" id="text-orgf5bfe14"> <div class="outline-text-4" id="text-org09f39e6">
<p> <p>
When running a command, windows will look for the command in the When running a command, windows will look for the command in the
directories indicated in the <code>PATH</code> environment variable. If none of directories indicated in the <code>PATH</code> environment variable. If none of
...@@ -236,9 +245,9 @@ explained <a href="http://sametmax.com/ajouter-un-chemin-a-la-variable-denvironn ...@@ -236,9 +245,9 @@ explained <a href="http://sametmax.com/ajouter-un-chemin-a-la-variable-denvironn
</p> </p>
</div> </div>
</div> </div>
<div id="outline-container-org3e45416" class="outline-4"> <div id="outline-container-org5d1dfdc" class="outline-4">
<h4 id="org3e45416">Installing and configuring Matplotlib (graphic python library)</h4> <h4 id="org5d1dfdc">Installing and configuring Matplotlib (graphic python library)</h4>
<div class="outline-text-4" id="text-org3e45416"> <div class="outline-text-4" id="text-org5d1dfdc">
<p> <p>
Open an DOS console and type the following command: Open an DOS console and type the following command:
</p> </p>
...@@ -275,9 +284,9 @@ starting with <code>backend</code>, which amounts to use the default <code>Agg</ ...@@ -275,9 +284,9 @@ starting with <code>backend</code>, which amounts to use the default <code>Agg</
</div> </div>
</div> </div>
<div id="outline-container-org2d311a7" class="outline-2"> <div id="outline-container-orgabdfcf5" class="outline-2">
<h2 id="org2d311a7">A simple "<i>reproducible research</i>" emacs configuration</h2> <h2 id="orgabdfcf5">A simple "<i>reproducible research</i>" emacs configuration</h2>
<div class="outline-text-2" id="text-org2d311a7"> <div class="outline-text-2" id="text-orgabdfcf5">
<p> <p>
This section is illustrated in a <a href="https://www.fun-mooc.fr/courses/course-v1:inria+41016+session01bis/jump_to_id/9cfc7500f0ef46d288d2317ec7b037b4">video tutorial</a> (<i>"Mise en place This section is illustrated in a <a href="https://www.fun-mooc.fr/courses/course-v1:inria+41016+session01bis/jump_to_id/9cfc7500f0ef46d288d2317ec7b037b4">video tutorial</a> (<i>"Mise en place
Emacs/Orgmode"</i> in French). Watching it before following the Emacs/Orgmode"</i> in French). Watching it before following the
...@@ -296,9 +305,9 @@ adding a few org-mode specific configurations. ...@@ -296,9 +305,9 @@ adding a few org-mode specific configurations.
</p> </p>
</div> </div>
<div id="outline-container-org1bacdf3" class="outline-3"> <div id="outline-container-org83bdf4d" class="outline-3">
<h3 id="org1bacdf3">Step 0: Backup and download our configuration</h3> <h3 id="org83bdf4d">Step 0: Backup and download our configuration</h3>
<div class="outline-text-3" id="text-org1bacdf3"> <div class="outline-text-3" id="text-org83bdf4d">
<p> <p>
The procedure we propose will wipe your already existing custom emacs The procedure we propose will wipe your already existing custom emacs
configuration if you already have one. <b>You should thus beforehand make configuration if you already have one. <b>You should thus beforehand make
...@@ -319,9 +328,9 @@ rr_org/journal.org ...@@ -319,9 +328,9 @@ rr_org/journal.org
</div> </div>
</div> </div>
<div id="outline-container-org4eb14d4" class="outline-3"> <div id="outline-container-orgedbc05d" class="outline-3">
<h3 id="org4eb14d4">Step 1: Prepare your journal</h3> <h3 id="orgedbc05d">Step 1: Prepare your journal</h3>
<div class="outline-text-3" id="text-org4eb14d4"> <div class="outline-text-3" id="text-orgedbc05d">
<p> <p>
Create an <code>org/</code> directory in the top of your home: Create an <code>org/</code> directory in the top of your home:
</p> </p>
...@@ -338,9 +347,9 @@ should give a try. ...@@ -338,9 +347,9 @@ should give a try.
</p> </p>
</div> </div>
</div> </div>
<div id="outline-container-org07e0765" class="outline-3"> <div id="outline-container-org2d3412e" class="outline-3">
<h3 id="org07e0765">Step 2: Set up Emacs configuration</h3> <h3 id="org2d3412e">Step 2: Set up Emacs configuration</h3>
<div class="outline-text-3" id="text-org07e0765"> <div class="outline-text-3" id="text-org2d3412e">
<p> <p>
Copy <code>rr_org/init.el</code> in your <code>~/.emacs.d/</code> directory. Copy <code>rr_org/init.el</code> in your <code>~/.emacs.d/</code> directory.
</p> </p>
...@@ -352,9 +361,9 @@ configuration with the following command: <code>emacs -q -l rr_org/init.el</code ...@@ -352,9 +361,9 @@ configuration with the following command: <code>emacs -q -l rr_org/init.el</code
</p> </p>
</div> </div>
</div> </div>
<div id="outline-container-orgacb816c" class="outline-3"> <div id="outline-container-orgf8c57a2" class="outline-3">
<h3 id="orgacb816c">Step 3: Adapt the configuration to your specific needs if required</h3> <h3 id="orgf8c57a2">Step 3: Adapt the configuration to your specific needs if required</h3>
<div class="outline-text-3" id="text-orgacb816c"> <div class="outline-text-3" id="text-orgf8c57a2">
<p> <p>
There are two situations in which it might be necessary to modify There are two situations in which it might be necessary to modify
<code>init.el</code>: <code>init.el</code>:
...@@ -383,9 +392,9 @@ beginning of the file for instructions. ...@@ -383,9 +392,9 @@ beginning of the file for instructions.
</p> </p>
</div> </div>
</div> </div>
<div id="outline-container-orgd30758f" class="outline-3"> <div id="outline-container-orgcd0dd6a" class="outline-3">
<h3 id="orgd30758f">Step 4: Check whether the installation is working or not</h3> <h3 id="orgcd0dd6a">Step 4: Check whether the installation is working or not</h3>
<div class="outline-text-3" id="text-orgd30758f"> <div class="outline-text-3" id="text-orgcd0dd6a">
<p> <p>
Open a new instance of Emacs and open a <code>foo.org</code> file. Copy the Open a new instance of Emacs and open a <code>foo.org</code> file. Copy the
following lines in this file: following lines in this file:
...@@ -416,9 +425,9 @@ is demonstrated in the <a href="https://app-learninglab.inria.fr/gitlab/learning ...@@ -416,9 +425,9 @@ is demonstrated in the <a href="https://app-learninglab.inria.fr/gitlab/learning
</p> </p>
</div> </div>
</div> </div>
<div id="outline-container-org4a14b59" class="outline-3"> <div id="outline-container-org7a25e13" class="outline-3">
<h3 id="org4a14b59">Step 5: Open and play with your journal:</h3> <h3 id="org7a25e13">Step 5: Open and play with your journal:</h3>
<div class="outline-text-3" id="text-org4a14b59"> <div class="outline-text-3" id="text-org7a25e13">
<p> <p>
In step 1, you were told to create an journal in In step 1, you were told to create an journal in
<code>~org/journal.org</code>. First you probably want to make sure this file is <code>~org/journal.org</code>. First you probably want to make sure this file is
...@@ -429,9 +438,9 @@ FUN forums. ...@@ -429,9 +438,9 @@ FUN forums.
</div> </div>
</div> </div>
</div> </div>
<div id="outline-container-org86b127a" class="outline-2"> <div id="outline-container-orgb88bcaf" class="outline-2">
<h2 id="org86b127a">A stub of replicable article</h2> <h2 id="orgb88bcaf">A stub of replicable article</h2>
<div class="outline-text-2" id="text-org86b127a"> <div class="outline-text-2" id="text-orgb88bcaf">
<p> <p>
This section is illustrated in a <a href="https://www.fun-mooc.fr/courses/course-v1:inria+41016+session01bis/jump_to_id/9cfc7500f0ef46d288d2317ec7b037b4">video tutorial</a> (<i>"Écrire un article This section is illustrated in a <a href="https://www.fun-mooc.fr/courses/course-v1:inria+41016+session01bis/jump_to_id/9cfc7500f0ef46d288d2317ec7b037b4">video tutorial</a> (<i>"Écrire un article
réplicable avec Emacs/Orgmode"</i> in French). Watching it before réplicable avec Emacs/Orgmode"</i> in French). Watching it before
...@@ -495,22 +504,22 @@ chunk of code when exporting. ...@@ -495,22 +504,22 @@ chunk of code when exporting.
</div> </div>
</div> </div>
<div id="outline-container-orgc35cb3d" class="outline-2"> <div id="outline-container-org01b2658" class="outline-2">
<h2 id="orgc35cb3d">Emacs Tips and tricks</h2> <h2 id="org01b2658">Emacs Tips and tricks</h2>
<div class="outline-text-2" id="text-orgc35cb3d"> <div class="outline-text-2" id="text-org01b2658">
</div> </div>
<div id="outline-container-org5c2276e" class="outline-3"> <div id="outline-container-orgd56b777" class="outline-3">
<h3 id="org5c2276e">Cheat-sheets</h3> <h3 id="orgd56b777">Cheat-sheets</h3>
<div class="outline-text-3" id="text-org5c2276e"> <div class="outline-text-3" id="text-orgd56b777">
<p> <p>
Learning emacs and org-mode can be difficult as there is an inordinate Learning emacs and org-mode can be difficult as there is an inordinate
amount of shortcuts. Many people have thus come up with amount of shortcuts. Many people have thus come up with
cheat-sheats. Here is a selection in case it helps: cheat-sheats. Here is a selection in case it helps:
</p> </p>
</div> </div>
<div id="outline-container-org791742d" class="outline-4"> <div id="outline-container-orge166ddb" class="outline-4">
<h4 id="org791742d">Emacs</h4> <h4 id="orge166ddb">Emacs</h4>
<div class="outline-text-4" id="text-org791742d"> <div class="outline-text-4" id="text-orge166ddb">
<ul class="org-ul"> <ul class="org-ul">
<li style="margin-bottom:0;"><a href="https://app-learninglab.inria.fr/gitlab/learning-lab/mooc-rr-ressources/blob/master/module2/ressources/rr_org/journal.org">Common and step-by-step emacs shortcuts for our <i>reproducible research</i> configuration</a></li> <li style="margin-bottom:0;"><a href="https://app-learninglab.inria.fr/gitlab/learning-lab/mooc-rr-ressources/blob/master/module2/ressources/rr_org/journal.org">Common and step-by-step emacs shortcuts for our <i>reproducible research</i> configuration</a></li>
<li style="margin-bottom:0;"><a href="https://www.gnu.org/software/emacs/refcards/pdf/refcard.pdf">The official GNU emacs refcard</a></li> <li style="margin-bottom:0;"><a href="https://www.gnu.org/software/emacs/refcards/pdf/refcard.pdf">The official GNU emacs refcard</a></li>
...@@ -519,9 +528,9 @@ cheat-sheats. Here is a selection in case it helps: ...@@ -519,9 +528,9 @@ cheat-sheats. Here is a selection in case it helps:
</ul> </ul>
</div> </div>
</div> </div>
<div id="outline-container-orgc1c8d4c" class="outline-4"> <div id="outline-container-org408f38a" class="outline-4">
<h4 id="orgc1c8d4c">Org-mode</h4> <h4 id="org408f38a">Org-mode</h4>
<div class="outline-text-4" id="text-orgc1c8d4c"> <div class="outline-text-4" id="text-org408f38a">
<ul class="org-ul"> <ul class="org-ul">
<li style="margin-bottom:0;"><a href="https://app-learninglab.inria.fr/gitlab/learning-lab/mooc-rr-ressources/blob/master/module2/ressources/rr_org/journal.org">Common and step-by-step org-mode shortcuts for our <i>reproducible research</i> configuration</a></li> <li style="margin-bottom:0;"><a href="https://app-learninglab.inria.fr/gitlab/learning-lab/mooc-rr-ressources/blob/master/module2/ressources/rr_org/journal.org">Common and step-by-step org-mode shortcuts for our <i>reproducible research</i> configuration</a></li>
<li style="margin-bottom:0;"><a href="https://orgmode.org/worg/orgcard.html">The official org-mode refcard</a></li> <li style="margin-bottom:0;"><a href="https://orgmode.org/worg/orgcard.html">The official org-mode refcard</a></li>
...@@ -530,22 +539,22 @@ cheat-sheats. Here is a selection in case it helps: ...@@ -530,22 +539,22 @@ cheat-sheats. Here is a selection in case it helps:
</div> </div>
</div> </div>
</div> </div>
<div id="outline-container-org5cd28fb" class="outline-3"> <div id="outline-container-org0d09525" class="outline-3">
<h3 id="org5cd28fb">Video tutorials</h3> <h3 id="org0d09525">Video tutorials</h3>
<div class="outline-text-3" id="text-org5cd28fb"> <div class="outline-text-3" id="text-org0d09525">
<p> <p>
For those of you who prefer video explanations, here is a <a href="https://www.youtube.com/playlist?list=PL9KxKa8NpFxIcNQa9js7dQQIHc81b0-Xg">Youtube For those of you who prefer video explanations, here is a <a href="https://www.youtube.com/playlist?list=PL9KxKa8NpFxIcNQa9js7dQQIHc81b0-Xg">Youtube
channel with many step by step emacs tutorials</a>. channel with many step by step emacs tutorials</a>.
</p> </p>
</div> </div>
</div> </div>
<div id="outline-container-org1442129" class="outline-3"> <div id="outline-container-org5254050" class="outline-3">
<h3 id="org1442129">Additional useful emacs packages</h3> <h3 id="org5254050">Additional useful emacs packages</h3>
<div class="outline-text-3" id="text-org1442129"> <div class="outline-text-3" id="text-org5254050">
</div> </div>
<div id="outline-container-org1df4647" class="outline-4"> <div id="outline-container-orgb7773c1" class="outline-4">
<h4 id="org1df4647">Company-mode</h4> <h4 id="orgb7773c1">Company-mode</h4>
<div class="outline-text-4" id="text-org1df4647"> <div class="outline-text-4" id="text-orgb7773c1">
<p> <p>
<a href="http://company-mode.github.io/">Company-mode</a> is a text completion framework for Emacs. It allows to <a href="http://company-mode.github.io/">Company-mode</a> is a text completion framework for Emacs. It allows to
have smart completion in emacs for the most common languages. If you have smart completion in emacs for the most common languages. If you
...@@ -554,9 +563,9 @@ official Web page: <a href="http://company-mode.github.io/">http://company-mode. ...@@ -554,9 +563,9 @@ official Web page: <a href="http://company-mode.github.io/">http://company-mode.
</p> </p>
</div> </div>
</div> </div>
<div id="outline-container-orgdb2e273" class="outline-4"> <div id="outline-container-org700813f" class="outline-4">
<h4 id="orgdb2e273">Magit</h4> <h4 id="org700813f">Magit</h4>
<div class="outline-text-4" id="text-orgdb2e273"> <div class="outline-text-4" id="text-org700813f">
<p> <p>
<a href="https://magit.vc/">Magit</a> is an emacs interface for Git. Its usage is briefly illustrated <a href="https://magit.vc/">Magit</a> is an emacs interface for Git. Its usage is briefly illustrated
in the context of this MOOC in a <a href="https://www.fun-mooc.fr/courses/course-v1:inria+41016+session01bis/jump_to_id/9cfc7500f0ef46d288d2317ec7b037b4">video tutorial</a> (<i>"Utilisation in the context of this MOOC in a <a href="https://www.fun-mooc.fr/courses/course-v1:inria+41016+session01bis/jump_to_id/9cfc7500f0ef46d288d2317ec7b037b4">video tutorial</a> (<i>"Utilisation
...@@ -574,9 +583,9 @@ invoke magit by using <code>C-x g</code>. ...@@ -574,9 +583,9 @@ invoke magit by using <code>C-x g</code>.
</div> </div>
</div> </div>
</div> </div>
<div id="outline-container-org79d87f6" class="outline-3"> <div id="outline-container-org5e0e6f3" class="outline-3">
<h3 id="org79d87f6">Other resources</h3> <h3 id="org5e0e6f3">Other resources</h3>
<div class="outline-text-3" id="text-org79d87f6"> <div class="outline-text-3" id="text-org5e0e6f3">
<ul class="org-ul"> <ul class="org-ul">
<li style="margin-bottom:0;"><a href="https://orgmode.org/orgguide.pdf">The compact Org-mode Guide</a></li> <li style="margin-bottom:0;"><a href="https://orgmode.org/orgguide.pdf">The compact Org-mode Guide</a></li>
<li style="margin-bottom:0;"><a href="https://github.com/dfeich/org-babel-examples">Many examples illustrating the use of different languages in org-mode</a></li> <li style="margin-bottom:0;"><a href="https://github.com/dfeich/org-babel-examples">Many examples illustrating the use of different languages in org-mode</a></li>
......
...@@ -4,27 +4,27 @@ ...@@ -4,27 +4,27 @@
<h2>Table of Contents</h2> <h2>Table of Contents</h2>
<div id="text-table-of-contents"> <div id="text-table-of-contents">
<ul style="margin:0 0;"> <ul style="margin:0 0;">
<li style="margin-bottom:0;"><a href="#orgf681c22">Installing Git</a> <li style="margin-bottom:0;"><a href="#orgbac7796">Installing Git</a>
<ul style="margin:0 0;"> <ul style="margin:0 0;">
<li style="margin-bottom:0;"><a href="#org14f2f14">Linux (debian, ubuntu)</a></li> <li style="margin-bottom:0;"><a href="#org548b276">Linux (debian, ubuntu)</a></li>
<li style="margin-bottom:0;"><a href="#orgbd75a40">Mac OSX and Windows</a></li> <li style="margin-bottom:0;"><a href="#org7ba69dc">Mac OSX and Windows</a></li>
</ul> </ul>
</li> </li>
<li style="margin-bottom:0;"><a href="#org956639d">Configuring Git</a> <li style="margin-bottom:0;"><a href="#orgbb46186">Configuring Git</a>
<ul style="margin:0 0;"> <ul style="margin:0 0;">
<li style="margin-bottom:0;"><a href="#orgf085318">Telling Git who you are: Name and Email</a></li> <li style="margin-bottom:0;"><a href="#org7c8db1d">Telling Git who you are: Name and Email</a></li>
<li style="margin-bottom:0;"><a href="#orgd0fb0b6">Dealing with proxies</a></li> <li style="margin-bottom:0;"><a href="#org7809667">Dealing with proxies</a></li>
<li style="margin-bottom:0;"><a href="#org0e8c2f3">Getting your default password on GitLab (and possibly changing it)</a></li> <li style="margin-bottom:0;"><a href="#org6a9f6ba">Getting your default password on GitLab (and possibly changing it)</a></li>
<li style="margin-bottom:0;"><a href="#org8a9bcf5">Remembering your password locally</a></li> <li style="margin-bottom:0;"><a href="#org26c8420">Remembering your password locally</a></li>
<li style="margin-bottom:0;"><a href="#orgaaddf44">Optional: authenticating through SSH</a> <li style="margin-bottom:0;"><a href="#org2b2cd36">Optional: authenticating through SSH</a>
<ul style="margin:0 0;"> <ul style="margin:0 0;">
<li style="margin-bottom:0;"><a href="#orgb3458b2">Installing SSH</a></li> <li style="margin-bottom:0;"><a href="#orgdbae6d8">Installing SSH</a></li>
<li style="margin-bottom:0;"><a href="#org76f5f1d">Setting up SSH on GitLab</a></li> <li style="margin-bottom:0;"><a href="#orga57a836">Setting up SSH on GitLab</a></li>
</ul> </ul>
</li> </li>
</ul> </ul>
</li> </li>
<li style="margin-bottom:0;"><a href="#org14c2f4d">Using Git through the command line to synchronize your local files with Gitlab</a></li> <li style="margin-bottom:0;"><a href="#org8e2cee5">Using Git through the command line to synchronize your local files with Gitlab</a></li>
</ul> </ul>
</div> </div>
</div> </div>
...@@ -61,13 +61,13 @@ Please read all these instructions carefully, in particular the one on ...@@ -61,13 +61,13 @@ Please read all these instructions carefully, in particular the one on
"Configuring your password on GitLab". "Configuring your password on GitLab".
</p> </p>
<div id="outline-container-orgf681c22" class="outline-2"> <div id="outline-container-orgbac7796" class="outline-2">
<h2 id="orgf681c22">Installing Git</h2> <h2 id="orgbac7796">Installing Git</h2>
<div class="outline-text-2" id="text-orgf681c22"> <div class="outline-text-2" id="text-orgbac7796">
</div> </div>
<div id="outline-container-org14f2f14" class="outline-3"> <div id="outline-container-org548b276" class="outline-3">
<h3 id="org14f2f14">Linux (debian, ubuntu)</h3> <h3 id="org548b276">Linux (debian, ubuntu)</h3>
<div class="outline-text-3" id="text-org14f2f14"> <div class="outline-text-3" id="text-org548b276">
<p> <p>
We provide here only instructions for debian-based distributions. Feel We provide here only instructions for debian-based distributions. Feel
free to contribute to this document to provide up-to-date information free to contribute to this document to provide up-to-date information
...@@ -83,9 +83,9 @@ Run (as root): ...@@ -83,9 +83,9 @@ Run (as root):
</div> </div>
</div> </div>
</div> </div>
<div id="outline-container-orgbd75a40" class="outline-3"> <div id="outline-container-org7ba69dc" class="outline-3">
<h3 id="orgbd75a40">Mac OSX and Windows</h3> <h3 id="org7ba69dc">Mac OSX and Windows</h3>
<div class="outline-text-3" id="text-orgbd75a40"> <div class="outline-text-3" id="text-org7ba69dc">
<ul class="org-ul"> <ul class="org-ul">
<li style="margin-bottom:0;">Download and install Git from the <a href="https://git-scm.com/downloads">Git website</a>.</li> <li style="margin-bottom:0;">Download and install Git from the <a href="https://git-scm.com/downloads">Git website</a>.</li>
<li style="margin-bottom:0;">Optional Git clients (should not be needed if you work within <li style="margin-bottom:0;">Optional Git clients (should not be needed if you work within
...@@ -105,13 +105,13 @@ Rstudio): ...@@ -105,13 +105,13 @@ Rstudio):
</div> </div>
</div> </div>
</div> </div>
<div id="outline-container-org956639d" class="outline-2"> <div id="outline-container-orgbb46186" class="outline-2">
<h2 id="org956639d">Configuring Git</h2> <h2 id="orgbb46186">Configuring Git</h2>
<div class="outline-text-2" id="text-org956639d"> <div class="outline-text-2" id="text-orgbb46186">
</div> </div>
<div id="outline-container-orgf085318" class="outline-3"> <div id="outline-container-org7c8db1d" class="outline-3">
<h3 id="orgf085318">Telling Git who you are: Name and Email</h3> <h3 id="org7c8db1d">Telling Git who you are: Name and Email</h3>
<div class="outline-text-3" id="text-orgf085318"> <div class="outline-text-3" id="text-org7c8db1d">
<ol class="org-ol"> <ol class="org-ol">
<li style="margin-bottom:0;">Open Terminal.</li> <li style="margin-bottom:0;">Open Terminal.</li>
<li style="margin-bottom:0;"><p> <li style="margin-bottom:0;"><p>
...@@ -140,9 +140,9 @@ email@example.com ...@@ -140,9 +140,9 @@ email@example.com
</ol> </ol>
</div> </div>
</div> </div>
<div id="outline-container-orgd0fb0b6" class="outline-3"> <div id="outline-container-org7809667" class="outline-3">
<h3 id="orgd0fb0b6">Dealing with proxies</h3> <h3 id="org7809667">Dealing with proxies</h3>
<div class="outline-text-3" id="text-orgd0fb0b6"> <div class="outline-text-3" id="text-org7809667">
<p> <p>
You may be behind a proxy, in which case you may have trouble cloning You may be behind a proxy, in which case you may have trouble cloning
or fetching from a remote repository or you may get an error like or fetching from a remote repository or you may get an error like
...@@ -164,9 +164,9 @@ will be prompted for it every time it is needed. ...@@ -164,9 +164,9 @@ will be prompted for it every time it is needed.
</p> </p>
</div> </div>
</div> </div>
<div id="outline-container-org0e8c2f3" class="outline-3"> <div id="outline-container-org6a9f6ba" class="outline-3">
<h3 id="org0e8c2f3">Getting your default password on GitLab (and possibly changing it)</h3> <h3 id="org6a9f6ba">Getting your default password on GitLab (and possibly changing it)</h3>
<div class="outline-text-3" id="text-org0e8c2f3"> <div class="outline-text-3" id="text-org6a9f6ba">
<p> <p>
<b>Warning (Jupyter users) :</b> changing your default Gitlab password will prevent you from committing in Jupyter. You will have to do the extra step of changing your Jupyter <code>~/.git-credentials</code> <b>Warning (Jupyter users) :</b> changing your default Gitlab password will prevent you from committing in Jupyter. You will have to do the extra step of changing your Jupyter <code>~/.git-credentials</code>
</p> </p>
...@@ -224,8 +224,8 @@ button). ...@@ -224,8 +224,8 @@ button).
</div> </div>
</div></li> </div></li>
<li style="margin-bottom:0;"><p> <li style="margin-bottom:0;"><p>
If you wish to modify your password, you shoul go to <code>Account &gt; If you wish to modify your password, you shoul go to <code>Account &gt; Settings &gt; Password</code>
Settings &gt; Password</code> and define your password using the default and define your password using the default
password you just retrieved. Again, if you use the Jupyter password you just retrieved. Again, if you use the Jupyter
notebooks we have deployed for the MOOC, remember that changing notebooks we have deployed for the MOOC, remember that changing
your default Gitlab password will prevent you from committing in your default Gitlab password will prevent you from committing in
...@@ -242,9 +242,9 @@ section). ...@@ -242,9 +242,9 @@ section).
</ol> </ol>
</div> </div>
</div> </div>
<div id="outline-container-org8a9bcf5" class="outline-3"> <div id="outline-container-org26c8420" class="outline-3">
<h3 id="org8a9bcf5">Remembering your password locally</h3> <h3 id="org26c8420">Remembering your password locally</h3>
<div class="outline-text-3" id="text-org8a9bcf5"> <div class="outline-text-3" id="text-org26c8420">
<p> <p>
If you clone your repository by simply pasting the GitLab URL, you will be If you clone your repository by simply pasting the GitLab URL, you will be
prompted for your login and your password every time you want to prompted for your login and your password every time you want to
...@@ -278,9 +278,9 @@ Use it at your own risk. ...@@ -278,9 +278,9 @@ Use it at your own risk.
</p> </p>
</div> </div>
</div> </div>
<div id="outline-container-orgaaddf44" class="outline-3"> <div id="outline-container-org2b2cd36" class="outline-3">
<h3 id="orgaaddf44">Optional: authenticating through SSH</h3> <h3 id="org2b2cd36">Optional: authenticating through SSH</h3>
<div class="outline-text-3" id="text-orgaaddf44"> <div class="outline-text-3" id="text-org2b2cd36">
<p> <p>
There are two ways of authenticating and synchronizing your local There are two ways of authenticating and synchronizing your local
repository with GitLab: through HTTPS or through SSH. The first one is repository with GitLab: through HTTPS or through SSH. The first one is
...@@ -293,13 +293,13 @@ your SSH public key on GitLab. This section provides with information ...@@ -293,13 +293,13 @@ your SSH public key on GitLab. This section provides with information
on how to do this. on how to do this.
</p> </p>
</div> </div>
<div id="outline-container-orgb3458b2" class="outline-4"> <div id="outline-container-orgdbae6d8" class="outline-4">
<h4 id="orgb3458b2">Installing SSH</h4> <h4 id="orgdbae6d8">Installing SSH</h4>
<div class="outline-text-4" id="text-orgb3458b2"> <div class="outline-text-4" id="text-orgdbae6d8">
</div> </div>
<ul class="org-ul"> <ul class="org-ul">
<li style="margin-bottom:0;"><a id="org80e244c"></a>Linux (debian, ubuntu)<br /> <li style="margin-bottom:0;"><a id="orgefff3f4"></a>Linux (debian, ubuntu)<br />
<div class="outline-text-5" id="text-org80e244c"> <div class="outline-text-5" id="text-orgefff3f4">
<p> <p>
We provide here only instructions for debian-based distributions. Feel We provide here only instructions for debian-based distributions. Feel
free to contribute to this document to provide up-to-date information free to contribute to this document to provide up-to-date information
...@@ -315,15 +315,15 @@ Run (as root): ...@@ -315,15 +315,15 @@ Run (as root):
</div> </div>
</div> </div>
</li> </li>
<li style="margin-bottom:0;"><a id="orgc213a2b"></a>Mac OSX<br /> <li style="margin-bottom:0;"><a id="org8601462"></a>Mac OSX<br />
<div class="outline-text-5" id="text-orgc213a2b"> <div class="outline-text-5" id="text-org8601462">
<p> <p>
You do not have anything to do as it is installed by default. You do not have anything to do as it is installed by default.
</p> </p>
</div> </div>
</li> </li>
<li style="margin-bottom:0;"><a id="orge370c37"></a>Windows<br /> <li style="margin-bottom:0;"><a id="org488195e"></a>Windows<br />
<div class="outline-text-5" id="text-orge370c37"> <div class="outline-text-5" id="text-org488195e">
<p> <p>
You should install the <a href="https://www.ssh.com/ssh/putty/windows/">Putty</a> client. Once it is installed, look for You should install the <a href="https://www.ssh.com/ssh/putty/windows/">Putty</a> client. Once it is installed, look for
the section on <a href="https://www.ssh.com/ssh/putty/windows/puttygen">generating an SSH key</a>. the section on <a href="https://www.ssh.com/ssh/putty/windows/puttygen">generating an SSH key</a>.
...@@ -332,9 +332,9 @@ the section on <a href="https://www.ssh.com/ssh/putty/windows/puttygen">generati ...@@ -332,9 +332,9 @@ the section on <a href="https://www.ssh.com/ssh/putty/windows/puttygen">generati
</li> </li>
</ul> </ul>
</div> </div>
<div id="outline-container-org76f5f1d" class="outline-4"> <div id="outline-container-orga57a836" class="outline-4">
<h4 id="org76f5f1d">Setting up SSH on GitLab</h4> <h4 id="orga57a836">Setting up SSH on GitLab</h4>
<div class="outline-text-4" id="text-org76f5f1d"> <div class="outline-text-4" id="text-orga57a836">
<p> <p>
Here are <a href="https://docs.gitlab.com/ee/ssh/">all the official explanations on how to set up your SSH key Here are <a href="https://docs.gitlab.com/ee/ssh/">all the official explanations on how to set up your SSH key
on GitLab</a>. Alternatively, you may also want to have a look at this on GitLab</a>. Alternatively, you may also want to have a look at this
...@@ -345,9 +345,9 @@ video: ...@@ -345,9 +345,9 @@ video:
</div> </div>
</div> </div>
</div> </div>
<div id="outline-container-org14c2f4d" class="outline-2"> <div id="outline-container-org8e2cee5" class="outline-2">
<h2 id="org14c2f4d">Using Git through the command line to synchronize your local files with Gitlab</h2> <h2 id="org8e2cee5">Using Git through the command line to synchronize your local files with Gitlab</h2>
<div class="outline-text-2" id="text-org14c2f4d"> <div class="outline-text-2" id="text-org8e2cee5">
<p> <p>
This section describes a generic (through the command line) way to This section describes a generic (through the command line) way to
synchronize your local files with Gitlab. You will not need this if synchronize your local files with Gitlab. You will not need this if
......
...@@ -4,22 +4,28 @@ ...@@ -4,22 +4,28 @@
<h2>Table of Contents</h2> <h2>Table of Contents</h2>
<div id="text-table-of-contents"> <div id="text-table-of-contents">
<ul style="margin:0 0;"> <ul style="margin:0 0;">
<li style="margin-bottom:0;"><a href="#org974f69e">Additional Jupyter resources or tricks</a> <li style="margin-bottom:0;"><a href="#orga30368c">1. Jupyter Tips and tricks</a>
<ul style="margin:0 0;"> <ul style="margin:0 0;">
<li style="margin-bottom:0;"><a href="#orgff5515e">Tips and tricks</a></li> <li style="margin-bottom:0;"><a href="#orgd2ffcbf">Running R and Python in the same notebook</a></li>
<li style="margin-bottom:0;"><a href="#orgc5ef309">Running R and Python in the same notebook</a></li> <li style="margin-bottom:0;"><a href="#org814998b">Other languages</a></li>
<li style="margin-bottom:0;"><a href="#orgb6f8685">Exporting a notebook</a></li>
</ul> </ul>
</li> </li>
<li style="margin-bottom:0;"><a href="#orge73aaac">Installing Jupyter on your own machine</a> <li style="margin-bottom:0;"><a href="#org745ca35">2. Installing and configuring Jupyter on your computer</a>
<ul style="margin:0 0;"> <ul style="margin:0 0;">
<li style="margin-bottom:0;"><a href="#orgc837a03">Installing Jupyter</a></li> <li style="margin-bottom:0;"><a href="#org82ca2e6">2.1 Installing Jupyter</a></li>
<li style="margin-bottom:0;"><a href="#orgbafde52">Side note about Jupyter, JupyterLab, JupyterHub, &#x2026;</a></li> <li style="margin-bottom:0;"><a href="#orgb5f2e75">2.2 Making sure Jupyter allows you to use R</a>
<li style="margin-bottom:0;"><a href="#orga906562">Exporting your notebooks with latex</a></li>
<li style="margin-bottom:0;"><a href="#org11225f1">Jupyter extensions/plugins</a>
<ul style="margin:0 0;"> <ul style="margin:0 0;">
<li style="margin-bottom:0;"><a href="#orgd0bb8e3">Improving notebook readability</a></li> <li style="margin-bottom:0;"><a href="#orgac7ff27">• Installing IRKernel (R package)</a></li>
<li style="margin-bottom:0;"><a href="#orgfb9dba8">Interacting with GitLab and GitHub</a></li> <li style="margin-bottom:0;"><a href="#orge8f65a7">• Installing rpy2 (Python package)</a></li>
</ul>
</li>
<li style="margin-bottom:0;"><a href="#org2730350">2.3 Additional tips</a>
<ul style="margin:0 0;">
<li style="margin-bottom:0;"><a href="#org3e523fe">• Exporting a notebook</a></li>
<li style="margin-bottom:0;"><a href="#orgb47da83">• Side note about Jupyter, JupyterLab, JupyterHub&#x2026;</a></li>
<li style="margin-bottom:0;"><a href="#org76b25cc">• Improving notebook readability</a></li>
<li style="margin-bottom:0;"><a href="#org913ba64">• Interacting with GitLab and GitHub</a></li>
<li style="margin-bottom:0;"><a href="#orgb3e3b0d">• Using other languages (e.g., SAS, Matlab, Mathematica, etc.)</a></li>
</ul> </ul>
</li> </li>
</ul> </ul>
...@@ -28,13 +34,9 @@ ...@@ -28,13 +34,9 @@
</div> </div>
</div> </div>
<div id="outline-container-org974f69e" class="outline-2"> <div id="outline-container-orga30368c" class="outline-2">
<h2 id="org974f69e">Additional Jupyter resources or tricks</h2> <h2 id="orga30368c">1. Jupyter Tips and tricks</h2>
<div class="outline-text-2" id="text-org974f69e"> <div class="outline-text-2" id="text-orga30368c">
</div>
<div id="outline-container-orgff5515e" class="outline-3">
<h3 id="orgff5515e">Tips and tricks</h3>
<div class="outline-text-3" id="text-orgff5515e">
<p> <p>
The following <a href="https://www.dataquest.io/blog/jupyter-notebook-tips-tricks-shortcuts/">webpage</a> lists several Jupyter tricks (in particular, it The following <a href="https://www.dataquest.io/blog/jupyter-notebook-tips-tricks-shortcuts/">webpage</a> lists several Jupyter tricks (in particular, it
illustrates many <code>Ipython magic</code> commands) that should improve your illustrates many <code>Ipython magic</code> commands) that should improve your
...@@ -43,28 +45,11 @@ the tricks may have been integrated in the default behavior of Jupyter ...@@ -43,28 +45,11 @@ the tricks may have been integrated in the default behavior of Jupyter
now). now).
</p> </p>
</div> </div>
</div> <div id="outline-container-orgd2ffcbf" class="outline-3">
<div id="outline-container-orgc5ef309" class="outline-3"> <h3 id="orgd2ffcbf">Running R and Python in the same notebook</h3>
<h3 id="orgc5ef309">Running R and Python in the same notebook</h3> <div class="outline-text-3" id="text-orgd2ffcbf">
<div class="outline-text-3" id="text-orgc5ef309">
<p>
The best solution to this is to install rpy2. On my machine, I have
installed the <code>python3-rpy2</code> debian package with <code>apt-get install</code>. E.g.,
</p>
<div class="org-src-container">
<pre style="padding-left: 30px; background-color: #f6f8fa;" class="src src-shell">sudo apt-get install python3-rpy2 python3-tzlocal
</pre>
</div>
<p>
An other (not really recommended if the first one is available)
alternative consists in going through the python package manager with
</p>
<div class="org-src-container">
<pre style="padding-left: 30px; background-color: #f6f8fa;" class="src src-python">pip3 install rpy2
</pre>
</div>
<p> <p>
Then you'll be able to use both languages in the same notebook by: <code>rpy2</code> package allows to use both languages in the same notebook by:
</p> </p>
<ol class="org-ol"> <ol class="org-ol">
<li style="margin-bottom:0;"><p> <li style="margin-bottom:0;"><p>
...@@ -93,51 +78,57 @@ plot(df) ...@@ -93,51 +78,57 @@ plot(df)
</div></li> </div></li>
</ol> </ol>
<p> <p>
Note that this <code>%%R</code> notation allows you to use R for the whole cell but Note that this <code>%%R</code> notation indicates that R should be used for the whole cell but
an other possibility is to use <code>%R</code> to have a single line of R within a an other possibility is to use <code>%R</code> to have a single line of R within a
python cell. python cell.
</p> </p>
</div> </div>
</div> </div>
<div id="outline-container-orgb6f8685" class="outline-3"> <div id="outline-container-org814998b" class="outline-3">
<h3 id="orgb6f8685">Exporting a notebook</h3> <h3 id="org814998b">Other languages</h3>
<div class="outline-text-3" id="text-orgb6f8685"> <div class="outline-text-3" id="text-org814998b">
<p> <p>
Obviously, you can convert to html or pdf using the using the <code>File &gt; For any reason, you may be unsatisfied with the use of R or of
Download as &gt; HTML</code> (or <code>PDF</code>) menu option. This can also be done from Python. Many other languages are available:
the command line with the following command: <a href="https://github.com/jupyter/jupyter/wiki/Jupyter-kernels">https://github.com/jupyter/jupyter/wiki/Jupyter-kernels</a>, including
non-free languages like SAS, Mathematica, Matlab&#x2026;
</p> </p>
<div class="org-src-container"> <p>
<pre style="padding-left: 30px; background-color: #f6f8fa;" class="src src-sh">ipython3 nbconvert --to pdf Untitled.ipynb None of these other languages have been deployed in the context of our
</pre> MOOC but you may want to read the next sections to know more about how
to set up your own Jupyter notebooks on your computer and benefit from these
extensions.
</p>
</div> </div>
</div>
</div>
<div id="outline-container-org745ca35" class="outline-2">
<h2 id="org745ca35">2. Installing and configuring Jupyter on your computer</h2>
<div class="outline-text-2" id="text-org745ca35">
<p> <p>
If you want to use a specific style, then the <code>nbconvert</code> exporter In this Section, we provide information on how to set up on your own
should be customized. This is discussed and demoed <a href="http://markus-beuckelmann.de/blog/customizing-nbconvert-pdf.html">here</a>. We encourage computer a Jupyter environment similar to the one deployed for this
you to simply read the <a href="https://nbconvert.readthedocs.io/en/latest/">doc of nbconvert</a>. MOOC.
</p> </p>
<p> <p>
Instead of going directly through LaTeX and playing too much with the Note that Jupyter notebooks are only a small part of the picture and
<code>nbconvert</code> exporter, an other option consists in exporting to Markdown that Jupyter is now part of a bigger project: <a href="https://blog.jupyter.org/jupyterlab-is-ready-for-users-5a6f039b8906">JupyterLab</a>, which allows
and playing with <a href="https://pandoc.org/">pandoc</a>. Both approaches work, it's rather a matter of you to mix various components (including notebooks) in your
taste. browser. In the context of this MOOC, our time frame was too short to
benefit from JupyterLab which was still under active development but
this is probably the best option now if you want to benefit from
cutting-edge Jupyter notebooks.
</p> </p>
</div> </div>
</div>
</div> <div id="outline-container-org82ca2e6" class="outline-3">
<div id="outline-container-orge73aaac" class="outline-2"> <h3 id="org82ca2e6">2.1 Installing Jupyter</h3>
<h2 id="orge73aaac">Installing Jupyter on your own machine</h2> <div class="outline-text-3" id="text-org82ca2e6">
<div class="outline-text-2" id="text-orge73aaac">
</div>
<div id="outline-container-orgc837a03" class="outline-3">
<h3 id="orgc837a03">Installing Jupyter</h3>
<div class="outline-text-3" id="text-orgc837a03">
<p> <p>
Follow these instructions if you wish to have a Jupyter environment on Follow these instructions if you wish to have a Jupyter environment on
your own machine similar to the one we set up for this MOOC. your own computer similar to the one we set up for this MOOC.
</p> </p>
<p> <p>
...@@ -161,46 +152,161 @@ activate mooc_rr ...@@ -161,46 +152,161 @@ activate mooc_rr
<span style="font-weight: bold; font-style: italic;"># </span><span style="font-weight: bold; font-style: italic;">Linux and MacOS activate the environment</span> <span style="font-weight: bold; font-style: italic;"># </span><span style="font-weight: bold; font-style: italic;">Linux and MacOS activate the environment</span>
<span style="font-weight: bold;">source</span> activate mooc_rr <span style="font-weight: bold;">source</span> activate mooc_rr
<span style="font-weight: bold; font-style: italic;"># </span><span style="font-weight: bold; font-style: italic;">Linux, MacOS and Windows: launch the notebook</span>
jupyter notebook jupyter notebook
</pre> </pre>
</div> </div>
</div> </div>
</div> </div>
<div id="outline-container-orgbafde52" class="outline-3"> <div id="outline-container-orgb5f2e75" class="outline-3">
<h3 id="orgbafde52">Side note about Jupyter, JupyterLab, JupyterHub, &#x2026;</h3> <h3 id="orgb5f2e75">2.2 Making sure Jupyter allows you to use R</h3>
<div class="outline-text-3" id="text-orgbafde52"> <div class="outline-text-3" id="text-orgb5f2e75">
<p> <p>
Note that Jupyter notebooks are only a small part of the picture and The previous environment should ship with R but if you proceeded
that Jupyter is now part of a bigger project: <a href="https://blog.jupyter.org/jupyterlab-is-ready-for-users-5a6f039b8906">JupyterLab</a>, which allows otherwise and only have python available in Jupyter, you may want to
you to mix various components (including notebooks) in your read the following section.
browser. In the context of this MOOC, our time frame was too short to </p>
benefit from JupyterLab which was still under active development but </div>
this is probably the best option now if you want to benefit from <div id="outline-container-orgac7ff27" class="outline-4">
cutting-edge Jupyter notebooks. <h4 id="orgac7ff27">• Installing <a href="https://github.com/IRkernel/IRkernel">IRKernel</a> (R package)</h4>
<div class="outline-text-4" id="text-orgac7ff27">
<p>
Do the following in R console:
</p>
<p>
Install the <code>devtools</code> package:
</p>
<div class="org-src-container">
<pre style="padding-left: 30px; background-color: #f6f8fa;" class="src src-R">install.packages(<span style="font-style: italic;">'devtools'</span>,dep=<span style="font-weight: bold; text-decoration: underline;">TRUE</span>)
</pre>
</div>
<p>
Define a proxy if needed:
</p>
<div class="org-src-container">
<pre style="padding-left: 30px; background-color: #f6f8fa;" class="src src-R"><span style="font-weight: bold; text-decoration: underline;">library</span>(httr)
set_config(use_proxy(url=<span style="font-style: italic;">"proxy"</span>, port=80, username=<span style="font-style: italic;">"username"</span>, password=<span style="font-style: italic;">"password"</span>))
</pre>
</div>
<p>
Install the <code>IRkernel</code> package:
</p>
<div class="org-src-container">
<pre style="padding-left: 30px; background-color: #f6f8fa;" class="src src-R">devtools::install_github(<span style="font-style: italic;">'IRkernel/IRkernel'</span>)
IRkernel::installspec() <span style="font-weight: bold; font-style: italic;"># </span><span style="font-weight: bold; font-style: italic;">to register the kernel in the current R installation</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orge8f65a7" class="outline-4">
<h4 id="orge8f65a7">• Installing rpy2 (Python package)</h4>
<div class="outline-text-4" id="text-orge8f65a7">
<p>
On Linux, the rpy2 package is available in standard distributions
</p> </p>
<div class="org-src-container">
<pre style="padding-left: 30px; background-color: #f6f8fa;" class="src src-shell">sudo apt-get install python3-rpy2 python3-tzlocal
</pre>
</div> </div>
<p>
An other (not really recommended if the first one is available)
alternative consists in going through the python package manager with
</p>
<div class="org-src-container">
<pre style="padding-left: 30px; background-color: #f6f8fa;" class="src src-python">pip3 install rpy2
</pre>
</div> </div>
<div id="outline-container-orga906562" class="outline-3">
<h3 id="orga906562">Exporting your notebooks with latex</h3>
<div class="outline-text-3" id="text-orga906562">
<p> <p>
Here is what we had to install on our recent debian machine to make sure <b>Windows</b>
the notebook export via latex works: </p>
<p>
Download <code>rpy2</code> <a href="https://www.lfd.uci.edu/~gohlke/pythonlibs/#rpy2">binary file</a> by choosing the right operating system.
</p>
<p>
Open a DOS console and type the following command:
</p>
<div class="org-src-container">
<pre style="padding-left: 30px; background-color: #f6f8fa;" class="src src-shell">python -m pip install rpy2&#8209;2.9.4&#8209;cp37&#8209;cp37m&#8209;win_amd64.whl <span style="font-weight: bold; font-style: italic;"># </span><span style="font-weight: bold; font-style: italic;">adapt filename</span>
</pre>
</div>
<p>
Install also <code>tzlocal</code>:
</p>
<div class="org-src-container">
<pre style="padding-left: 30px; background-color: #f6f8fa;" class="src src-shell">python -m pip install tzlocal
</pre>
</div>
</div>
</div>
</div>
<div id="outline-container-org2730350" class="outline-3">
<h3 id="org2730350">2.3 Additional tips</h3>
<div class="outline-text-3" id="text-org2730350">
</div>
<div id="outline-container-org3e523fe" class="outline-4">
<h4 id="org3e523fe">• Exporting a notebook</h4>
<div class="outline-text-4" id="text-org3e523fe">
<p>
Here is what we had to install on our recent debian computer to make sure
the notebook export via LaTeX works:
</p> </p>
<div class="org-src-container"> <div class="org-src-container">
<pre style="padding-left: 30px; background-color: #f6f8fa;" class="src src-shell">sudo apt-get install texlive-xetex wkhtmltopdf <pre style="padding-left: 30px; background-color: #f6f8fa;" class="src src-shell">sudo apt-get install texlive-xetex wkhtmltopdf
</pre> </pre>
</div> </div>
<p>
Obviously, you can convert to html or pdf using the using the <code>File &gt; Download as &gt; HTML</code> (or <code>PDF</code>) menu option. This can also be done from
the command line with the following command:
</p>
<div class="org-src-container">
<pre style="padding-left: 30px; background-color: #f6f8fa;" class="src src-sh">ipython3 nbconvert --to pdf Untitled.ipynb
</pre>
</div>
<p>
If you want to use a specific style, then the <code>nbconvert</code> exporter
should be customized. This is discussed and demoed <a href="http://markus-beuckelmann.de/blog/customizing-nbconvert-pdf.html">here</a>. We encourage
you to simply read the <a href="https://nbconvert.readthedocs.io/en/latest/">doc of nbconvert</a>.
</p>
<p>
Instead of going directly through LaTeX and playing too much with the
<code>nbconvert</code> exporter, an other option consists in exporting to Markdown
and playing with <a href="https://pandoc.org/">pandoc</a>. Both approaches work, it's rather a matter of
taste.
</p>
<p>
<b>Windows</b>
</p>
<p>
Download and install MiKTeX from the <a href="https://miktex.org/download">MiKTeX webpage</a>
by choosing the right operating system. You will be prompted to install some specific
packages when exporting to pdf.
</p>
</div> </div>
</div> </div>
<div id="outline-container-org11225f1" class="outline-3"> <div id="outline-container-orgb47da83" class="outline-4">
<h3 id="org11225f1">Jupyter extensions/plugins</h3> <h4 id="orgb47da83">• Side note about Jupyter, JupyterLab, JupyterHub&#x2026;</h4>
<div class="outline-text-3" id="text-org11225f1">
</div> </div>
<div id="outline-container-orgd0bb8e3" class="outline-4"> <div id="outline-container-org76b25cc" class="outline-4">
<h4 id="orgd0bb8e3">Improving notebook readability</h4> <h4 id="org76b25cc">Improving notebook readability</h4>
<div class="outline-text-4" id="text-orgd0bb8e3"> <div class="outline-text-4" id="text-org76b25cc">
<p> <p>
Here are a few extensions that can ease your life: Here are a few extensions that can ease your life:
</p> </p>
...@@ -226,9 +332,10 @@ jupyter-serverextension enable --py hide_code ...@@ -226,9 +332,10 @@ jupyter-serverextension enable --py hide_code
</ul> </ul>
</div> </div>
</div> </div>
<div id="outline-container-orgfb9dba8" class="outline-4">
<h4 id="orgfb9dba8">Interacting with GitLab and GitHub</h4> <div id="outline-container-org913ba64" class="outline-4">
<div class="outline-text-4" id="text-orgfb9dba8"> <h4 id="org913ba64">• Interacting with GitLab and GitHub</h4>
<div class="outline-text-4" id="text-org913ba64">
<p> <p>
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
...@@ -259,6 +366,33 @@ developed to offer a nice version control experience. ...@@ -259,6 +366,33 @@ developed to offer a nice version control experience.
</p> </p>
</div> </div>
</div> </div>
<div id="outline-container-orgb3e3b0d" class="outline-4">
<h4 id="orgb3e3b0d">• Using other languages (e.g., SAS, Matlab, Mathematica, etc.)</h4>
<div class="outline-text-4" id="text-orgb3e3b0d">
<p>
For any reason, you may be unsatisfied with the use of R or of
Python. Many other languages are available:
<a href="https://github.com/jupyter/jupyter/wiki/Jupyter-kernels">https://github.com/jupyter/jupyter/wiki/Jupyter-kernels</a>, including
non-free languages like SAS, Mathematica, Matlab&#x2026;
</p>
<p>
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
either the <a href="https://sassoftware.github.io/sas_kernel/">Python SASKernel</a> or the <a href="https://sassoftware.github.io/saspy/">Python SASPy</a> package (step by step
explanations about this are given <a href="https://app-learninglab.inria.fr/gitlab/85bc36e0a8096c618fbd5993d1cca191/mooc-rr/blob/master/documents/tuto_jupyter_windows/tuto_jupyter_windows.md">here</a>).
</p>
<p>
Since such software cannot easily be opened for inspection not widely
used, we discourage this approach as it hinders reproducibility by
essence. But perfection does not exist anyway and using Jupyter
literate programming approach allied with systematic control version
and environment control will certainly help anyway.
</p>
</div>
</div>
</div> </div>
</div> </div>
</div> </div>
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment