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