Philippe Cholet

Agrégé de mathématiques

Code en python depuis trois ans et demi

Rameur, vélo, randonnée

Ma photo Mon travail python

Python

Pourquoi Python ?

  • L’enseigner aux lycéens dont j’étais le professeur de maths.
  • Automatiser des tâches récurrentes (collecte de données avec le web scrapping par exemple, outils en ligne de commande ou avec une interface graphique).
  • Simplement parce que c’est un langage agréable à utiliser, qu’il y a des packages pour tout.
  • Ma reconvertion professionelle dans l’informatique. Python n’y est pas le seul utilisé mais c’est une bonne base de départ.

Formation autodidacte

La plateforme CheckiO de codage en python m’a permis de développer mes compétences en résolvant plus de 390 problèmes. J’ai été “Leader of the month” de la communauté à trois reprises.

En remerciement de l’enseignement reçu, j’ai contribué à la plateforme en créant 16 problèmes me permettant d’apprendre à utiliser GitHub. Ces problèmes m’ont valu des compliments de la part de la communauté.

Finalement, j’ai créé un outil python en ligne de commande sur GitHub pour aider l’équipe de CheckiO à suivre les pull requests et issues réparties sur des centaines de dépôts GitHub. L’outil est basé sur la programmation asynchrone pour synthétiser des centaines de pages web de façon efficace en deux tableaux html.

Récemment, je me suis exercé à Qt par l’utilisation de PySide2 pour une implémentation du jeu Quoridor.

Quelques uns de mes autres scripts (CLI ou GUI) sont disponibles sur GitHub Gist. Je fais toujours mon possible pour que mon code soit pythonique notamment lisible car le code est plus souvent lu qu’écrit.

J’aime apprendre et suis prêt à relever les défis.

Packages python

Au dela des évidents numpy / scipy / sympy / matplotlib / pandas, j’apprécie beaucoup:

  • requests et beautifulsoup4 pour extraire des informations de pages web.
  • click pour créer des outils en ligne de commande.
  • PySimpleGUI pour créer des interfaces graphiques simplement.
  • pipx pour gérer facilement des applications (dans des environments isolés).
  • graphviz pour visualiser des graphes.

Problèmes créés pour CheckiO

J’ai - entre autres choses - adapté plusieurs puzzles de Simon Tatham’s Portable Puzzle Collection. L’objectif pour l’utilisateur est alors de créer une fonction pour résoudre ces puzzles complexes.

Chaque adaptation requiert un dépôt GitHub afin que CheckiO puisse synchroniser la tâche sur le site. Il faut créer une description, un logo, des tests mais surtout une fonction qui saura dire si la fonction donnée par un utilisateur résoud bien le problème donné. L’utilisateur kurosawa4434 a contribué à ce qu’il y ait des visualisations en javascript.

L’administrateur de CheckiO aime tellement ces puzzles qu’il les a réunis.

Ci-dessous quelques citations des personnes qui ont résolu mes problèmes (soit sur le forum, soit en réponse à un de mes messages sur leur code). Les liens dirigent vers les puzzles de Simon Tatham, les descriptions sur CheckiO et les dépôts GitHub correspondants.

Logo CheckiO GitHub Net Game

kurosawa4434: The first mission you made is great. (And it is very tough :-))

mortonfox: Wow, what an interesting challenge! This is a puzzle that is harder than it appears at first, mainly because the big grid in the test defeats non-optimized recursive searches. I tried a number of approaches before I came up with something that passes the test in a reasonable amount of time.

Logo CheckiO GitHub Inertia

Sillte: This practice is good for me to learn usage of priority queue and fun! Again, thank you for great problems!

Logo CheckiO GitHub Visibilities

Gabbek: I had so much fun solving this puzzle. I’ve learned quite a lot! My solution is far from perfect, but it’s good enough to do the job. Thank you for your support and time!

