]> gitweb.pimeys.fr Git - scripts-20-100.git/commitdiff
Not so much useful
authorVincent Le Gallic <legallic@crans.org>
Sun, 29 Sep 2013 19:53:05 +0000 (21:53 +0200)
committerVincent Le Gallic <legallic@crans.org>
Sun, 29 Sep 2013 19:53:05 +0000 (21:53 +0200)
useless/dateWEI.py [new file with mode: 0644]
useless/generer_tous_les_parametres_de_tester_color.py [new file with mode: 0644]

diff --git a/useless/dateWEI.py b/useless/dateWEI.py
new file mode 100644 (file)
index 0000000..febe2c3
--- /dev/null
@@ -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 (file)
index 0000000..c27a94d
--- /dev/null
@@ -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])