選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
このリポジトリはアーカイブされています。 ファイルの閲覧とクローンは可能ですが、プッシュや、課題・プルリクエストのオープンはできません。
 
 
 
 
 
 

1.7 KiB

Ce fichier contient diverses notes utiles à la préparation des futurs cours.

Sujets à évoquer

bits

  • attributes on functions (you never know)
  • call, functors
  • scopes, closures, global, nonlocal
  • no overlaod in python
    • several init ? Nope, alternative constructors
  • class attributes vs instances attributes, @classmethod, properties https://code-maven.com/slides/python-programming/class-methods-alternative-constructor
  • stable sorts
  • dict: setdefault
  • listes: pop prend un argument
  • slices takes a step too [::-1] -> reverse
  • with: contextmanager, ContextDecorator
  • short circuit in if: if a is not None and a.b == 42

big stuff

  • exceptions: try, catch, finally

  • files: “wa”, accès séquentiel (chunk = file.read(chunk_size))

  • style: trailing white space, editor configuration,

  • formatage de strings

  • liste par compréhension et filtres

  • help(), doc en ligne (également en français)

  • packages, libraries tierces

  • requests, HTTP protocol (headers, methodes, urls, anchors, links ...)

  • décorateurs

  • classes

    • héritage
    • super()
  • Données binaires, encodage (binaire, ASCII, hexadécimal, unicode ...)

  • virtualenv, pip, et bibliothèques tierces

  • IDEs: don’t use them ... yet (or ever)

    • linters,
    • déboguage
    • demo: pyflakes - black
  • tests: pytest, TDD

Idées d’ateliers

Parser du RSS et télécharger les émissions:

  • Source: https://github.com/dmerejkowsky/pypodget/

  • Concepts:

    • setup.py
    • scripts, entry points
  • Remplacer Matlab par Python + numpy + matplotlib

  • Effets audio

  • Jeux vidéos (pygame)

  • IOT : micro-controller, Rasberry Pi

  • Blender/GIMP

  • Stéganographie: cacher un texte dans une image

  • Patcher des binaires Windows pour le fun?