You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

notes.md 1.6 KiB

5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. Ce fichier contient diverses notes utiles à la préparation des futurs cours.
  2. # Sujets à évoquer
  3. ## bits
  4. * attributes on functions (you never know)
  5. * `__call__`, functors
  6. * scopes, closures, global, nonlocal
  7. * no overlaod in python
  8. * several `__init__` ? Nope, alternative constructors
  9. * https://code-maven.com/slides/python-programming/class-methods-alternative-constructor
  10. * properties on classes
  11. * stable sorts
  12. * dict: setdefault
  13. * listes: pop prend un argument
  14. * slices takes a step too [::-1] -> reverse
  15. * with: contextmanager, ContextDecorator
  16. * short circuit in if: `if a is not None and a.b == 42`
  17. ## big stuff
  18. * exceptions: try, catch, finally
  19. * files: "wa", accès séquentiel (chunk = file.read(chunk_size))
  20. * style: trailing white space, editor configuration,
  21. * [formatage de strings](fragments/format.md)
  22. * liste par compréhension et filtres
  23. * `help()`
  24. * packages, libraries tierces
  25. * requests, HTTP protocol (headers, methodes, urls, anchors, links ...)
  26. * décorateurs
  27. * Données binaires, encodage (binaire, ASCII, hexadécimal, unicode ...)
  28. * virtualenv, pip, et bibliothèques tierces
  29. * IDEs: don't use them ... yet (or ever)
  30. * linters,
  31. * déboguage
  32. * demo: pyflakes - black
  33. * tests: pytest, TDD
  34. # Idées d'ateliers
  35. Parser du RSS et télécharger les émissions:
  36. * Source: https://github.com/dmerejkowsky/pypodget/
  37. * Concepts:
  38. * `setup.py`
  39. * scripts, entry points
  40. * Remplacer Matlab par Python + numpy + matplotlib
  41. * Effets audio
  42. * Jeux vidéos (pygame)
  43. * IOT : micro-controller, Rasberry Pi
  44. * Blender/GIMP
  45. * Stéganographie: cacher un texte dans une image
  46. * Patcher des binaires Windows pour le fun?