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