From: Vincent Le Gallic Date: Sun, 29 Sep 2013 19:53:05 +0000 (+0200) Subject: Not so much useful X-Git-Url: http://gitweb.pimeys.fr/?a=commitdiff_plain;h=79f5dcdc981b021520e6e418a16156a96e4a499a;p=scripts-20-100.git Not so much useful --- diff --git a/useless/dateWEI.py b/useless/dateWEI.py new file mode 100644 index 0000000..febe2c3 --- /dev/null +++ b/useless/dateWEI.py @@ -0,0 +1,19 @@ +#!/usr/bin/python +# -*- coding:utf8 -*- + +import time +wei_date = "14/09/2012 12:00:00" +wei_date = time.mktime(time.strptime(wei_date,"%d/%m/%Y %H:%M:%S")) + +now = time.time() +#now = time.mktime(time.strptime("14/09/2012 12:00:00","%d/%m/%Y %H:%M:%S")) + +delta = wei_date - now +deltad = int(delta/86400) + 1 + +if deltad>0: + print "J-%s"%(deltad) +elif deltad<0: + print "J+%s"%(abs(deltad)) +else: + print "C'EST LE WEI !!" diff --git a/useless/generer_tous_les_parametres_de_tester_color.py b/useless/generer_tous_les_parametres_de_tester_color.py new file mode 100644 index 0000000..c27a94d --- /dev/null +++ b/useless/generer_tous_les_parametres_de_tester_color.py @@ -0,0 +1,35 @@ +coullist=["black","red","green","yellow","blue","purple","cyan","white"] + +ll=[] +for coul in coullist: + for i in range(6,0,-1): + l=[] + if not(i&4): + l.append("underline") + if i%3==2: + l.append("high") + if i%3==1: + l.append("bold") + ll.append(("fg %s "%(coul)+" ".join(l)).strip()) +print " ".join([repr(i) for i in ll]) +ll=[] +for coul in coullist: + ll.append("bg %s"%(coul)) + ll.append("bg %s high"%(coul)) +print " ".join([repr(i) for i in ll]) + +ll=[] +for bg in coullist: + for fg in coullist: + for i in range(6,0,-1): + l=[] + l=[] + if not(i&4): + l.append("underline") + if i%3==2: + l.append("high") + if i%3==1: + l.append("bold") + ll.append(("both %s %s , %s "%(fg," ".join(l),bg)).strip()) + ll.append("both %s %s , %s high"%(fg," ".join(l),bg)) +print " ".join([repr(i) for i in ll])