JamesArruda: Thanks again for making these puzzles. They are challenging and a great way to learn to translate intuition and experience into code. It’s one of the few puzzles on this site, I think, that really exercises that kind of coding practice.

Logo CheckiO GitHub Light Up

JimmyCarlos: Thanks for the puzzle - easily the hardest I ever have solved on CheckiO. It was VERY tough, and that made it really fun to solve. I like your advice about creating your own type of Exception, as well as making sure the Exceptions are your own.

JamesArruda: How did I not know about itertools.count? Yeesh. I definitely agree about the exceptions. A SolverError exception would be much more informative and let me distinguish between code errors and things to pass by. Doing so would have saved me some debug time.

kurosawa4434: This mission was tough and very interesting. As always, it was effective to carefully narrow down the possibilities. And I tried to visualize this mission. Please check the pull request.

Logo CheckiO GitHub Signpost

Ylliw: Thanks a lot for this very interesting mission and also for this great solution. […] Anyway, your code is faster than mine on my PC, so I will look to optimize my code to see if I can match yours.

Thanks to your suggestion, I dig into the timing of my code. […] It’s now 100 lines shorter than previous code but running very fast (same speed as your code). Thanks for your help. I was knowing Time, I discovered cProfile, a great asset to enhance slow codes.

Logo CheckiO GitHub Unruly

oduvan (admin of CheckiO): Phil! I love your implementation of Simon Tatham. Will make a special dedicated island just for those missions. Thank you

Logo CheckiO GitHub Find Rectangles

JamesArruda: Another great Tatham mission, Phil15. Thanks!

Logo CheckiO GitHub Train Tracks

JamesArruda: Another fun one! I was very surprised (and happy) that my deterministic solution made it through.

Gabbek: Really awesome task. I’ve struggled with it but eventually got it right. Great job! :)

r_tchaik: BTW I really enjoined the mission. Thanks for you efforts.

Autres missions

Logo CheckiO GitHub Text Formatting

quarkov: I do like this mission very much because it’s a kind of real-life application which is great.

Logo CheckiO GitHub Magic with 5 cards

kurosawa4434: Thanks Phil15 This mission includes various basic practices in Python.

HeNeArKr: Very enjoyable! It reminded me of how much fun I had working on earlier cipher and encoding missions.

I think that these kinds of missions are very valuable. The task to be accomplished is (fairly) straightforward in that the mission instructions tell the player exactly what to do. The player just has to find a way to implement those steps in code. This is not necessarily trivial, but also not so conceptually difficult that players just run into a wall. Players can also focus on finding efficient and/or elegant implementations.

These missions also help motivate players to look more deeply into certain topics that they may not have explored before, such as somewhat more complicated sorting in this case.

Logo CheckiO GitHub On the same path

Sim0000: Thanks. I have fun :-)

Logo CheckiO GitHub Next Birthday

veky: Thank you for an interesting mission! I had a great time solving it. :-)

kkkkk: I appreciate all the work you put into this; it’s much harder to come up with a problem, a solution, write the unit tests and answer questions then it is to just produce a solution.

Maths

  • MPSI-MP* en classe prépa à Clemenceau, Nantes.
  • Magistère à Rennes : l’ENS Cachan (antenne de Bretagne) et l’université Rennes 1.
  • Master 2 débouchant sur une agrégation de mathématiques.
  • “Colleur” en classes prépa (PCSI, MP, puis MPSI) à Lyon pendant un an.
  • Professeur de mathématiques en 4e puis en 2nde.

J'aime aussi

  • La science-fiction : Doctor Who, 12 monkeys, …
  • Les énigmes policières : Poirot d’Agatha Christie, …
  • Le rameur

Rameur

  • La randonnée en montagne

Refuge Wallon Marcadau

Me contacter

Adresse 910 le plessis pas brunet, 44390 Nort sur Erdre

Tél 06.83.22.98.25

Mail phil.cholet@orange.fr