Daily Shaarli

All links of one day in a single page.

October 8, 2022

compose-spec/spec.md at master · compose-spec/compose-spec
thumbnail

Spécification de docker-compose (version plus nécessaire)

Python Progress Bar - Stack Overflow
thumbnail

Barre de progression en python

def progressbar(it, prefix="", size=60, out=sys.stdout): # Python3.6+
    count = len(it)
    def show(j):
        x = int(size*j/count)
        print(f"{prefix}[{u'█'*x}{('.'*(size-x))}] {j}/{count}", end='\r', file=out, flush=True)
    show(0)
    for i, item in enumerate(it):
        yield item
        show(i+1)
    print("\n", flush=True, file=out)