diff --git a/module2/ressources/emacs_orgmode.html b/module2/ressources/emacs_orgmode.html index 3e7b3fc4539f573468af21f80156fa7a35d8b0e6..3c0fb6424189dc9eb74e4044082e510548dad97a 100644 --- a/module2/ressources/emacs_orgmode.html +++ b/module2/ressources/emacs_orgmode.html @@ -4,43 +4,43 @@

Table of Contents

@@ -53,17 +53,22 @@ set up org-mode for this MOOC. You really should follow them carefully or you may have trouble doing the exercices later on.

-
-

Installing emacs, org-mode, ess, and auctex.

-
+

+The next sections provide information on how to install emacs. Before +proceeding, make sure you have read the "Git and GitLab" instructions. +

+ +
+

Installing emacs, org-mode, ess, and auctex.

+
-
-

OS-specific installation procedure

-
+
+

OS-specific installation procedure

+
-
-

Linux (Debian, Ubuntu)

-
+
+

Linux (Debian, Ubuntu)

+

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.

-
-

Mac OS X

-
+
+

Mac OS X

+
  • Option 1: Install the .dmg file from Vincent Goulet: @@ -160,9 +165,9 @@ brew install wget

-
-

Windows

-
+
+

Windows

+

Install the .exe file from Vincent Goulet: https://vigou3.github.io/emacs-modified-windows/. It ships with recent @@ -176,9 +181,9 @@ versions:

-
-

TODO A simple "reproducible research" emacs configuration

-
+
+

TODO A simple "reproducible research" emacs configuration

+

There will be a mini video illustrating these steps at some point @@ -197,9 +202,9 @@ adding a few org-mode specific configurations.

-
-

Step 0: Backup and download our configuration

-
+
+

Step 0: Backup and download our configuration

+

The procedure we propose will wipe your already existing custom emacs configuration if you already have one. You should thus beforehand make @@ -220,9 +225,9 @@ rr_org/journal.org

-
-

Step 1: Prepare your journal

-
+
+

Step 1: Prepare your journal

+

Create an org/ directory in the top of your home:

@@ -239,9 +244,9 @@ should give a try.

-
-

Step 2: Set up Emacs configuration

-
+
+

Step 2: Set up Emacs configuration

+

Copy rr_org/init.el in your ~/.emacs.d/ directory.

@@ -253,9 +258,9 @@ configuration with the following command: emacs -q -l rr_org/init.el
-
-

Step 3: Check whether the installation is working or not

-
+
+

Step 3: Check whether the installation is working or not

+

Open a new instance of Emacs and open a foo.org file. Copy the following lines in this file: @@ -286,9 +291,9 @@ is demonstrated in the -

Step 4: Open and play with your journal:

-
+
+

Step 4: Open and play with your journal:

+

In step 1, you were told to create an journal in ~org/journal.org. First you probably want to make sure this file is @@ -299,9 +304,9 @@ forums.

-
-

TODO A stub of replicable article

-
+
+

TODO A stub of replicable article

+

There will be a mini video illustrating these steps at some point @@ -368,22 +373,22 @@ chunk of code when exporting.

-
-

Emacs Tips and tricks

-
+
+

Emacs Tips and tricks

+
-
-

Cheat-sheets

-
+
+

Cheat-sheets

+

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:

-
-

Emacs

-
+ -
-

Org-mode

-
+
+

Org-mode

+
-
-

Video tutorials

-
+
+

Video tutorials

+

For those of you who prefer video explanations, here is a Youtube channel with many step by step emacs tutorials.

-
-

Additional useful emacs packages

-
+
+

Additional useful emacs packages

+
-
-

Company-mode

-
+
+

Company-mode

+

Company-mode 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: http://company-mode.g

-
-

Magit

-
+
+

Magit

+

Magit 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:

-
-

Other resources

-
+
+

Other resources

