Option complémentaire en informatique

Ce site GitHub contient le matériel pour le cours d’option complémentaire en informatique du gymnase du Bugnon.

Les sujets sonts:

  • Raspberry Pi
  • GitHub
  • Linux
  • LaTeX
  • Python
  • Jupyter Lab
  • Jupyter Notebook
  • Widgets
  • Bokeh
  • Matplotlib
  • NumPy
  • SciPy
  • OpenCV
  • MarkDown
  • reStructuredText
  • Sphinx
  • HTML
  • CSS
  • Pygame
  • Minecraft

Once Sphinx is installed, you can proceed with setting up your first Sphinx project. To ease the process of getting started, Sphinx provides a tool, sphinx-quickstart, which will generate a documentation source directory and populate it with some defaults. We’re going to use the sphinx-quickstart tool here, though it’s use by no means necessary.

Préparation de l’infrastructure

The root directory of a Sphinx collection of reStructuredText document sources is called the source directory. This directory also contains the Sphinx configuration file conf.py, where you can configure all aspects of how Sphinx reads your sources and builds your documentation.

$ pip install jupyter
$ jupyter labextension list

Sphinx comes with a script called sphinx-quickstart that sets up a source directory and creates a default conf.py with the most useful configuration values from a few questions it asks you. To use this, run:

$ sphinx-quickstart
enumerate(sequence[, start=0])
Return an iterator that yields tuples of an index and an item of the sequence. (And so on.)

The enumerate() function can be used for …

  • This is a bulleted list.
  • It has two items, the second item uses two lines.
  1. This is a numbered list.
  2. It has two items too.
  3. This is a numbered list.
  4. It has two items too.
  • this is
  • a list
    • with a nested list
    • and some subitems
  • and here the parent list continues

Definition list

term (up to a line of text)

Definition of the term, which must be indented

and can even consist of multiple paragraphs

next term
Description.
These lines are
broken exactly like in
the source file.

Literal blocks

This is a normal text paragraph. The next paragraph is a code sample:

It is not processed in any way, except
that the indentation is removed.

It can span multiple lines.

This is a normal text paragraph again.

Doctest blocks

>>> 1 + 1
2

Tables

Header row, column 1 (header rows optional) Header 2 Header 3 Header 4
body row 1, column 1 column 2 column 3 column 4
body row 2  

This is another form.

A B A and B
False False False
True False False
False True False
True True True

This is a heading

$ sphinx-quickstart