Commit 078e28cc authored by Arnaud Legrand's avatar Arnaud Legrand

Automatically generated markdown documents

parent 8293ca08
---
TITLE: Emacs/org-mode
Date: Tue Feb 19 19:19:03 2019
Date: Wed Mar 13 15:12:03 2019
---
**Disclaimer:** The two sections *A simple "reproducible research" emacs configuration* and *A stub of replicable article* explain how to set up emacs/org-mode for this MOOC. These are very important sections in the context of this MOOC. **These sections are illustrated in two out of the [three video tutorials of this sequence](https://www.fun-mooc.fr/courses/course-v1:inria+41016+session02/jump_to_id/9cfc7500f0ef46d288d2317ec7b037b4), and** **which you really should follow carefully**. **Otherwise, you may have trouble doing the exercises later on**. Likewise, I strongly encourage you to watch the ["emacs and git" video tutorial available at the same place](https://www.fun-mooc.fr/courses/course-v1:inria+41016+session02/jump_to_id/9cfc7500f0ef46d288d2317ec7b037b4).
......@@ -29,15 +29,26 @@ Table of Contents<span class="tag" data-tag-name="TOC"></span>
- [Additional useful emacs packages](#additional-useful-emacs-packages)
- [Other resources](#other-resources)
Installing emacs, org-mode, ess, and auctex.
============================================
Installing Emacs
================
In the following we describe for each platform the installation method that we consider most convenient. There are other options that may be preferable in particular situations, so you may want to look at the [Emacs Web site](https://www.gnu.org/software/emacs/download.html) for details, but we strongly suggest you first try the method we recommend.
At the end of the installation procedure, you should have one of
1. Emacs 26 (the latest version)
2. Emacs 25 plus Org-Mode 9
Emacs 25 comes with Org-Mode 8, which is not compatible with our examples. So if you use Emacs 25, you must separately install Org-Mode 9. Emacs 26 already includes Org-Mode 9.
Our MOOC also requires a few extra Emacs packages: [ESS](https://ess.r-project.org/) (for working with the R language) and [AUCTeX](https://www.gnu.org/software/auctex/) (for editing LaTeX). They will be installed automatically the first time you start Emacs if you use the configuration described under [A simple "reproducible research" emacs configuration](#a-simple-reproducible-research-emacs-configuration).
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.n redhat, fedora).
Today, the stable versions of the most common distributions provide recent enough versions of emacs and org-mode:
These are the versions of Emacs that various distributions provide:
- Debian (stretch) ships with [emacs 25.1](https://packages.debian.org/stretch/emacs25) and [org-mode 9.0.3](https://packages.debian.org/stretch/org-mode)
- Ubuntu (bionic 18.04) ships with [emacs 25.2](https://packages.ubuntu.com/bionic/emacs25) and [org-mode 9.1.6](https://packages.ubuntu.com/bionic/org-mode)
......@@ -48,10 +59,10 @@ If your distribution is older than this, well, it may be a good time for upgradi
Simply run (as root):
``` bash
apt-get update ; apt-get install emacs25 org-mode ess r-base auctex
apt-get update ; apt-get install emacs25 org-mode
```
Then make sure you have a sufficiently recent version of emacs.
Then verify that you have a sufficiently recent version of Emacs.
``` bash
emacs --version 2>&1 | head -n 1
......@@ -61,7 +72,7 @@ emacs --version 2>&1 | head -n 1
GNU Emacs 25.2.2
```
Likewise, you'll want to check you have a recent version of org-mode:
Likewise, you'll want to check you have a recent version of Org-Mode:
``` bash
emacs -batch --funcall "org-version" 2>&1 | grep version
......@@ -78,42 +89,16 @@ macOS
**Note:** macOS comes with a prehistoric command-line-only version of Emacs located at `/usr/bin/emacs`. It's best to forget about it.
- **Option 1**: Install the `.dmg` file from [Vincent Goulet](http://vgoulet.act.ulaval.ca/): [<https://vigou3.gitlab.io/emacs-modified-macos/>](https://vigou3.gitlab.io/emacs-modified-macos/). It ships with recent versions:
- Emacs 26.1
- Org-mode 9.1.13
- ESS 17.11
If you install this version of Emacs, or in fact any other version of Emacs distributed as a clickable application in a `.dmg` file, you must type the full path to the executable if you want to run Emacs from a terminal. For example, if your clickable application is at `/Applications/Emacs.app`, then the executable is at `/Applications/Emacs.app/Contents/MacOS/Emacs`
The Web site <https://emacsformacosx.com/> proposes precompiled Emacs versions for macOS. Download the latest version (the one that figures prominently on the page) and install it like you would install any other macOS application, by copying `Emacs.app` from the downloaded disk image to a convenient location on your computer.
- **Option 2**: If you use [Homebrew](https://docs.brew.sh/), do the following:
``` bash
brew update
brew install emacs --with-cocoa
brew linkapps emacs
brew install wget
brew tap dunn/emacs
brew install auctex
brew tap brewsci/science
brew install ess
```
This provides an `emacs` command for use from the command line, plus a clickable application at `Cellar/emacs/26.1_1/Emacs.app` inside your Homebrew directory. If you installed Homebrew at the default location `/usr/local`, then this is `/usr/local/Cellar/emacs/26.1_1/Emacs.app`. If you installed Homebrew on an account with administrator privileges, you can add
``` bash
brew linkapps emacs
```
in order to make Emacs accessible directly from `/Applications`.
In case you need to run Emacs from the command line (note: this is not required in the MOOC), you have to enter the full path to the executable. Assuming that you have copied `Emacs.app` to `/path/to/emacs`, this is `/path/to/emacs/Emacs.app/Contents/MacOS/Emacs`. Note that if you just type `emacs`, you will use the prehistoric command-line-only version at `/usr/bin/emacs` provided by Apple.
Windows
-------
Install the `.exe` file from [Vincent Goulet](http://vgoulet.act.ulaval.ca/): [<https://vigou3.gitlab.io/emacs-modified-windows/>](https://vigou3.gitlab.io/emacs-modified-windows/). It ships with recent versions:
Download the [precompiled Emacs 26.1](https://ftp.gnu.org/gnu/emacs/windows/emacs-26/emacs-26.1-i686.zip) and unzip the zip file preserving the directory structure, and run `bin\runemacs.exe`.
- Emacs 26.1
- Org-mode 9.1.13
- ESS 17.11
Alternatively, create a desktop shortcut to `bin\runemacs.exe`, and start Emacs by double-clicking on that shortcut's icon. See [here](https://www.gnu.org/software/emacs/manual/html_node/emacs/Windows-Startup.html) for an explanation of this and other methods for launching Emacs under Windows.
### Directory naming conventions
......@@ -167,7 +152,7 @@ Step 0: Backup and download our configuration
The procedure we propose will wipe your already existing custom Emacs configuration if you have one. **You should thus beforehand make a backup** of `~/.emacs` and of `~/.emacs.d/init.el` (if these files exist).
Then download [this archive](https://gitlab.inria.fr/learninglab/mooc-rr/mooc-rr-ressources/rr_org_archive.tgz) and uncompress it. It contains the following files and we will refer to them in the following:
Then download [this archive](https://gitlab.inria.fr/learninglab/mooc-rr/mooc-rr-ressources/blob/master/module2/ressources/rr_org_archive.tgz) and uncompress it. It contains the following files and we will refer to them in the following:
``` example
rr_org/init.el
......@@ -176,6 +161,8 @@ rr_org/journal.org
Alternatively, [the files you are looking for are available here](rr_org/).
If you use Windows, and if you use a desktop shortcut to start Emacs, you must include the path to the file `init.el` in the command for the shortcut. For example, if you installed Emacs as `C:\Users\MyName/emacs`, your desktop shortcut should execute the command `C:\Users\MyName\emacs\bin\runemacs.exe -l .emacs.d/init.el`.
Step 1: Prepare your journal
----------------------------
......
---
TITLE: Jupyter : tips and tricks, Installing and configuring
AUTHOR: Arnaud Legrand, Benoit Rospars, Konrad Hinsen
Date: Tue Feb 19 15:42:13 2019
Date: Wed Mar 20 12:15:02 2019
---
Table of Contents<span class="tag" data-tag-name="TOC"></span>
......@@ -40,7 +40,7 @@ Simply follow the following steps:
Importing an already existing notebook
If your notebook is already in your GitLab project, then simply synchronize by using the `Git pull` button and use the `File -> Open` menu. Otherwise, imagine, you want to import the [following notebook](https://app-learninglab.inria.fr/gitlab/moocrr-session1/moocrr-reproducibility-study/blob/master/src/Python3/challenger.ipynb) from someone else's repository to re-execute it.
1. Download the file on your computer. E.g., for this [GitLab hosted notebook](https://app-learninglab.inria.fr/gitlab/moocrr-session1/moocrr-reproducibility-study/blob/master/src/Python3/challenger.ipynb), click on `Open raw` (a small `</>` within a document icon) and save (`Ctrl-S` on most browsers) the content (a long Json text file).
1. Download the file on your computer. E.g., for this [GitLab hosted notebook](https://app-learninglab.inria.fr/gitlab/moocrr-session1/moocrr-reproducibility-study/blob/master/src/Python3/challenger.ipynb), click on `Open raw` (a small `</>` within a document icon) and save (`Ctrl-S` on most browsers) the content (a long JSON text file).
2. Open the Jupyter file manager from the menu `File -> Open` and navigate to the directory where you want to upload your notebook.
3. Then from the top right button, `Upload` the previously downloaded notebook and confirm the upload.
4. Open the freshly uploaded notebook through the Jupyter file manager.
......@@ -75,7 +75,7 @@ Note that this `%%R` notation indicates that R should be used for the whole cell
1.3 Other languages
-------------------
Jupyter is not limited to Pytyhon and R. Many other languages are available: [<https://github.com/jupyter/jupyter/wiki/Jupyter-kernels>](https://github.com/jupyter/jupyter/wiki/Jupyter-kernels), including non-free languages like SAS, Mathematica, Matlab... Note that the maturity of these kernels differs widely.
Jupyter is not limited to Python and R. Many other languages are available: [<https://github.com/jupyter/jupyter/wiki/Jupyter-kernels>](https://github.com/jupyter/jupyter/wiki/Jupyter-kernels), including non-free languages like SAS, Mathematica, Matlab... Note that the maturity of these kernels differs widely.
None of these other languages have been deployed in the context of our MOOC but you may want to read the next sections to learn how to set up your own Jupyter on your computer and benefit from these extensions.
......
This diff is collapsed.
---
TITLE: Maintaining a journal
Date: Tue Feb 19 19:19:03 2019
Date: Wed Mar 20 12:15:41 2019
---
Table of Contents<span class="tag" data-tag-name="TOC"></span>
==============================================================
- [Some examples of LabBooks provided for inspiration](#some-examples-of-labbooks-provided-for-inspiration)
- [How to report efficiently (by Martin Quinson)](#how-to-report-efficiently-by-martin-quinson)
- [1. Some examples of LabBooks provided for inspiration](#1-some-examples-of-labbooks-provided-for-inspiration)
- [2. How to report efficiently (by Martin Quinson)](#2-how-to-report-efficiently-by-martin-quinson)
- [Reporting](#reporting)
- [Reporting Logistics](#reporting-logistics)
- [Reporting Document Organization](#reporting-document-organization)
Some examples of LabBooks provided for inspiration
==================================================
1. Some examples of LabBooks provided for inspiration
=====================================================
Since a few years, we systematically require any or our students to have a laboratory notebook in org-mode. Most of the time, they start in private repositories but often end up being fully opened. Here are a few ones:
......@@ -28,8 +28,8 @@ Since a few years, we systematically require any or our students to have a labor
Org-mode is obviously not the only option and many of our students use am mixture of org-mode, rstudio and jupyter depending on what is more convenient.
How to report efficiently (by Martin Quinson)
=============================================
2. How to report efficiently (by Martin Quinson)
================================================
My friend Martin has gathered \[\[<https://people.irisa.fr/Martin.Quinson/Research/Students/Methodo/>\]\[an excellent compendium of information and references on his webpage to explain his students what he expects from them\]\]. **I'll therefore simply paraphrase him here** with the most important aspects related to reporting but feel free to read [the original version](https://people.irisa.fr/Martin.Quinson/Research/Students/Methodo/):
......
---
TITLE: FIXME Document Examples
TITLE: Document Examples
AUTHOR: Arnaud Legrand
Date: Tue Feb 19 17:43:42 2019
Date: Wed Mar 20 13:03:17 2019
---
Table of Contents<span class="tag" data-tag-name="TOC"></span>
......
---
TITLE: FIXME Computational Documents
Date: Tue Feb 19 19:19:03 2019
TITLE: Computational Documents
Date: Wed Mar 20 13:19:19 2019
---
This document gathers most references mentioned in the videos. This is a rather crude list.
Table of Contents<span class="tag" data-tag-name="TOC"></span>
==============================================================
......@@ -15,13 +17,11 @@ Table of Contents<span class="tag" data-tag-name="TOC"></span>
- [M2-S2: Why is This so Difficult?](#m2-s2-why-is-this-so-difficult)
- [Mistakes](#mistakes)
- [Going Public?](#going-public)
- [Tools to Avoid and Possible Alternatives](#tools-to-avoid-and-possible-alternatives)
- [M2-S3: Computational Documents: Principles](#m2-s3-computational-documents-principles)
- [M2-S5: Collaborating](#m2-s5-collaborating)
- [Preparing a Document for a Journal or a Conference](#preparing-a-document-for-a-journal-or-a-conference)
- [M2-S6: Comparative Study](#m2-s6-comparative-study)
- [See org-mode documents.](#see-org-mode-documents)
- [Bonus: expériences vécues](#bonus-expériences-vécues)
- [Exemples of Org-Mode documents](#exemples-of-org-mode-documents)
M2-S0: Computational Documents
==============================
......@@ -46,7 +46,7 @@ Functional MRI
Incorrect Protein Structures
----------------------------
[a "buggy software"](https://people.ligo-wa.caltech.edu/~michael.landry/calibration/S5/getsignright.pdf)
[A "buggy software"](https://people.ligo-wa.caltech.edu/~michael.landry/calibration/S5/getsignright.pdf).
Other domains
-------------
......@@ -68,9 +68,6 @@ Going Public?
- Someone may [benefit from my hard work](http://www.nature.com/news/the-top-100-papers-1.16224)
Tools to Avoid and Possible Alternatives
----------------------------------------
M2-S3: Computational Documents: Principles
==========================================
......@@ -93,31 +90,5 @@ Requirements for producing a **pdf**:
M2-S6: Comparative Study
========================
See org-mode documents.
-----------------------
Bonus: expériences vécues
-------------------------
Éléments clés lors du choix:
- Simplicité de prise en main vs. vrai éditeur
- Où sont fait les calculs
- Multi-langage
- <http://carreau.github.io/posts/23-Cross-Language-Integration.html>
- Gestion des langages compilés
- Notions de caches et d'état
Les principaux outils actuels:
- jupyter
- rstudio
- org-mode
Limitations:
- Longs calculs
- Grands documents
- Solutions wysiwyg pour jupyter
Historique/diff un peu compliqué pour jupyter
[Exemples of Org-Mode documents](../ressources/orgmode_examples/README.org)
---------------------------------------------------------------------------
---
TITLE: FIXME Computational Documents
Date: Tue Feb 19 18:18:56 2019
TITLE: Le document computationnel
Date: Wed Mar 20 13:19:19 2019
---
Ce document rassemble la plupart des références mentionnées dans les vidéos. C'est une liste relativement grossière qui mériterait d'être améliorée.
Table des matières<span class="tag" data-tag-name="TOC"></span>
===============================================================
- [M2-S0: Le document computationnel](#m2-s0-le-document-computationnel)
- [M2-S1: Exemples récents d'études assez discutées](#m2-s1-exemples-récents-détudes-assez-discutées)
- [Économie: Politiques d'austérité](#économie-politiques-daustérité)
- [Les IRM fonctionnelles](#les-irm-fonctionnelles)
- [Les fausses structures de protéines](#les-fausses-structures-de-protéines)
- [Autres domaines](#autres-domaines)
- [M2-S2: Pourquoi est-ce difficile?](#m2-s2-pourquoi-est-ce-difficile)
- [Les erreurs classiques](#les-erreurs-classiques)
- [Tout rendre publique ?](#tout-rendre-publique)
- [M2-S3: Le document computationnel : principe](#m2-s3-le-document-computationnel-principe)
- [M2-S5: Travailler avec les autres](#m2-s5-travailler-avec-les-autres)
- [Préparation d'un document pour un journal ou pour une conférence](#préparation-dun-document-pour-un-journal-ou-pour-une-conférence)
- [M2-S6: Analyse comparée des différents outils](#m2-s6-analyse-comparée-des-différents-outils)
- [Exemples de document Org-Mode](#exemples-de-document-org-mode)
M2-S0: Le document computationnel
=================================
M2-S1: Exemples récents d'études assez discutées
================================================
Économie: Politiques d'austérité
--------------------------------
- [Reinhart et Rogoff](https://en.wikipedia.org/wiki/Growth_in_a_Time_of_Debt): *Growth in a Time of Debt*
- Herndon, Ash et Pollin
- Wray: combining data across centuries, exchange rate regimes,
Les IRM fonctionnelles
----------------------
- 2010: [Bennett et al.: le saumon mort](https://www.researchgate.net/publication/255651552_Neural_correlates_of_interspecies_perspective_taking_in_the_post-mortem_Atlantic_Salmon_an_argument_for_multiple_comparisons_correction)
- 2016: [Eklund, Nichols, and Knutsson](http://www.pnas.org/content/113/28/7900.abstract). [Un bug dans les logiciels d'IRM pourrait invalider 15 années de recherche sur le cerveau](http://www.sciencealert.com/a-bug-in-fmri-software-could-invalidate-decades-of-brain-research-scientists-discover) (*40 000 articles*)
- 2016: C'est [plus subtil que ça](https://www.cogneurosociety.org/debunking-the-myth-that-fmri-studies-are-invalid/). [D'après Nichols, un des auteurs de l'article d'origine](http://blogs.warwick.ac.uk/nichols/entry/bibliometrics_of_cluster/), c'est plutôt de l'ordre de *3 600 études qui seraient potentiellement impactées*.
Les fausses structures de protéines
-----------------------------------
[A "buggy software"](https://people.ligo-wa.caltech.edu/~michael.landry/calibration/S5/getsignright.pdf).
Autres domaines
---------------
- [Oncologie](http://www.nature.com/nrd/journal/v10/n9/full/nrd3439-c1.html?foxtrotcallback=true): "*half of published studies, even in prestigious journals, can't be reproduced in industrial labs*"
- [Psychologie](http://theconversation.com/we-found-only-one-third-of-published-psychology-research-is-reliable-now-what-46596): "*attempting to reproduce 100 previously published findings*, *only one-third of published psychology research was found to be reliable*"
M2-S2: Pourquoi est-ce difficile?
=================================
Les erreurs classiques
----------------------
- [Enquoi les ordinateurs ont "cassé" la science](http://theconversation.com/how-computers-broke-science-and-what-we-can-do-to-fix-it-49938)
- [Erreurs de programmation et de manipulation de données en génomique](https://qz.com/768334/years-of-genomics-research-is-riddled-with-errors-thanks-to-a-bunch-of-botched-excel-spreadsheets/)
Tout rendre publique ?
----------------------
- Quelqu'un pourrait [tirer parti de mon dur labeur](http://www.nature.com/news/the-top-100-papers-1.16224)
M2-S3: Le document computationnel : principe
============================================
M2-S5: Travailler avec les autres
=================================
Préparation d'un document pour un journal ou pour une conférence
----------------------------------------------------------------
De quoi aurez-vous besoin pour produire un document **pdf**:
- En interne: *pandoc*, *knitr* ou *emacs/org-mode*.
- *LaTeX* devra aussi être installé
Voici quelques billets intéressants sur le sujet:
- <http://blog.juliusschulz.de/blog/ultimate-ipython-notebook>
- <https://github.com/kirbs-/hide_code> is a must-have
- <http://svmiller.com/blog/2016/02/svm-r-markdown-manuscript/>
- <https://github.com/balouf/Kleinberg/blob/master/KleinbergsGridSimulator.ipynb>
M2-S6: Analyse comparée des différents outils
=============================================
[Exemples de document Org-Mode](../ressources/orgmode_examples/README_fr.org)
-----------------------------------------------------------------------------
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