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.7 KiB

6 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
6 years ago
5 years ago
5 years ago
6 years ago
5 years ago
6 years ago
6 years ago
5 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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. * class attributes vs instances attributes, @classmethod, properties
  10. https://code-maven.com/slides/python-programming/class-methods-alternative-constructor
  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()`, doc en ligne (également en français)
  24. * packages, libraries tierces
  25. * requests, HTTP protocol (headers, methodes, urls, anchors, links ...)
  26. * décorateurs
  27. * classes
  28. * héritage
  29. * super()
  30. * Données binaires, encodage (binaire, ASCII, hexadécimal, unicode ...)
  31. * virtualenv, pip, et bibliothèques tierces
  32. * IDEs: don't use them ... yet (or ever)
  33. * linters,
  34. * déboguage
  35. * demo: pyflakes - black
  36. * tests: pytest, TDD
  37. # Idées d'ateliers
  38. Parser du RSS et télécharger les émissions:
  39. * Source: https://github.com/dmerejkowsky/pypodget/
  40. * Concepts:
  41. * `setup.py`
  42. * scripts, entry points
  43. * Remplacer Matlab par Python + numpy + matplotlib
  44. * Effets audio
  45. * Jeux vidéos (pygame)
  46. * IOT : micro-controller, Rasberry Pi
  47. * Blender/GIMP
  48. * Stéganographie: cacher un texte dans une image
  49. * Patcher des binaires Windows pour le fun?