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 python3 -u | |
I_PREFER_MULTI_THREADING=1 | |
if I_PREFER_MULTI_THREADING: | |
from threading import Thread, Lock, Event | |
from queue import Queue | |
else: | |
from multiprocessing import Process as Thread, Lock, Event, Queue | |
from time import sleep |
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 bash | |
# https://gist.github.com/jul/e9dcfdfb2490f6df3930dfe8ee29ead1 | |
# WTFPL2.0 do WTF you want with the code except claiming paternity | |
# require ucspi-tcp http://cr.yp.to/ucspi-tcp/tcpserver.html | |
# server launched with tcpserver localhost 1234 ./pubsub.sh | |
# client launched with tcpclient localhost 1234 ./psclient.sh # https://gist.github.com/jul/e9dcfdfb2490f6df3930dfe8ee29ead1#file-psclient-sh | |
# TODO unsub | |
# TODO trap SIHGUP to make file rotations (avoiding to have to stop/start server to do so) |
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
digraph stronger_than { | |
# WTF Public License 2.0 do whatever you want with this code but claim it is yours | |
# v2 white text node & arial to ease the SVG tweaking to text shadows | |
concentrate=true | |
aggregate=true | |
fontname=Arial | |
label="Directed graph of vulnerabilities of pokemon by type" | |
labelloc=t | |
node [shape=rectangle] |
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 | |
SZ=15 | |
DIMX=60 | |
DIMY=80 | |
can = sg.Canvas(size=(DIMX*SZ*1.01,DIMY*SZ*.87)) | |
status=sg.Text('status') | |
win = sg.Window("titre",[[can,],[status,],], finalize=True) | |
c = can.TKCanvas |
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 bash | |
set -e | |
declare -a action; | |
DEBUG=1 | |
RD='\e[31m' | |
GB='\e[33m' | |
BL='\e[34m' | |
GR='\e[0;90m\e[1;47m' | |
RZ='\e[0m' |
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 | |
import os | |
import psycopg2 | |
from datetime import date, datetime, timedelta | |
from archery import mdict | |
def int_env_default(var, default): | |
return int(os.getenv(var) or default) |
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 | |
# -*- coding: utf-8 -*- | |
# WTFPL 2.0 do whatever the freak you want with this code except claiming its yours. | |
#!/usr/bin/env python3 | |
from random import shuffle | |
import PySimpleGUI as sg | |
N=5 | |
M=4 | |
first = True |
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 | |
# requires pip install multipart | |
import multipart | |
from wsgiref.simple_server import make_server | |
from json import dumps | |
from urllib.parse import parse_qsl | |
# require pip install confined my OWN FORTH BASED templating SYNTAX | |
from confined import templatize | |
class e: a=0 |
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 multipart | |
from wsgiref.simple_server import make_server | |
from json import dumps | |
from urllib.parse import parse_qsl | |
import logging | |
def simple_app(environ, start_response): | |
fo,fi=multipart.parse_form_data(environ) |
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 bash | |
# author julien@tayon.net | |
# licence WTFPL2.0 | |
WORKDIR=./__ | |
WVENVDIR=todel | |
GRUIK= | |
PYTHON= | |
export WVENVDIR | |
UPGRADE_PIP=hygien | |
TO_KEEP_OR_NOT_TO_KEEP="DONT_KEEP" |
NewerOlder