Commit e30bd464 authored by paugier's avatar paugier
Browse files

Small changes first notebooks

parent c14280fb
......@@ -16,7 +16,7 @@ scientific computing and programming:
We will study some basics on Linux and Python for scientific computing.
The personal project part will be presented during session 3. Sessions 3, 5, 6
and 7 will be dedicated to practical exercices on (3) Computation of integrals,
and 7 will be dedicated to practical exercises on (3) Computation of integrals,
(5) Finite Difference methods, (6) Gradient descent and (7) Machine learning.
We will work together on your personal projects during session 8.
......@@ -25,6 +25,7 @@ We will work together on your personal projects during session 8.
See the file
[install.md](https://gricad-gitlab.univ-grenoble-alpes.fr/meige-legi/scientific-computing-m2-efm/-/blob/master/install.md).
Note that you can copy/paste commands!
## Clone this repository
......@@ -35,8 +36,25 @@ Clone the repository with Mercurial (and the extension hg-git, as explained
hg clone https://gricad-gitlab.univ-grenoble-alpes.fr/meige-legi/scientific-computing-m2-efm.git
```
or with ssh (so you need to create a ssh key and copy the public key on ):
or with ssh (so you need to create a ssh key and copy the public key on
https://gricad-gitlab.univ-grenoble-alpes.fr):
```
hg clone git@gricad-gitlab.univ-grenoble-alpes.fr:meige-legi/scientific-computing-m2-efm.git
```
## Play with (or display) the notebooks
To modify the notebooks:
```
cd ipynb
jupyter-lab
```
To see the presentations made from the notebooks
```
make presentations
make serve
```
\ No newline at end of file
%% Cell type:markdown id: tags:
# Introduction to Bash
Bash is the most standard shell on Unix systems (Linux, MacOS, ...). A shell is a basic programming language to interact with the computer and launch commands.
There are standard commands (corresponding to programs) to do many basic tasks. You can read this short document https://files.fosswire.com/2007/08/fwunixref.pdf.
For example to get the current working directory, one can use:
%% Cell type:code id: tags:
``` bash
pwd
```
%% Cell type:markdown id: tags:
We see that we ask `pwd` and we get an answer (as a string).
There are also commands that do something but does not returb anything, for example cd (for "change directory"):
%% Cell type:code id: tags:
``` bash
cd ..
```
......
%% Cell type:markdown id: tags:
# Python training UGA 2017
# Scientific computing course 2020
**A training to acquire strong basis in Python to use it efficiently**
Pierre Augier (LEGI) and Enzo Le BoueDec (LEGI)
Pierre Augier (LEGI), Cyrille Bonamy (LEGI), Eric Maldonado (Irstea), Franck Thollard (ISTerre), Christophe Picard (LJK), Loïc Huder (ISTerre)
(And Cyrille Bonamy (LEGI), Eric Maldonado (Irstea), Franck Thollard (ISTerre), Christophe Picard (LJK), Loïc Huder (ISTerre)...)
%% Cell type:markdown id: tags:
## Table of contents
## Scientific computing course 2020
Day 1
------
- Introduction first steps
- Introduction language Python
- Basic statements
- Functions
- Read / write files
- Practical work 0
During sessions 1, 2 and 4 (9 hours), we will present an introduction on
scientific computing and programming:
%% Cell type:markdown id: tags:
- Computers to compute (CPU, memories, GPU, clusters)
- Numbers in computers
- Programming languages
- Difference open-source / close-source
- Operating systems and importance of Linux for scientific computing
- Install a good environment, example of Conda
- Versioning and Gitlab (https://gricad-gitlab.univ-grenoble-alpes.fr)
Day 2
------
- Import statement and the standard library
- Data structures
- Object-oriented programming
- Practical work 1 (import, data structures and OOP)
We will study some basics on Linux and Python for scientific computing.
%% Cell type:markdown id: tags:
The personal project part will be presented during session 3. Sessions 3, 5, 6
and 7 will be dedicated to practical exercises on (3) Computation of integrals,
(5) Finite Difference methods, (6) Gradient descent and (7) Machine learning.
Day 3
------
- Python environments
- Introduction to Numpy and Matplotlib
- Practical work 2 (Image processing with numpy & matplotlib, argparse,
simple testing and packaging)
- Documentations and applications
We will work together on your personal projects during session 8.
This course should be fun! Do not hesitate to interrupt and ask any questions!
......
%% Cell type:markdown id: tags:
# Python training UGA 2017
# Scientific computing course 2020
**A training to acquire strong basis in Python to use it efficiently**
Pierre Augier (LEGI) and Enzo Le BoueDec (LEGI)
Pierre Augier (LEGI), Cyrille Bonamy (LEGI), Eric Maldonado (Irstea), Franck Thollard (ISTerre), Christophe Picard (LJK), Loïc Huder (ISTerre)
(And Cyrille Bonamy (LEGI), Eric Maldonado (Irstea), Franck Thollard (ISTerre), Christophe Picard (LJK), Loïc Huder (ISTerre)...)
# First steps
Repository containing the source of this training:
`https://gricad-gitlab.univ-grenoble-alpes.fr/augierpi/intro-python`
%% Cell type:markdown id: tags:
## Why Python ?
- A very nice and well-thought programming language.
......@@ -52,25 +47,20 @@
* [Anaconda or Miniconda](https://www.continuum.io/downloads)
([advice on how to install a good scientific Python environment](http://fluiddyn.readthedocs.io/en/latest/get_good_Python_env.html))
- In some systems (cluster), there are modules:
```bash
module load python
```
%% Cell type:markdown id: tags:
### Do it yourself: personal work
Download the repository of this training (you need one of the programs `git` or `mercurial`). On Unix machines, use the commands:
```bash
hg clone https://gricad-gitlab.univ-grenoble-alpes.fr/augierpi/intro-python.git
cd py-training-2017
hg clone https://gricad-gitlab.univ-grenoble-alpes.fr/meige-legi/scientific-computing-m2-efm.git
cd scientific-computing-m2-efm
cat README.rst
make help
```
Warning: `cat` and `make` are Unix commands...
......@@ -168,5 +158,11 @@
### Python in the browser ([Jupyter](https://jupyter.readthedocs.io))
The presentations of this python training are made with Jupyter (demonstration).
This is a very powerful tool to present results (see these [examples](http://nbviewer.jupyter.org/)).
```bash
cd scientific-computing-m2-efm
jupyter-lab
```
......
......@@ -304,7 +304,10 @@
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": true
"collapsed": true,
"jupyter": {
"outputs_hidden": true
}
},
"outputs": [],
"source": [
......@@ -318,7 +321,10 @@
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": true
"collapsed": true,
"jupyter": {
"outputs_hidden": true
}
},
"outputs": [],
"source": [
......@@ -335,7 +341,10 @@
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": true
"collapsed": true,
"jupyter": {
"outputs_hidden": true
}
},
"outputs": [],
"source": [
......@@ -554,9 +563,9 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.3"
"version": "3.8.2"
}
},
"nbformat": 4,
"nbformat_minor": 2
"nbformat_minor": 4
}
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