Formation Algorithmique et Python pour les profs d’info en prépas scientifiques

Nous avons effectué deux sessions de formation sur l’algorithmique, Python et les bibliothèques Python scientifiques (pylab), la semaine dernière, à destination de futurs professeurs d’informatique de Classes Préparatoires aux Grandes Écoles (CPGE) scientifiques, dans le cadre du dispositif des formations LIESSE.

Cette formation s’inscrit dans l’objectif de former les nouveaux professeurs d’informatique, souvent issus d’autres matières, qui devront enseigner à la rentrée de septembre 2013 l’informatique auprès de tous les étudiants en Sup (nouveau programme).

Cette formation sur deux journées a été montée conjointement entre Télécom SudParis et l’ENSIIE.

Vous trouverez ci-dessous les transparents d’une partie de la formation (essentiellement le premier jour). Le reste correspond au contenu de Notebooks IPython portant sur l’informatique scientifique en Python avec Numpy, Scipy et Matplotlib, et est disponible en ligne (cf. les liens dans ce document PDF, vers des versions des notebooks à télécharger en ligne).

Télécharger : transparents (PDF – 1.6 Mo)

Une archive plus détaillée (avec exemples, codes source Org-Mode et Python, etc.) est également disponible : nous contacter si intéressés.

Managing Python code with UTF-8 (french chars) in org-mode + babel + minted for LaTeX export

The goal of this article is to illustrate how to manage Python code which includes comments in UTF-8 characters inside a latin-1 source org-mode for LaTeX export.

Note that I’ve pasted in wordpress the HTML generated by org-mode, so I hope it isn’t broken too much.

My typical use case is a french lecture on Python where the text is written in french, as well as some of the code comments and examples

We’ll use org-mode’s babel module to include and manage the Python
examples. The goal is to write the source of the Python programs
directly in the same org source as the class book’s text, and to extract them into a subdir (with the “tangle” feature), so that they can be shipped to the students to experiment with.

The minted LaTeX environment is used, for babel, to make the Python syntax highlighting.

Continue reading “Managing Python code with UTF-8 (french chars) in org-mode + babel + minted for LaTeX export”

Python RDF example of a MySQL triple store thanks to redland/librdf

In a way similar to my previous post about persisting graphs in PostGreSQL in PHP, here’s similar examples for Python and MySQL.

Note that you may need to adjust the MySQL table creation templates if you’re running librdf version 1.0.16 (see this bug for details).

The first example will load data from a file, and store the parsed model to the RDBMS, while the second example, will reload the model and issue queries on it.watch A Cure for Wellness 2017 movie now

These examples don’t do much, but hopefully, they’ll help you get started if you’re interested in using redland/librdf.

One potential benefit can be interoperability with other languages like PHP, for instance if you’re running harvesters in Python that will save facts in a triple store, which is then accessed by a PHP application that will publish a Web interface.

Playing with soprano bindings in PyKDE4

I’ve tried and access the KDE4 soprano RDF store with python, for instance to access the tags set within Dolphin.

The bindings in PyKDE4 are there, but they lack examples or documentation (other than the one auto-generated from the C++ API docs).

Here’s a first code if your’e interested : soprano.py