This course is an introduction to the Python language using ready-to-run code and a few simple exercices.
A focus is made on the scientific use of Python (parts D and E) while some non-Python knowledge is presented in part A.
The indicative difficulty of each section (parts B, C, D, and E) is given in brackets (see the table of contents of the PDF file)):
- easy: the required knowledge for those who never coded in Python
- medium: some features that are somehow needed to improve your code
- advanced: interesting content, yet rarely needed for scientific programming
A PDF file of the entire course is available in the build directory: main.pdf (except part A chapters 1 and 2). This PDF file is built from the Python notebooks that can be found in the src_EN directory:
EX.ipynbare exercicesEX-COR.ipynbare exercice corrections- other files are the course itself
The build directory contains material to build the PDF file:
-
main.ipynbconverts the notebooks to LaTex files.Requires the
nbconvertPython package. -
main.texorganize these .tex files to build a single document.Requires a valid tex installation. That was tested with a full
texliveinstallation (2023/Debian) andpdflatex.
Similarly, the script build_slides.sh builds PDF slides that can be found in each subdirectory of src.
In addition to nbconvert, the following packages are needed to run the code. Versions in brackets are sure to be compatible, more recent versions probably work.
ipython(tested with version 8.11)jupytermatplotlib(3.4)numpy(1.24)pandas(1.5)scikit-learn(1.3)scipy(1.10)seaborn(0.12)Sphinx(7.2)sympy(1.11)tqdm(4.65)
Using Anaconda, the following line can be used in a command prompt to create a new environment named course:
conda create -y -n course jupyter matplotlib numpy pandas scikit-learn scipy seaborn Sphinx sympy tqdm
A small part of the course is based on VSCode.
Please install the following extensions:
Boris Nerot - LOCIE (Université Savoie Mont Blanc)
-
This content might evolve in a near future.
-
You may:
- suggest improvements to this content
- modify the content and share your modifications, according to the GNU 3 license. This includes citing the original author.