Commit 16cd34ce authored by Arnaud Legrand's avatar Arnaud Legrand

Auto-generated files

parent 7fb737f5
......@@ -4,43 +4,43 @@
<h2>Table of Contents</h2>
<div id="text-table-of-contents">
<ul style="margin:0 0;">
<li style="margin-bottom:0;"><a href="#org2a13dea">Installing emacs, org-mode, ess, and auctex.</a>
<li style="margin-bottom:0;"><a href="#orge2682fe">Installing emacs, org-mode, ess, and auctex.</a>
<ul style="margin:0 0;">
<li style="margin-bottom:0;"><a href="#org070d91d">OS-specific installation procedure</a>
<li style="margin-bottom:0;"><a href="#orgfb87b58">OS-specific installation procedure</a>
<ul style="margin:0 0;">
<li style="margin-bottom:0;"><a href="#orgc16bb02">Linux (Debian, Ubuntu)</a></li>
<li style="margin-bottom:0;"><a href="#org9920e97">Mac OS X</a></li>
<li style="margin-bottom:0;"><a href="#org9ad58c9">Windows</a></li>
<li style="margin-bottom:0;"><a href="#org5a37149">Linux (Debian, Ubuntu)</a></li>
<li style="margin-bottom:0;"><a href="#org8b6fe53">Mac OS X</a></li>
<li style="margin-bottom:0;"><a href="#org54a19e2">Windows</a></li>
</ul>
</li>
<li style="margin-bottom:0;"><a href="#orgb90fe4c"><span class="todo TODO">TODO</span> A simple "<i>reproducible research</i>" emacs configuration</a>
<li style="margin-bottom:0;"><a href="#org6ff953e"><span class="todo TODO">TODO</span> A simple "<i>reproducible research</i>" emacs configuration</a>
<ul style="margin:0 0;">
<li style="margin-bottom:0;"><a href="#orge575f92">Step 0: Backup and download our configuration</a></li>
<li style="margin-bottom:0;"><a href="#org94b4862">Step 1: Prepare your journal</a></li>
<li style="margin-bottom:0;"><a href="#org6020c9f">Step 2: Set up Emacs configuration</a></li>
<li style="margin-bottom:0;"><a href="#orgeadfe2f">Step 3: Check whether the installation is working or not</a></li>
<li style="margin-bottom:0;"><a href="#org34b9277">Step 4: Open and play with your journal:</a></li>
<li style="margin-bottom:0;"><a href="#org3defa4c">Step 0: Backup and download our configuration</a></li>
<li style="margin-bottom:0;"><a href="#orgbfcfdb3">Step 1: Prepare your journal</a></li>
<li style="margin-bottom:0;"><a href="#org649b08d">Step 2: Set up Emacs configuration</a></li>
<li style="margin-bottom:0;"><a href="#org852428c">Step 3: Check whether the installation is working or not</a></li>
<li style="margin-bottom:0;"><a href="#orgc4da1bc">Step 4: Open and play with your journal:</a></li>
</ul>
</li>
<li style="margin-bottom:0;"><a href="#orgb7bc421"><span class="todo TODO">TODO</span> A stub of replicable article</a></li>
<li style="margin-bottom:0;"><a href="#orgfbade65"><span class="todo TODO">TODO</span> A stub of replicable article</a></li>
</ul>
</li>
<li style="margin-bottom:0;"><a href="#org096efb3">Emacs Tips and tricks</a>
<li style="margin-bottom:0;"><a href="#org75bf9e8">Emacs Tips and tricks</a>
<ul style="margin:0 0;">
<li style="margin-bottom:0;"><a href="#org98e435a">Cheat-sheets</a>
<li style="margin-bottom:0;"><a href="#org3d37ba5">Cheat-sheets</a>
<ul style="margin:0 0;">
<li style="margin-bottom:0;"><a href="#org1618558">Emacs</a></li>
<li style="margin-bottom:0;"><a href="#org052b9b3">Org-mode</a></li>
<li style="margin-bottom:0;"><a href="#org6f00716">Emacs</a></li>
<li style="margin-bottom:0;"><a href="#org3e5fd61">Org-mode</a></li>
</ul>
</li>
<li style="margin-bottom:0;"><a href="#org9b5ee97">Video tutorials</a></li>
<li style="margin-bottom:0;"><a href="#orgeb23bd4">Additional useful emacs packages</a>
<li style="margin-bottom:0;"><a href="#org055d2c1">Video tutorials</a></li>
<li style="margin-bottom:0;"><a href="#org3801d38">Additional useful emacs packages</a>
<ul style="margin:0 0;">
<li style="margin-bottom:0;"><a href="#org5c934bd">Company-mode</a></li>
<li style="margin-bottom:0;"><a href="#orge7726f3">Magit</a></li>
<li style="margin-bottom:0;"><a href="#org63a1f09">Company-mode</a></li>
<li style="margin-bottom:0;"><a href="#orgda86607">Magit</a></li>
</ul>
</li>
<li style="margin-bottom:0;"><a href="#org1dfaafc">Other resources</a></li>
<li style="margin-bottom:0;"><a href="#org60f26c4">Other resources</a></li>
</ul>
</li>
</ul>
......@@ -53,17 +53,22 @@ set up org-mode for this MOOC. <b>You really should follow them
carefully or you may have trouble doing the exercices later on</b>.
</p>
<div id="outline-container-org2a13dea" class="outline-2">
<h2 id="org2a13dea">Installing emacs, org-mode, ess, and auctex.</h2>
<div class="outline-text-2" id="text-org2a13dea">
<p>
The next sections provide information on how to install emacs. Before
proceeding, make sure you have read the "Git and GitLab" instructions.
</p>
<div id="outline-container-orge2682fe" class="outline-2">
<h2 id="orge2682fe">Installing emacs, org-mode, ess, and auctex.</h2>
<div class="outline-text-2" id="text-orge2682fe">
</div>
<div id="outline-container-org070d91d" class="outline-3">
<h3 id="org070d91d">OS-specific installation procedure</h3>
<div class="outline-text-3" id="text-org070d91d">
<div id="outline-container-orgfb87b58" class="outline-3">
<h3 id="orgfb87b58">OS-specific installation procedure</h3>
<div class="outline-text-3" id="text-orgfb87b58">
</div>
<div id="outline-container-orgc16bb02" class="outline-4">
<h4 id="orgc16bb02">Linux (Debian, Ubuntu)</h4>
<div class="outline-text-4" id="text-orgc16bb02">
<div id="outline-container-org5a37149" class="outline-4">
<h4 id="org5a37149">Linux (Debian, Ubuntu)</h4>
<div class="outline-text-4" id="text-org5a37149">
<p>
We provide here only instructions for debian-based distributions. Feel
free to contribute to this document to provide up-to-date information
......@@ -125,9 +130,9 @@ which is now deprecated.
</p>
</div>
</div>
<div id="outline-container-org9920e97" class="outline-4">
<h4 id="org9920e97">Mac OS X</h4>
<div class="outline-text-4" id="text-org9920e97">
<div id="outline-container-org8b6fe53" class="outline-4">
<h4 id="org8b6fe53">Mac OS X</h4>
<div class="outline-text-4" id="text-org8b6fe53">
<ul class="org-ul">
<li style="margin-bottom:0;"><p>
<b>Option 1</b>: Install the <code>.dmg</code> file from <a href="http://vgoulet.act.ulaval.ca/">Vincent Goulet</a>:
......@@ -160,9 +165,9 @@ brew install wget
</ul>
</div>
</div>
<div id="outline-container-org9ad58c9" class="outline-4">
<h4 id="org9ad58c9">Windows</h4>
<div class="outline-text-4" id="text-org9ad58c9">
<div id="outline-container-org54a19e2" class="outline-4">
<h4 id="org54a19e2">Windows</h4>
<div class="outline-text-4" id="text-org54a19e2">
<p>
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
......@@ -176,9 +181,9 @@ versions:
</div>
</div>
</div>
<div id="outline-container-orgb90fe4c" class="outline-3">
<h3 id="orgb90fe4c"><span class="todo TODO">TODO</span> A simple "<i>reproducible research</i>" emacs configuration</h3>
<div class="outline-text-3" id="text-orgb90fe4c">
<div id="outline-container-org6ff953e" class="outline-3">
<h3 id="org6ff953e"><span class="todo TODO">TODO</span> A simple "<i>reproducible research</i>" emacs configuration</h3>
<div class="outline-text-3" id="text-org6ff953e">
<blockquote>
<p>
There will be a mini video illustrating these steps at some point
......@@ -197,9 +202,9 @@ adding a few org-mode specific configurations.
</p>
</div>
<div id="outline-container-orge575f92" class="outline-4">
<h4 id="orge575f92">Step 0: Backup and download our configuration</h4>
<div class="outline-text-4" id="text-orge575f92">
<div id="outline-container-org3defa4c" class="outline-4">
<h4 id="org3defa4c">Step 0: Backup and download our configuration</h4>
<div class="outline-text-4" id="text-org3defa4c">
<p>
The procedure we propose will wipe your already existing custom emacs
configuration if you already have one. <b>You should thus beforehand make
......@@ -220,9 +225,9 @@ rr_org/journal.org
</div>
</div>
<div id="outline-container-org94b4862" class="outline-4">
<h4 id="org94b4862">Step 1: Prepare your journal</h4>
<div class="outline-text-4" id="text-org94b4862">
<div id="outline-container-orgbfcfdb3" class="outline-4">
<h4 id="orgbfcfdb3">Step 1: Prepare your journal</h4>
<div class="outline-text-4" id="text-orgbfcfdb3">
<p>
Create an <code>org/</code> directory in the top of your home:
</p>
......@@ -239,9 +244,9 @@ should give a try.
</p>
</div>
</div>
<div id="outline-container-org6020c9f" class="outline-4">
<h4 id="org6020c9f">Step 2: Set up Emacs configuration</h4>
<div class="outline-text-4" id="text-org6020c9f">
<div id="outline-container-org649b08d" class="outline-4">
<h4 id="org649b08d">Step 2: Set up Emacs configuration</h4>
<div class="outline-text-4" id="text-org649b08d">
<p>
Copy <code>rr_org/init.el</code> in your <code>~/.emacs.d/</code> directory.
</p>
......@@ -253,9 +258,9 @@ configuration with the following command: <code>emacs -q -l rr_org/init.el</code
</p>
</div>
</div>
<div id="outline-container-orgeadfe2f" class="outline-4">
<h4 id="orgeadfe2f">Step 3: Check whether the installation is working or not</h4>
<div class="outline-text-4" id="text-orgeadfe2f">
<div id="outline-container-org852428c" class="outline-4">
<h4 id="org852428c">Step 3: Check whether the installation is working or not</h4>
<div class="outline-text-4" id="text-org852428c">
<p>
Open a new instance of Emacs and open a <code>foo.org</code> file. Copy the
following lines in this file:
......@@ -286,9 +291,9 @@ is demonstrated in the <a href="https://app-learninglab.inria.fr/gitlab/learning
</p>
</div>
</div>
<div id="outline-container-org34b9277" class="outline-4">
<h4 id="org34b9277">Step 4: Open and play with your journal:</h4>
<div class="outline-text-4" id="text-org34b9277">
<div id="outline-container-orgc4da1bc" class="outline-4">
<h4 id="orgc4da1bc">Step 4: Open and play with your journal:</h4>
<div class="outline-text-4" id="text-orgc4da1bc">
<p>
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
......@@ -299,9 +304,9 @@ forums.
</div>
</div>
</div>
<div id="outline-container-orgb7bc421" class="outline-3">
<h3 id="orgb7bc421"><span class="todo TODO">TODO</span> A stub of replicable article</h3>
<div class="outline-text-3" id="text-orgb7bc421">
<div id="outline-container-orgfbade65" class="outline-3">
<h3 id="orgfbade65"><span class="todo TODO">TODO</span> A stub of replicable article</h3>
<div class="outline-text-3" id="text-orgfbade65">
<blockquote>
<p>
There will be a mini video illustrating these steps at some point
......@@ -368,22 +373,22 @@ chunk of code when exporting.
</div>
</div>
<div id="outline-container-org096efb3" class="outline-2">
<h2 id="org096efb3">Emacs Tips and tricks</h2>
<div class="outline-text-2" id="text-org096efb3">
<div id="outline-container-org75bf9e8" class="outline-2">
<h2 id="org75bf9e8">Emacs Tips and tricks</h2>
<div class="outline-text-2" id="text-org75bf9e8">
</div>
<div id="outline-container-org98e435a" class="outline-3">
<h3 id="org98e435a">Cheat-sheets</h3>
<div class="outline-text-3" id="text-org98e435a">
<div id="outline-container-org3d37ba5" class="outline-3">
<h3 id="org3d37ba5">Cheat-sheets</h3>
<div class="outline-text-3" id="text-org3d37ba5">
<p>
Learning emacs and org-mode can be difficult as there is an inordinate
amount of shortcuts. Many people have thus come up with
cheat-sheats. Here is a selection in case it helps:
</p>
</div>
<div id="outline-container-org1618558" class="outline-4">
<h4 id="org1618558">Emacs</h4>
<div class="outline-text-4" id="text-org1618558">
<div id="outline-container-org6f00716" class="outline-4">
<h4 id="org6f00716">Emacs</h4>
<div class="outline-text-4" id="text-org6f00716">
<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://www.gnu.org/software/emacs/refcards/pdf/refcard.pdf">The official GNU emacs refcard</a></li>
......@@ -392,9 +397,9 @@ cheat-sheats. Here is a selection in case it helps:
</ul>
</div>
</div>
<div id="outline-container-org052b9b3" class="outline-4">
<h4 id="org052b9b3">Org-mode</h4>
<div class="outline-text-4" id="text-org052b9b3">
<div id="outline-container-org3e5fd61" class="outline-4">
<h4 id="org3e5fd61">Org-mode</h4>
<div class="outline-text-4" id="text-org3e5fd61">
<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://orgmode.org/worg/orgcard.html">The official org-mode refcard</a></li>
......@@ -403,22 +408,22 @@ cheat-sheats. Here is a selection in case it helps:
</div>
</div>
</div>
<div id="outline-container-org9b5ee97" class="outline-3">
<h3 id="org9b5ee97">Video tutorials</h3>
<div class="outline-text-3" id="text-org9b5ee97">
<div id="outline-container-org055d2c1" class="outline-3">
<h3 id="org055d2c1">Video tutorials</h3>
<div class="outline-text-3" id="text-org055d2c1">
<p>
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>.
</p>
</div>
</div>
<div id="outline-container-orgeb23bd4" class="outline-3">
<h3 id="orgeb23bd4">Additional useful emacs packages</h3>
<div class="outline-text-3" id="text-orgeb23bd4">
<div id="outline-container-org3801d38" class="outline-3">
<h3 id="org3801d38">Additional useful emacs packages</h3>
<div class="outline-text-3" id="text-org3801d38">
</div>
<div id="outline-container-org5c934bd" class="outline-4">
<h4 id="org5c934bd">Company-mode</h4>
<div class="outline-text-4" id="text-org5c934bd">
<div id="outline-container-org63a1f09" class="outline-4">
<h4 id="org63a1f09">Company-mode</h4>
<div class="outline-text-4" id="text-org63a1f09">
<p>
<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
......@@ -427,9 +432,9 @@ official webpage: <a href="http://company-mode.github.io/">http://company-mode.g
</p>
</div>
</div>
<div id="outline-container-orge7726f3" class="outline-4">
<h4 id="orge7726f3">Magit</h4>
<div class="outline-text-4" id="text-orge7726f3">
<div id="outline-container-orgda86607" class="outline-4">
<h4 id="orgda86607">Magit</h4>
<div class="outline-text-4" id="text-orgda86607">
<p>
<a href="https://magit.vc/">Magit</a> is an emacs interface for Git. It is very powerfull and we use
it on a daily basis but you should definitely understand what git does
......@@ -440,9 +445,9 @@ you should follow the instructions from here:
</div>
</div>
</div>
<div id="outline-container-org1dfaafc" class="outline-3">
<h3 id="org1dfaafc">Other resources</h3>
<div class="outline-text-3" id="text-org1dfaafc">
<div id="outline-container-org60f26c4" class="outline-3">
<h3 id="org60f26c4">Other resources</h3>
<div class="outline-text-3" id="text-org60f26c4">
<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://github.com/dfeich/org-babel-examples">Many examples illustrating the use of different languages in org-mode</a></li>
......
<div id="content">
<h1 class="title">Git and GitLab</h1>
<div id="table-of-contents">
<h2>Table of Contents</h2>
<div id="text-table-of-contents">
<ul style="margin:0 0;">
<li style="margin-bottom:0;"><a href="#org65282e3">Installing Git</a>
<ul style="margin:0 0;">
<li style="margin-bottom:0;"><a href="#orgfbf6964">Linux (debian, ubuntu)</a></li>
<li style="margin-bottom:0;"><a href="#orgb9333af">Mac OSX and Windows</a></li>
</ul>
</li>
<li style="margin-bottom:0;"><a href="#orgc0ecb74">Authenticating on GitLab</a>
<ul style="margin:0 0;">
<li style="margin-bottom:0;"><a href="#org368a2a9">Option 1: HTTPS</a>
<ul style="margin:0 0;">
<li style="margin-bottom:0;"><a href="#orgadea060">Configuring your GitLab password</a></li>
<li style="margin-bottom:0;"><a href="#orgd0479e2">Making sure git remembers your password</a></li>
</ul>
</li>
<li style="margin-bottom:0;"><a href="#org572d681">Option 2: SSH</a>
<ul style="margin:0 0;">
<li style="margin-bottom:0;"><a href="#orge91383b">Installing SSH</a></li>
<li style="margin-bottom:0;"><a href="#org0dfb09b">Setting up SSH on Framagit</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<p>
So far, you only used git via the web interface from the GitLab we
deployed for the MOOC.
</p>
<div class="org-center">
<p>
<a href="https://app-learninglab.inria.fr/gitlab/">https://app-learninglab.inria.fr/gitlab/</a>
</p>
</div>
<p>
If you access this link from the FUN platform, you do not have to
authenticate and you can readily read and modify all your files. This
is very convenient but in most cases, you will want to have your own
local copy of the repository and you will have to synchronize your
local copy with the remote GitLab one. To propagate your
modifications, you will obviously have to authenticate yourself on
GitLab. This document describes the software you need to have
installed on your machine and how to handle authentification. Please
read these instructions carefully.
</p>
<div id="outline-container-org65282e3" class="outline-2">
<h2 id="org65282e3">Installing Git</h2>
<div class="outline-text-2" id="text-org65282e3">
</div>
<div id="outline-container-orgfbf6964" class="outline-3">
<h3 id="orgfbf6964">Linux (debian, ubuntu)</h3>
<div class="outline-text-3" id="text-orgfbf6964">
<p>
We provide here only instructions for debian-based distributions. Feel
free to contribute to this document to provide up-to-date information
for other distributions (e.g., redhat, fedora).
</p>
<p>
Run (as root):
</p>
<div class="org-src-container">
<pre style="padding-left: 30px; background-color: #f6f8fa;" class="src src-sh">apt-get update ; apt-get install git
</pre>
</div>
</div>
</div>
<div id="outline-container-orgb9333af" class="outline-3">
<h3 id="orgb9333af">Mac OSX and Windows</h3>
<div class="outline-text-3" id="text-orgb9333af">
<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;">Optional Git clients (should not be needed if you work within
Rstudio):
<ul class="org-ul">
<li style="margin-bottom:0;"><a href="https://www.sourcetreeapp.com/">SourceTree</a></li>
<li style="margin-bottom:0;"><p>
<a href="https://desktop.github.com/">GitHub Desktop</a>
</p>
<blockquote>
<p>
<a href="https://github.com/desktop/desktop/issues/852">Apparently</a>, this works with GitLab and https.
</p>
</blockquote></li>
</ul></li>
</ul>
</div>
</div>
</div>
<div id="outline-container-orgc0ecb74" class="outline-2">
<h2 id="orgc0ecb74">Authenticating on GitLab</h2>
<div class="outline-text-2" id="text-orgc0ecb74">
<p>
There are two ways of authenticating and synchronizing your local
repository with GitLab: through HTTPS or through SSH. The first one
does not require any particular software installation on your machine
so this is what I recommend for this MOOC. Yet, I also describe the
second one as it is the one I prefer (once it is well configured, it
never asks me for any password anymore and I don't have to remember
anything).
</p>
</div>
<div id="outline-container-org368a2a9" class="outline-3">
<h3 id="org368a2a9">Option 1: HTTPS</h3>
<div class="outline-text-3" id="text-org368a2a9">
</div>
<div id="outline-container-orgadea060" class="outline-4">
<h4 id="orgadea060">Configuring your GitLab password</h4>
<div class="outline-text-4" id="text-orgadea060">
<p>
In this video, I explain how to change your password on our GitLab.
</p>
<div class="org-center">
<p>
Youtube Video
</p>
</div>
</div>
</div>
<div id="outline-container-orgd0479e2" class="outline-4">
<h4 id="orgd0479e2">Making sure git remembers your password</h4>
<div class="outline-text-4" id="text-orgd0479e2">
<p>
My GitLab id is <code>3211ac4f2fb71deaeff9252764c368e7</code>. Say I've configured
my password to be <code>tototutu</code> (what a weak password&#x2026;) and I want to
clone my <code>mooc-rr</code> repository. If you clone your repos by simply pasting
the GitLab url (e.g., with the following command line) you will be
prompted for your login and your password every time you want to
propagate your local modifications.
</p>
<div class="org-src-container">
<pre style="padding-left: 30px; background-color: #f6f8fa;" class="src src-shell">git clone https://app-learninglab.inria.fr/gitlab/3211ac4f2fb71deaeff9252764c368e7/mooc-rr
</pre>
</div>
<p>
This can be quite painful, which is why you can also provide them once
and for all when cloning, as follows:
</p>
<div class="org-src-container">
<pre style="padding-left: 30px; background-color: #f6f8fa;" class="src src-shell">git clone https://3211ac4f2fb71deaeff9252764c368e7:tototutu@app-learninglab.inria.fr/gitlab/3211ac4f2fb71deaeff9252764c368e7/mooc-rr
</pre>
</div>
<p>
This is very convenient but there is one drawback to understand. This
means your password is stored, unencrypted on your hard drive. If
anyone ever gets an access to your machine, he will gain access rights
to all your repos, which can be problematic. This is why the really
good way to do this is to follow <a href="https://stackoverflow.com/questions/5343068/is-there-a-way-to-skip-password-typing-when-using-https-on-github">these instructions</a>:
</p>
<div class="org-src-container">
<pre style="padding-left: 30px; background-color: #f6f8fa;" class="src src-shell">git config --global credential.helper cache <span style="font-weight: bold; font-style: italic;"># </span><span style="font-weight: bold; font-style: italic;">remember my password</span>
git config --global credential.helper <span style="font-style: italic;">"cache --timeout=3600"</span> <span style="font-weight: bold; font-style: italic;"># </span><span style="font-weight: bold; font-style: italic;">for one hour at most</span>
</pre>
</div>
<p>
With this setup, you will be prompted for your password but it will be
cached in memory and they will not be asked again before an hour.
</p>
</div>
</div>
</div>
<div id="outline-container-org572d681" class="outline-3">
<h3 id="org572d681">Option 2: SSH</h3>
<div class="outline-text-3" id="text-org572d681">
<p>
My prefered (although more technical) solution is to install SSH, to
create a pair or private/public keys, and to upload your SSH public
key on GitLab. This section provides with information on how to do
this.
</p>
</div>
<div id="outline-container-orge91383b" class="outline-4">
<h4 id="orge91383b">Installing SSH</h4>
<div class="outline-text-4" id="text-orge91383b">
</div>
<ul class="org-ul">
<li style="margin-bottom:0;"><a id="orgebe8852"></a>Linux (debian, ubuntu)<br />
<div class="outline-text-5" id="text-orgebe8852">
<p>
We provide here only instructions for debian-based distributions. Feel
free to contribute to this document to provide up-to-date information
for other distributions (e.g., redhat, fedora).
</p>
<p>
Run (as root):
</p>
<div class="org-src-container">
<pre style="padding-left: 30px; background-color: #f6f8fa;" class="src src-sh">apt-get update ; apt-get install openssh-client
</pre>
</div>
</div>
</li>
<li style="margin-bottom:0;"><a id="orgd6eebe7"></a>Mac OSX<br />
<div class="outline-text-5" id="text-orgd6eebe7">
<p>
You do not have anything to do as it is installed by default.
</p>
</div>
</li>
<li style="margin-bottom:0;"><a id="orgf3737c4"></a>Windows<br />
<div class="outline-text-5" id="text-orgf3737c4">
<p>
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>.
</p>
</div>
</li>
</ul>
</div>
<div id="outline-container-org0dfb09b" class="outline-4">
<h4 id="org0dfb09b">Setting up SSH on Framagit</h4>
<div class="outline-text-4" id="text-org0dfb09b">
<p>
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
video:
</p>
<iframe width="560" height="315" src="https://www.youtube.com/embed/54mxyLo3Mqk" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
</div>
</div>
</div>
</div>
</div>
......@@ -4,34 +4,34 @@
<h2>Table of Contents</h2>
<div id="text-table-of-contents">
<ul style="margin:0 0;">
<li style="margin-bottom:0;"><a href="#org8ad7af5">Additional Jupyter resources or tricks</a>
<li style="margin-bottom:0;"><a href="#orgf3b7782">Additional Jupyter resources or tricks</a>
<ul style="margin:0 0;">
<li style="margin-bottom:0;"><a href="#org22d89f4">Tips and tricks</a></li>
<li style="margin-bottom:0;"><a href="#org0420686">Running R and Python in the same notebook</a></li>
<li style="margin-bottom:0;"><a href="#org468b24f">Exporting a notebook</a></li>
<li style="margin-bottom:0;"><a href="#orgfb5fa97">Tips and tricks</a></li>
<li style="margin-bottom:0;"><a href="#org38d49d6">Running R and Python in the same notebook</a></li>
<li style="margin-bottom:0;"><a href="#org1344be3">Exporting a notebook</a></li>
</ul>
</li>
<li style="margin-bottom:0;"><a href="#org2c7ad73">Installing Jupyter on your own machine</a>
<li style="margin-bottom:0;"><a href="#org98dba69">Installing Jupyter on your own machine</a>
<ul style="margin:0 0;">
<li style="margin-bottom:0;"><a href="#orgb4b3874">Installing jupyter</a></li>
<li style="margin-bottom:0;"><a href="#orgf5ae3b1">Using R</a></li>
<li style="margin-bottom:0;"><a href="#orgf90bf40">Exporting your notebooks with latex</a></li>
<li style="margin-bottom:0;"><a href="#org77f31cb">Interacting with gitlab</a></li>
<li style="margin-bottom:0;"><a href="#org0c2d49c">Interesting extensions to improve notebook readability</a></li>
<li style="margin-bottom:0;"><a href="#orgded5168">Installing jupyter</a></li>
<li style="margin-bottom:0;"><a href="#orga71105f">Using R</a></li>
<li style="margin-bottom:0;"><a href="#org2babeac">Exporting your notebooks with latex</a></li>
<li style="margin-bottom:0;"><a href="#org5699094">Interacting with gitlab</a></li>
<li style="margin-bottom:0;"><a href="#org20763cb">Interesting extensions to improve notebook readability</a></li>
</ul>
</li>
<li style="margin-bottom:0;"><a href="#orgacebcf9">Installing JupyterHub&#xa0;&#xa0;&#xa0;<span class="tag"><span class="Benoit">Benoit</span></span></a></li>
<li style="margin-bottom:0;"><a href="#org1e7464c">Installing JupyterHub&#xa0;&#xa0;&#xa0;<span class="tag"><span class="Benoit">Benoit</span></span></a></li>
</ul>
</div>
</div>
<div id="outline-container-org8ad7af5" class="outline-2">
<h2 id="org8ad7af5">Additional Jupyter resources or tricks</h2>
<div class="outline-text-2" id="text-org8ad7af5">
<div id="outline-container-orgf3b7782" class="outline-2">
<h2 id="orgf3b7782">Additional Jupyter resources or tricks</h2>
<div class="outline-text-2" id="text-orgf3b7782">
</div>
<div id="outline-container-org22d89f4" class="outline-3">
<h3 id="org22d89f4">Tips and tricks</h3>
<div class="outline-text-3" id="text-org22d89f4">
<div id="outline-container-orgfb5fa97" class="outline-3">
<h3 id="orgfb5fa97">Tips and tricks</h3>
<div class="outline-text-3" id="text-orgfb5fa97">
<p>
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
......@@ -41,17 +41,23 @@ now).
</p>
</div>
</div>
<div id="outline-container-org0420686" class="outline-3">
<h3 id="org0420686">Running R and Python in the same notebook</h3>
<div class="outline-text-3" id="text-org0420686">
<div id="outline-container-org38d49d6" class="outline-3">
<h3 id="org38d49d6">Running R and Python in the same notebook</h3>
<div class="outline-text-3" id="text-org38d49d6">
<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>. An
other alternative consists in going through the python package manager
with
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-python">pip install rpy2
<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 recommanded) 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>
......@@ -85,9 +91,9 @@ plot(df)
</ol>
</div>
</div>
<div id="outline-container-org468b24f" class="outline-3">
<h3 id="org468b24f">Exporting a notebook</h3>
<div class="outline-text-3" id="text-org468b24f">
<div id="outline-container-org1344be3" class="outline-3">
<h3 id="org1344be3">Exporting a notebook</h3>
<div class="outline-text-3" id="text-org1344be3">
<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
......@@ -114,13 +120,13 @@ taste.
</div>
</div>
</div>
<div id="outline-container-org2c7ad73" class="outline-2">
<h2 id="org2c7ad73">Installing Jupyter on your own machine</h2>
<div class="outline-text-2" id="text-org2c7ad73">
<div id="outline-container-org98dba69" class="outline-2">
<h2 id="org98dba69">Installing Jupyter on your own machine</h2>
<div class="outline-text-2" id="text-org98dba69">
</div>
<div id="outline-container-orgb4b3874" class="outline-3">
<h3 id="orgb4b3874">Installing jupyter</h3>
<div class="outline-text-3" id="text-orgb4b3874">
<div id="outline-container-orgded5168" class="outline-3">
<h3 id="orgded5168">Installing jupyter</h3>
<div class="outline-text-3" id="text-orgded5168">
<p>
Here is what you should install:
</p>
......@@ -151,15 +157,15 @@ The ipython notebook can then be run with the following command:
</div>
</div>
</div>
<div id="outline-container-orgf5ae3b1" class="outline-3">
<h3 id="orgf5ae3b1">Using R</h3>
<div class="outline-text-3" id="text-orgf5ae3b1">
<div id="outline-container-orga71105f" class="outline-3">
<h3 id="orga71105f">Using R</h3>
<div class="outline-text-3" id="text-orga71105f">
<p>
If you want to use the R kernel in jupyter, follow <a href="https://github.com/IRkernel/IRkernel#installation">these instructions</a>.
</p>
<p>
Alternatively, you can install <code>rpy2</code> (see the <a href="#org0420686">Running R and Python in
Alternatively, you can install <code>rpy2</code> (see the <a href="#org38d49d6">Running R and Python in
the same notebook</a> section).
</p>
<div class="org-src-container">
......@@ -168,9 +174,9 @@ the same notebook</a> section).
</div>
</div>
</div>
<div id="outline-container-orgf90bf40" class="outline-3">
<h3 id="orgf90bf40">Exporting your notebooks with latex</h3>
<div class="outline-text-3" id="text-orgf90bf40">
<div id="outline-container-org2babeac" class="outline-3">
<h3 id="org2babeac">Exporting your notebooks with latex</h3>
<div class="outline-text-3" id="text-org2babeac">
<p>
Here is what I had to install on my recent debian machine to make sure
the notebook export via latex works:
......@@ -182,9 +188,9 @@ sudo apt-get install texlive-xetex
</div>
</div>
</div>
<div id="outline-container-org77f31cb" class="outline-3">
<h3 id="org77f31cb">Interacting with gitlab</h3>
<div class="outline-text-3" id="text-org77f31cb">
<div id="outline-container-org5699094" class="outline-3">
<h3 id="org5699094">Interacting with gitlab</h3>
<div class="outline-text-3" id="text-org5699094">
<p>
Here is our <a href="https://github.com/brospars/nb-git">jupyter extension that allows to git push/pull from the
notebooks</a>:
......@@ -196,9 +202,9 @@ jupyter nbextension enable nb-git
</div>
</div>
</div>
<div id="outline-container-org0c2d49c" class="outline-3">
<h3 id="org0c2d49c">Interesting extensions to improve notebook readability</h3>
<div class="outline-text-3" id="text-org0c2d49c">
<div id="outline-container-org20763cb" class="outline-3">
<h3 id="org20763cb">Interesting extensions to improve notebook readability</h3>
<div class="outline-text-3" id="text-org20763cb">
<p>
Here are two interesting extensions that can improve readability:
</p>
......@@ -225,9 +231,9 @@ jupyter-serverextension enable --py hide_code
</div>
</div>
</div>
<div id="outline-container-orgacebcf9" class="outline-2">
<h2 id="orgacebcf9">Installing JupyterHub&#xa0;&#xa0;&#xa0;<span class="tag"><span class="Benoit">Benoit</span></span></h2>
<div class="outline-text-2" id="text-orgacebcf9">
<div id="outline-container-org1e7464c" class="outline-2">
<h2 id="org1e7464c">Installing JupyterHub&#xa0;&#xa0;&#xa0;<span class="tag"><span class="Benoit">Benoit</span></span></h2>
<div class="outline-text-2" id="text-org1e7464c">
<blockquote>
<p>
Benoit may give a few hints on this.
......
......@@ -4,33 +4,15 @@
<h2>Table of Contents</h2>
<div id="text-table-of-contents">
<ul style="margin:0 0;">
<li style="margin-bottom:0;"><a href="#org6a08c55">Installing Rstudio</a>
<li style="margin-bottom:0;"><a href="#org996bb6e">Installing Rstudio</a>
<ul style="margin:0 0;">
<li style="margin-bottom:0;"><a href="#org2204883">Linux (debian, ubuntu)</a>
<li style="margin-bottom:0;"><a href="#org47dc640">Linux (debian, ubuntu)</a>
<ul style="margin:0 0;">
<li style="margin-bottom:0;"><a href="#org9e7e4df">Installing R</a></li>
<li style="margin-bottom:0;"><a href="#orge261910">Installing rstudio</a></li>
<li style="margin-bottom:0;"><a href="#org5b5cfe0">Installing R</a></li>
<li style="margin-bottom:0;"><a href="#orgfebba3b">Installing rstudio</a></li>
</ul>
</li>
<li style="margin-bottom:0;"><a href="#org0f1374d">Mac OSX and Windows</a></li>
</ul>
</li>
<li style="margin-bottom:0;"><a href="#orgd743f10">Installing Git</a>
<ul style="margin:0 0;">
<li style="margin-bottom:0;"><a href="#org194d7d9">Linux (debian, ubuntu)</a></li>
<li style="margin-bottom:0;"><a href="#orga033592">Mac OSX and Windows</a></li>
</ul>
</li>
<li style="margin-bottom:0;"><a href="#org3890548">Setting up SSH</a>
<ul style="margin:0 0;">
<li style="margin-bottom:0;"><a href="#org8fce29e">Installation</a>
<ul style="margin:0 0;">
<li style="margin-bottom:0;"><a href="#org24a337f">Linux (debian, ubuntu)</a></li>
<li style="margin-bottom:0;"><a href="#orgd8eb69c">Mac OSX</a></li>
<li style="margin-bottom:0;"><a href="#org02c1827">Windows</a></li>
</ul>
</li>
<li style="margin-bottom:0;"><a href="#orgfaac61e">Setting up SSH on Framagit</a></li>
<li style="margin-bottom:0;"><a href="#org697af62">Mac OSX and Windows</a></li>
</ul>
</li>
</ul>
......@@ -45,9 +27,8 @@ may want to watch this video:
<iframe width="854" height="480" src="https://www.youtube.com/embed/uHYcDQDbMY8" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
<p>
The next sections provide information on how to install Rstudio, Git
(to interact with GitLab), and SSH (to avoid typing your password
every time you synchronize with GitLab).
The next sections provide information on how to install Rstudio. Before
proceeding, make sure you have read the "Git and GitLab" instructions.
</p>
<p>
......@@ -58,7 +39,7 @@ on:
</p>
<ul class="org-ul">
<li style="margin-bottom:0;"><a href="https://github.com/rstudio/cheatsheets/raw/master/rstudio-ide.pdf">The Rstudio IDE</a>,</li>
<li style="margin-bottom:0;"><a href="https://github.com/rstudio/cheatsheets/raw/master/rmarkdown-2.0.pdf">R Markdown</a>,</li>
<li style="margin-bottom:0;"><a href="https://github.com/rstudio/cheatsheets/raw/master/rmarkdown-2.0.pdf">R Markdown</a> (here is also a <a href="https://rmarkdown.rstudio.com/">nice step-by-step presentation of Rmarkdown</a>),</li>
<li style="margin-bottom:0;">The <a href="https://www.rstudio.com/wp-content/uploads/2015/03/rmarkdown-reference.pdf">R Markdown Reference guide</a>,</li>
<li style="margin-bottom:0;"><a href="https://github.com/rstudio/cheatsheets/raw/master/data-visualization-2.1.pdf">Data visualization with ggplot2</a>,</li>
<li style="margin-bottom:0;"><a href="https://github.com/rstudio/cheatsheets/raw/master/data-transformation.pdf">Data transformation with dplyr</a></li>
......@@ -75,13 +56,13 @@ of these documents:
<li style="margin-bottom:0;"><a href="https://www.fun-mooc.fr/c4x/UPSUD/42001S02/asset/RMarkdown.pdf">Un court document sur R Markdown</a></li>
</ul>
<div id="outline-container-org6a08c55" class="outline-2">
<h2 id="org6a08c55">Installing Rstudio</h2>
<div class="outline-text-2" id="text-org6a08c55">
<div id="outline-container-org996bb6e" class="outline-2">
<h2 id="org996bb6e">Installing Rstudio</h2>
<div class="outline-text-2" id="text-org996bb6e">
</div>
<div id="outline-container-org2204883" class="outline-3">
<h3 id="org2204883">Linux (debian, ubuntu)</h3>
<div class="outline-text-3" id="text-org2204883">
<div id="outline-container-org47dc640" class="outline-3">
<h3 id="org47dc640">Linux (debian, ubuntu)</h3>
<div class="outline-text-3" id="text-org47dc640">
<p>
We provide here only instructions for debian-based distributions. Feel
free to contribute to this document to provide up-to-date information
......@@ -103,9 +84,9 @@ for upgrading&#x2026;
</p>
</div>
<div id="outline-container-org9e7e4df" class="outline-4">
<h4 id="org9e7e4df">Installing R</h4>
<div class="outline-text-4" id="text-org9e7e4df">
<div id="outline-container-org5b5cfe0" class="outline-4">
<h4 id="org5b5cfe0">Installing R</h4>
<div class="outline-text-4" id="text-org5b5cfe0">
<p>
Beforehand, you need to install the R language and convenient packages
by running (as root):
......@@ -138,9 +119,9 @@ to run (as root):
</div>
</div>
<div id="outline-container-orge261910" class="outline-4">
<h4 id="orge261910">Installing rstudio</h4>
<div class="outline-text-4" id="text-orge261910">
<div id="outline-container-orgfebba3b" class="outline-4">
<h4 id="orgfebba3b">Installing rstudio</h4>
<div class="outline-text-4" id="text-orgfebba3b">
<p>
Rstudio is unfortunately not packaged within debian so the easiest is
to download the corresponding debian package on the <a href="https://www.rstudio.com/products/rstudio/download/#download">Rstudio webpage</a>
......@@ -158,9 +139,9 @@ sudo apt-get update ; sudo apt-get -f install <span style="font-weight: bold; fo
</div>
</div>
</div>
<div id="outline-container-org0f1374d" class="outline-3">
<h3 id="org0f1374d">Mac OSX and Windows</h3>
<div class="outline-text-3" id="text-org0f1374d">
<div id="outline-container-org697af62" class="outline-3">
<h3 id="org697af62">Mac OSX and Windows</h3>
<div class="outline-text-3" id="text-org697af62">
<blockquote>
<p>
Some instructions on installing R and knitr must be missing. This
......@@ -184,113 +165,4 @@ install.packages(<span style="font-style: italic;">"ggplot2"</span>)
</div>
</div>
</div>
<div id="outline-container-orgd743f10" class="outline-2">
<h2 id="orgd743f10">Installing Git</h2>
<div class="outline-text-2" id="text-orgd743f10">
</div>
<div id="outline-container-org194d7d9" class="outline-3">
<h3 id="org194d7d9">Linux (debian, ubuntu)</h3>
<div class="outline-text-3" id="text-org194d7d9">
<p>
We provide here only instructions for debian-based distributions. Feel
free to contribute to this document to provide up-to-date information
for other distributions (e.g., redhat, fedora).
</p>
<p>
Run (as root):
</p>
<div class="org-src-container">
<pre style="padding-left: 30px; background-color: #f6f8fa;" class="src src-sh">apt-get update ; apt-get install git
</pre>
</div>
</div>
</div>
<div id="outline-container-orga033592" class="outline-3">
<h3 id="orga033592">Mac OSX and Windows</h3>
<div class="outline-text-3" id="text-orga033592">
<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;">Optional Git clients (should not be needed if you work within
Rstudio):
<ul class="org-ul">
<li style="margin-bottom:0;"><a href="https://www.sourcetreeapp.com/">SourceTree</a></li>
<li style="margin-bottom:0;"><p>
<a href="https://desktop.github.com/">GitHub Desktop</a>
</p>
<blockquote>
<p>
<a href="https://github.com/desktop/desktop/issues/852">Apparently</a>, this works with GitLab and https.
</p>
</blockquote></li>
</ul></li>
</ul>
</div>
</div>
</div>
<div id="outline-container-org3890548" class="outline-2">
<h2 id="org3890548">Setting up SSH</h2>
<div class="outline-text-2" id="text-org3890548">
<p>
There are two ways of synchronizing your local repository with GitLab:
through HTTPS or through SSH. The first one does not require any
particular configuration but you will be regularly prompted for your
GitLab password, which can be quite tedious. To avoid this, the best
solution is to set install SSH, to create a pair or private/public
keys, and to upload your SSH public key on GitLab. This section
provides with information on how to do this.
</p>
</div>
<div id="outline-container-org8fce29e" class="outline-3">
<h3 id="org8fce29e">Installation</h3>
<div class="outline-text-3" id="text-org8fce29e">
</div>
<div id="outline-container-org24a337f" class="outline-4">
<h4 id="org24a337f">Linux (debian, ubuntu)</h4>
<div class="outline-text-4" id="text-org24a337f">
<p>
We provide here only instructions for debian-based distributions. Feel
free to contribute to this document to provide up-to-date information
for other distributions (e.g., redhat, fedora).
</p>
<p>
Run (as root):
</p>
<div class="org-src-container">
<pre style="padding-left: 30px; background-color: #f6f8fa;" class="src src-sh">apt-get update ; apt-get install openssh-client
</pre>
</div>
</div>
</div>
<div id="outline-container-orgd8eb69c" class="outline-4">
<h4 id="orgd8eb69c">Mac OSX</h4>
<div class="outline-text-4" id="text-orgd8eb69c">
<p>
You do not have anything to do as it is installed by default.
</p>
</div>
</div>
<div id="outline-container-org02c1827" class="outline-4">
<h4 id="org02c1827">Windows</h4>
<div class="outline-text-4" id="text-org02c1827">
<p>
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>.
</p>
</div>
</div>
</div>
<div id="outline-container-orgfaac61e" class="outline-3">
<h3 id="orgfaac61e">Setting up SSH on Framagit</h3>
<div class="outline-text-3" id="text-orgfaac61e">
<p>
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
video:
</p>
<iframe width="560" height="315" src="https://www.youtube.com/embed/54mxyLo3Mqk" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
</div>
</div>
</div>
</div>
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