+
  • The compact Org-mode Guide
  • Many examples illustrating the use of different languages in org-mode
  • diff --git a/module2/ressources/gitlab.html b/module2/ressources/gitlab.html new file mode 100644 index 0000000000000000000000000000000000000000..4d05a983bb72cbba194ff036893c94640864fdf6 --- /dev/null +++ b/module2/ressources/gitlab.html @@ -0,0 +1,233 @@ +
    +

    Git and GitLab

    + +

    +So far, you only used git via the web interface from the GitLab we +deployed for the MOOC. +

    + + + +

    +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. +

    + +
    +

    Installing Git

    +
    +
    +
    +

    Linux (debian, ubuntu)

    +
    +

    +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). +

    + +

    +Run (as root): +

    +
    +
    apt-get update ; apt-get install git
    +
    +
    +
    +
    +
    +

    Mac OSX and Windows

    +
    + +
    +
    +
    +
    +

    Authenticating on GitLab

    +
    +

    +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). +

    +
    +
    +

    Option 1: HTTPS

    +
    +
    +
    +

    Configuring your GitLab password

    +
    +

    +In this video, I explain how to change your password on our GitLab. +

    +
    +

    +Youtube Video +

    +
    +
    +
    +
    +

    Making sure git remembers your password

    +
    +

    +My GitLab id is 3211ac4f2fb71deaeff9252764c368e7. Say I've configured +my password to be tototutu (what a weak password…) and I want to +clone my mooc-rr 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. +

    +
    +
    git clone https://app-learninglab.inria.fr/gitlab/3211ac4f2fb71deaeff9252764c368e7/mooc-rr
    +
    +
    +

    +This can be quite painful, which is why you can also provide them once +and for all when cloning, as follows: +

    +
    +
    git clone https://3211ac4f2fb71deaeff9252764c368e7:tototutu@app-learninglab.inria.fr/gitlab/3211ac4f2fb71deaeff9252764c368e7/mooc-rr
    +
    +
    +

    +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 these instructions: +

    +
    +
    git config --global credential.helper cache                  # remember my password
    +git config --global credential.helper "cache --timeout=3600" # for one hour at most
    +
    +
    +

    +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. +

    +
    +
    +
    +
    +

    Option 2: SSH

    +
    +

    +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. +

    +
    +
    +

    Installing SSH

    +
    +
    +
      +
    • Linux (debian, ubuntu)
      +
      +

      +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). +

      + +

      +Run (as root): +

      +
      +
      apt-get update ; apt-get install openssh-client
      +
      +
      +
      +
    • +
    • Mac OSX
      +
      +

      +You do not have anything to do as it is installed by default. +

      +
      +
    • +
    • Windows
      +
      +

      +You should install the Putty client. Once it is installed, look for +the section on generating an SSH key. +

      +
      +
    • +
    +
    +
    +

    Setting up SSH on Framagit

    +
    +

    +Here are all the official explanations on how to set up your SSH key +on GitLab. Alternatively, you may also want to have a look at this +video: +

    + +
    +
    +
    +
    +
    diff --git a/module2/ressources/jupyter.html b/module2/ressources/jupyter.html index b47162eb26e37e3d60243e88a5fb5a0ef53e2242..17bbf92dc51bfed31c604172eb4c252038745051 100644 --- a/module2/ressources/jupyter.html +++ b/module2/ressources/jupyter.html @@ -4,34 +4,34 @@

    Table of Contents

-
-

Additional Jupyter resources or tricks

-
+
+

Additional Jupyter resources or tricks

+
-
-

Tips and tricks

-
+
+

Tips and tricks

+

The following webpage lists several Jupyter tricks (in particular, it illustrates many Ipython magic commands) that should improve your @@ -41,17 +41,23 @@ now).

-
-

Running R and Python in the same notebook

-
+
+

Running R and Python in the same notebook

+

The best solution to this is to install rpy2. On my machine, I have -installed the python3-rpy2 debian package with apt-get install. An -other alternative consists in going through the python package manager -with +installed the python3-rpy2 debian package with apt-get install. E.g.,

-
pip install rpy2
+
sudo apt-get install python3-rpy2 python3-tzlocal
+
+
+

