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.5 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
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. Ce fichier contient diverses notes utiles à la préparation des futurs cours.
  2. # Sujets à évoquer
  3. ## bits
  4. * class attributes vs instances attributes, @classmethod, properties
  5. *
  6. * dict: setdefault
  7. * listes: pop prend un argument
  8. * slices takes a step too [::-1] -> reverse
  9. * with: contextmanager, ContextDecorator
  10. ## big stuff
  11. * exceptions: try, catch, finally
  12. * short circuit in if: `if a is not None and a.b == 42`
  13. * files: "wa", accès séquentiel (chunk = file.read(chunk_size))
  14. * style: trailing white space, editor configuration,
  15. * [formatage de strings](fragments/format.md)
  16. * liste par compréhension et filtres
  17. * `help()`, doc en ligne (également en français)
  18. * modules et packages:
  19. * scripts vs modules
  20. * débugger avec l'interpréteur avec `import/relod()`.
  21. * `if __name__ == "__main__"`
  22. * décorateurs
  23. * classes
  24. * héritage
  25. * super()
  26. * Données binaires, encodage (binaire, ASCII, hexadécimal, unicode ...)
  27. * virtualenv, pip, et bibliothèques tierces
  28. * IDEs: don't use them ... yet (or ever)
  29. * linters,
  30. * déboguage
  31. * demo: pyflakes - black
  32. * tests: pytest, TDD
  33. # Idées d'ateliers
  34. Parser du RSS et télécharger les émissions:
  35. * Source: https://github.com/dmerejkowsky/pypodget/
  36. * Concepts:
  37. * `setup.py`
  38. * scripts, entry points
  39. * Remplacer Matlab par Python + numpy + matplotlib
  40. * Effets audio
  41. * Jeux vidéos (pygame)
  42. * IOT : micro-controller, Rasberry Pi
  43. * Blender/GIMP
  44. * Stéganographie: cacher un texte dans une image
  45. * Patcher des binaires Windows pour le fun?