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 PySimpleGUI as sg | |
from operator import itemgetter | |
### uitliser ipython -i argv[0] pour être en interactif et faire joujou | |
can = sg.Canvas(size=(1412,998)) | |
status=sg.Text('status') | |
win = sg.Window("titre",[[can,],[status,],], finalize=True) | |
c = can.TKCanvas | |
from time import sleep, time | |
from random import randint | |
from os import system |
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 PySimpleGUI as sg | |
from operator import itemgetter | |
### uitliser ipython -i argv[0] pour être en interactif et faire joujou | |
can = sg.Canvas(size=(400,600)) | |
status=sg.Text('status') | |
win = sg.Window("titre",[[can,],[status,],], finalize=True) | |
c = can.TKCanvas | |
from time import sleep | |
SZ=50 |
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 PySimpleGUI as sg | |
### uitliser ipython -i argv[0] pour être en interactif et faire joujou | |
can = sg.Canvas(size=(400,600)) | |
win = sg.Window("titre",[[can,],],finalize=True) | |
c = can.TKCanvas | |
from time import sleep | |
SZ=50 | |
ORD=1 | |
def save(canvas, name="save"): |
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 PySimpleGUI as sg | |
### uitliser ipython -i argv[0] pour être en interactif et faire joujou | |
can = sg.Canvas(size=(400,600)) | |
win = sg.Window("titre",[[can,],],finalize=True) | |
c = can.TKCanvas | |
SZ=50 | |
def tr(x,y, up=1,**kw): | |
""" créer un triangle équilatéral centré en x,y avec une homothétie / | |
symmétrie sur l'axe des y (up / down) exprimée en coordonnées |
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 python3 | |
from archery import mdict | |
from functools import reduce | |
from random import randint, seed | |
from json import dumps | |
from sys import argv | |
pp = lambda d:print(dumps(d, indent=4)) | |
_seed = argv[1] | |
print(_seed) | |
seed(int(_seed)) |
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/bash | |
MIN_FF_OPT=" --headless " | |
FF="firefox $MIN_FF_OPT" | |
die() { echo "$@"; exit 0;} | |
fc-match Andika || die "le test va pas marcher" | |
echo "basically if I could create profile from scratch I would put only this" | |
cat <<EOF | |
user_pref("font.default.x-western", "Andika"); |
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 gnuplot | |
set timefmt '%Y-%m-%d' | |
set xdata time | |
set yrange [1<*:] | |
set format x '%Y-%m-%d' | |
set xrange ["2020-03-01"<*:] | |
set datafile sep ',' |
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/bash | |
MYPID=$$ | |
watchdog () { | |
( PID=$1 | |
DONE=0 | |
while [[ $DONE == 0 ]]; do | |
echo "watchdog running" | |
if $( kill -0 $PID ); then | |
sleep 1; | |
else |
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 -S bash -i | |
STASH=~/.secrets | |
RZ="\e[0m" | |
GR="\e[92m" | |
RD="\e[91m" | |
HL="\e[1m" | |
mkdir $STASH &> /dev/null | |
chmod 700 $STASH | |
if [ ! -z "$1" ]; then |
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/python3.7 | |
from functools import reduce | |
push_to_stack=object() | |
stack=[] | |
OP="+/-*" | |
all_true=lambda x: True | |
def crush_stack(): | |
global stack |