+An other (not really recommanded) alternative consists in going +through the python package manager with +

+
+
pip3 install rpy2
 

@@ -85,9 +91,9 @@ plot(df)

-
-

Exporting a notebook

-
+
+

Exporting a notebook

+

Obviously, you can convert to html or pdf using the using the File > Download as > HTML (or PDF) menu option. This can also be done from @@ -114,13 +120,13 @@ taste.

-
-

Installing Jupyter on your own machine

-
+
+

Installing Jupyter on your own machine

+
-
-

Installing jupyter

-
+
+

Installing jupyter

+

Here is what you should install:

@@ -151,15 +157,15 @@ The ipython notebook can then be run with the following command:
-
-

Using R

-
+
+

Using R

+

If you want to use the R kernel in jupyter, follow these instructions.

-Alternatively, you can install rpy2 (see the Running R and Python in +Alternatively, you can install rpy2 (see the Running R and Python in the same notebook section).

@@ -168,9 +174,9 @@ the same notebook section).
-
-

Exporting your notebooks with latex

-
+
+

Exporting your notebooks with latex

+

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

-
-

Interacting with gitlab

-
+
+

Interacting with gitlab

+

Here is our jupyter extension that allows to git push/pull from the notebooks: @@ -196,9 +202,9 @@ jupyter nbextension enable nb-git

-
-

Interesting extensions to improve notebook readability

-
+
+

Interesting extensions to improve notebook readability

+

Here are two interesting extensions that can improve readability:

@@ -225,9 +231,9 @@ jupyter-serverextension enable --py hide_code
-
-

Installing JupyterHub   Benoit

-
+
+

Installing JupyterHub   Benoit

+

Benoit may give a few hints on this. diff --git a/module2/ressources/rstudio.html b/module2/ressources/rstudio.html index 5dc3d80cb032613a9c3c7215c744f12767b45148..618c52842e227cc57c12eb5895f63b6bf39d7a26 100644 --- a/module2/ressources/rstudio.html +++ b/module2/ressources/rstudio.html @@ -4,33 +4,15 @@

Table of Contents

@@ -45,9 +27,8 @@ may want to watch this video:

-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.

@@ -58,7 +39,7 @@ on:

-
-

Installing Rstudio

-
+
+

Installing Rstudio

+
-
-

Linux (debian, ubuntu)

-
+
+

Linux (debian, ubuntu)

+

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…

-
-

Installing R

-
+
+

Installing R

+

Beforehand, you need to install the R language and convenient packages by running (as root): @@ -138,9 +119,9 @@ to run (as root):

-
-

Installing rstudio

-
+
+

Installing rstudio

+

Rstudio is unfortunately not packaged within debian so the easiest is to download the corresponding debian package on the Rstudio webpage @@ -158,9 +139,9 @@ sudo apt-get update ; sudo apt-get -f install -

Mac OSX and Windows

-
+
+

Mac OSX and Windows

+

Some instructions on installing R and knitr must be missing. This @@ -184,113 +165,4 @@ install.packages("ggplot2")

-
-

Installing Git

-
-
-
-

Linux (debian, ubuntu)

-
-

-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). -

- -

-Run (as root): -

-
-
apt-get update ; apt-get install git
-
-
-
-
-
-

Mac OSX and Windows

-
- -
-
-
-
-

Setting up SSH

-
-

-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. -

-
-
-

Installation

-
-
-
-

Linux (debian, ubuntu)

-
-

-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). -

- -

-Run (as root): -

-
-
apt-get update ; apt-get install openssh-client
-
-
-
-
-
-

Mac OSX

-
-

-You do not have anything to do as it is installed by default. -

-
-
-
-

Windows

-
-

-You should install the Putty client. Once it is installed, look for -the section on generating an SSH key. -

-
-
-
-
-

Setting up SSH on Framagit

-
-

-Here are all the official explanations on how to set up your SSH key -on GitLab. Alternatively, you may also want to have a look at this -video: -

- -
-
-