# coding: utf-8
x = 'salut, ca va ?'
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
blues_m = ['T', 'b3', 'P4', 'b5', 'P5', 'b7'] | |
mh = ['T', 'M2', 'b3', 'P4', 'P5', 'b6', 'M7'] | |
mm = ['T', 'M2', 'b3', 'P4', 'P5', 'P6', 'M7'] | |
m = ['T', 'M2', 'M3', 'P4', 'P5', 'P6', 'M7'] | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import fnmatch | |
import sys | |
def recurlist(path): | |
""" | |
path est une chaine de caractere | |
retourne une liste recursive des dossiers et fichiers contenus dans path. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import markdown2 | |
from xhtml2pdf import pisa | |
from xhtml2pdf.default import DEFAULT_CSS | |
import os | |
def mdht(md, ht = None): | |
"""convertion du fichier .md en .html | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# | |
# | |
# Copyright (c) 2017 Yann BOUYERON | |
# | |
# | |
# licensed under GNU GPL version 3 (or later) | |
# | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#version pour python >= 3.5 | |
import random | |
#l'utilisateur entre ses 3 numeros | |
n1 = int(input('entrez votre premier numero (entre 0 et 20): ')) | |
n2 = int(input('entrez votre second numero (entre 0 et 20): ')) | |
n3 = int(input('entrez votre troisieme numero (entre 0 et 20): ')) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Formulator.py | |
# Copyright (C) 2018 Yann Bouyeron | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU Affero General Public License as published | |
# by the Free Software Foundation, either version 3 of the License, or | |
# any later version. | |
# This program is distributed in the hope that it will be useful, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from xlwt import Workbook | |
import xlrd | |
def col2lin(col): | |
"""col est une liste de tuple de colonne. """ | |
return [tuple([c[i] for c in col]) for i in range(len(col[0]))] | |
Pour presenter le principe simplifié, on utilisera un fichier json pour stocker les données. (On devrait normalement utiliser une base de données. La gestion des utilisateur avec sqlite est presentée ici : https://github.com/YannBouyeron/bottle-session)
- rechercher si un cookie de connection est présent.
- si il est présent, recuperer son contenu (le mail de l’user) et retourner un texte personnalisé + un bouton de déconnection (action =
/logout
)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from decimal import Decimal | |
from attrdict import AttrDict | |
def d2k(d, k): | |
""" | |
d base 10 [int] to [str] base k [int] |
OlderNewer