Skip to content

Instantly share code, notes, and snippets.

View matee911's full-sized avatar
🏠
Working from home

Mateusz Pawlik matee911

🏠
Working from home
View GitHub Profile
url = BASE_URL + method
payload = {'nonce': get_nonce()}
payload.update(kwargs)
post_data = urllib.urlencode(payload)
sign = hmac.new(
SECRET.decode('base64'),
post_data,
hashlib.sha512).digest()

Description

This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

#!/bin/bash
convert $1 -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 $2

Results

def lagger(minimum=0.1, maximum=15):
steps = 3.0
t = minimum
p = (maximum-t)/steps
value = None
while True:
value = yield t
if t < maximum:
t += p
if value is not None and value == 'reset':