Commit 850fac3e authored by Matthieu Boileau's avatar Matthieu Boileau

Update README and manual

parent 973eadaf
## Installer des dépendances :
## Installer des dépendances
### Python
`python 3.6+` est nécessaire avec les dépéndances suivantes :
```bash
pip install -r docker/requirements.txt
python3 -m bash_kernel.install
```
Pour exécuter directement le code assembleur, il est nécessaire d'installer le paquet `spim`.
### Utilitaires
- `spim` (pour exécuter directement le code assembleur)
- `cmake 3.12+`
## Exécuter
......@@ -15,8 +22,12 @@ jupyter-notebook
## Produire les supports
```
make
Depuis la racine du projet :
```bash
git clone --recurse-submodules https://gitlab.math.unistra.fr/boileau/nbcourse.git
pip install --user -r nbcourse/requirements.txt
python -m nbcourse
```
Le résultat se retrouve dans le répertoire `build` :
......
% Default to the notebook output style
((* if not cell_style is defined *))
((* set cell_style = 'style_ipython.tplx' *))
((* endif *))
% Inherit from the specified cell style.
((* extends cell_style *))
%===============================================================================
% Latex Book
%===============================================================================
((* block predoc *))
((( super() )))
((* block tableofcontents *))\tableofcontents((* endblock tableofcontents *))
((* endblock predoc *))
((* block docclass *))
\documentclass[10pt, reprint, floatfix, groupaddress, prb, twoside]{book}
\usepackage[francais]{babel} % Pour la langue française
% Force floating figures to be [H]
\usepackage{float}
\floatplacement{figure}{H}
\usepackage[svgnames]{xcolor} % Required for colour specification
\definecolor{pythonblue}{rgb}{0.21,0.45,0.65}
\definecolor{pythonyellow}{rgb}{1.,0.77,0.18}
((* endblock docclass *))
((* block markdowncell scoped *))
((( cell.source | citation2latex | strip_files_prefix | convert_pandoc('markdown', 'json',extra_args=[]) | resolve_references | convert_pandoc('json','latex', extra_args=["--top-level-division=chapter"]) )))
((* endblock markdowncell *))
((* block maketitle *))
\begin{titlepage}
\vspace*{\baselineskip}
\centering
{\Large Matthieu Boileau }
\vspace*{0.167\textheight}
\raggedleft
\textbf{\fontsize{30}{36}\selectfont Environnement de}\\[\baselineskip]
\textbf{\textcolor{pythonblue}{\fontsize{50}{60}\selectfont programmation}}\\[\baselineskip]
\textcolor{pythonyellow}{\fontsize{30}{36}\selectfont \textit{pour C++}}
%\vspace*{0.1\textheight}
\vfill
\centering
\includegraphics{img/cpp.jpg}
\vfill
{\large CNRS - Université de Strasbourg}
\end{titlepage}
((* endblock maketitle *))
((* block bibliography *))
\bibliographystyle{unsrt}
\bibliography{riemann}
((* endblock bibliography *))
((*- block any_cell -*))
((*- if not 'hide' in cell['metadata'].get('tags', {}) -*))
((( super() )))
((*- endif -*))
((*- endblock any_cell -*))
((* block input scoped *))
((( add_my_prompt(cell.source | highlight_code(strip_verbatim=True), cell, 'In ', 'incolor') )))
((* endblock input *))
% Purpose: Renders an output/input prompt
((* macro add_my_prompt(text, cell, prompt, prompt_color) -*))
((*- if cell.execution_count is defined -*))
((*- set execution_count = "" ~ (cell.execution_count | replace(None, " ")) -*))
((*- else -*))
((*- set execution_count = " " -*))
((*- endif -*))
((*- set indention = " " * (execution_count | length + 7) -*))
\begin{Verbatim}[fontsize=\small,commandchars=\\\{\}]
((( text | add_prompts(first='{\color{' ~ prompt_color ~ '}' ~ prompt ~ '[{\\color{' ~ prompt_color ~ '}' ~ execution_count ~ '}]:} ', cont=indention) )))
\end{Verbatim}
((*- endmacro *))
---
title: Anaconda
parent: manual.md
---
## Download
[Download Anaconda](https://www.anaconda.com/download) for your operating system and install it.
On Linux, open *Terminal* application and type:
```bash
cd Downloads
bash ./Anaconda*.sh
```
## Install the *Exercise2* extension for Jupyter
Use the Command line interface on:
- Windows : *Start menu > All programms > Anaconda3 (64bits) > Anaconda Prompt*
- Linux or Mac : open *Terminal*
Type :
```bash
conda install -c conda-forge jupyter_contrib_nbextensions
jupyter nbextension enable exercise2/main
```
......@@ -3,66 +3,46 @@ title: Manual
parent: home
---
## Execute the Jupyter notebooks
## Installer des dépendances
This course content is provided as Jupyter notebooks that require to be powered by a Jupyter server with Python3 kernel.
### Python
## Install Jupyter
### First install Anaconda
[Anaconda](https://www.anaconda.com/distribution) is complete and easy to install.
In particular, it is shipped with:
- [Jupyter](http://jupyter.org/)
- The [Spyder](https://github.com/spyder-ide/spyder) IDE
- Scipy libraries: Numpy, Pandas, etc.
For a detailed installation of Anaconda and its extensions on Windows, Mac or Linux, follow the <a href="pages/anaconda.md"><img src="fig/anaconda.png" style="display:inline" alt="Anaconda logo" width="100px"></a> instructions.
### Finalize installation with conda
From the project root directory, type:
`python 3.6+` est nécessaire avec les dépéndances suivantes :
```bash
conda install --file requirements.txt
pip install -r docker/requirements.txt
python3 -m bash_kernel.install
```
## Run a Jupyter server
### Utilitaires
- `spim` (pour exécuter directement le code assembleur)
- `cmake 3.12+`
- Either from Anaconda graphical interface
- or the command line interface from the project root directory:
## Exécuter
```bash
jupyter-notebook
```
## Convert to html, slideshow and pdf
## Produire les supports
Use [nbcourse](https://gitlab.math.unistra.fr/boileau/nbcourse):
Depuis la racine du projet :
```bash
nbcourse list
build_book Build pdf book
build_pages Build html pages
convert_to_html Convert executed notebook to html page
convert_to_slides Convert executed notebook to reveal slides
copy_material Copy notebook and theme material to output directory
copy_reveal Copy reveal.js to output directory
execute_notebooks Write executed notebooks to output directory
output_dir Create empty output directory
zip_archive Build a single zip archive for all material
zip_chapters Build zip archives for single chapter downloads
git clone --recurse-submodules https://gitlab.math.unistra.fr/boileau/nbcourse.git
pip install --user -r nbcourse/requirements.txt
python -m nbcourse
```
Edit the `nbcourse.yml` file and run:
```bash
nbcourse [-n 4] <target> # [to run on 4 parallel threads]
```
Le résultat se retrouve dans le répertoire `build` :
The result will be located in `build/` directory.
- les notebooks en version html linéaire et les slides Reveal.js
- une archive par notebook avec le matériel des TP
- une archive complète
- une compilation de l'ensemble des chapitres au sein d'un même pdf
- le menu `index.html` de la page d'accueil
## Publish with GitLab Pages
## Publier
Thanks to [.gitlab-ci.yml](.gitlab-ci.yml) file, an online version may be automatically published at every `git push` towards a GitLab project.
GitLab-ci publie le contenu à l'adresse indiquée sur [cette page](https://gitlab.math.unistra.fr/boileau/outils-dev-log/pages) grâce au fichier [.gitlab-ci.yml](.gitlab-ci.yml).
\ No newline at end of file
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