c'est quoi ?

馃シ馃徏Mon niveau en python ! 

馃獩 est 茅quivalent 脿 : 
馃殌



  1. import time

  2. def timer(f):
  3.     def wrapper(*args, **kwargs):
  4.         start = time.time()
  5.         result = f(*args, **kwargs)
  6.         end = time.time()
  7.         print(f"Temps : {end - start:.4f}s")
  8.         return result
  9.     return wrapper

  10. @timer
  11. def slow():
  12.     time.sleep(1)

  13. slow()
#Temps : 1.0006s

@debug def add(a, b): ... ↓ 茅quivaut 脿 ↓ def add(a, b): ... add = debug(add)
@debug def add(a, b): ... ↓ 茅quivaut 脿 ↓ def add(a, b): ... add = debug(add)@debug
def add(a, b): ... ↓ 茅quivaut 脿 ↓ def add(a, b): ... add = debug(add)

DS : code correction

Architecture

  • Back-end (API): The API lives in the API-QCM repository. It serves the QCM endpoints (questions, categories, submit). By default the frontend expects the API at http://localhost:3000.

https://github.com/dupontdenis/API-QCM.git


  • Front-end : Static files in this repository (index.htmljs/css/) implement the UI that calls the API.

https://github.com/dupontdenis/publicQcm-cat.git

Virtual en action !

 

How to : virtual

API examples

馃崟Projet API pizza

馃摎Projet API Books

馃馃徑‍馃彨Projet API Teacher


 


Projet final : Librairy

 

express-locallibrary-tutorial

Tutorial "Local Library" website written in Node/Express.

 

馃帀code → https://github.com/dupontdenis/library.git


http://localhost:3000/catalog

http://localhost:3000/catalog/books


http://localhost:3000/catalog/author/create