(really) simple thread example in python

# it will calculate the md5sum of # all files in the arborescence from threading import Thread import subprocess import os def slowthing(i): cmd = [“md5sum”, i] print(cmd) subprocess.call(cmd) for i,j,k in os.walk(“.”): for l in k: each = os.path.join(i,l) t = Thread(target=slowthing, args=(each,)) t.start() you can clone/download here: https://gist.github.com/tatic0/51012c9edb66742ee1435ea6f4b9e9a7 # it will calculate the […]

streaming from a raspberry-pi picamera to homeassistant

rpi raspivid -rot 180 -t 0 -n –width 640 –height 480 -o – | cvlc stream:///dev/stdin –sout ‘#standard{access=http,mux=ts,dst=:8090}’ :demux=h264 home assistant camera: – platform: ffmpeg input: http://192.168.0.145:8090 You will need to install vlc-nox in the rpi, in single cpu version it really slow, do it before you go to sleep. rpi raspivid -rot 180 -t […]

homemade colored yogurt

you need: – a yogurt-maker – color dye and some creativity – milk (prefer whole over skimmed) – update, tested with 0% fat skimmed milk and good results. – yogurt starter use 3 or 4 drops of food dye, 15h in the yogurt maker, enjoy! Skimmed milk works, too you need: – a yogurt-maker – […]