Skip to content

Instantly share code, notes, and snippets.

@tkan
tkan / get_humble_order.py
Last active August 29, 2018 08:25
Get all files of humble book bundles via python
#!/usr/bin/python
# -*- coding: utf-8 -*-
import sys
import urllib, json, time
'''
Download your order from Humble Bundle.
* Usage:
@tkan
tkan / timetrack.py
Last active November 10, 2017 08:59
A small project to get a digital punch clock where the face serves as fist
from PIL import Image
import face_recognition
import time
import datetime
import sqlite3
from sqlite3 import Error
import os
import logging
import subprocess
import RPi.GPIO as GPIO
import time
import datetime
import sqlite3
from sqlite3 import Error
import os
import logging
text_file = os.path.join(os.path.dirname(os.path.realpath(__file__)), "last_move.txt")
@tkan
tkan / mundraeuber.py
Last active October 3, 2017 13:59
Mundraub.org shows plants in common land which can be freely harvested. This small script will harvest the data from Mundraub.org in a (hopefully) friendly way. It will output GeoJSON which can be easily transfered to GPX, SHP or whatnot. How to get the inital JSON is a small riddle for the user itself.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from geojson import Feature, Point, FeatureCollection
from lxml import etree, html
from urllib2 import urlopen
import re
from tqdm import *
@tkan
tkan / icalParseRTM.py
Last active August 6, 2018 11:18
RememberTheMilk - iCal duration/time-estimate parser
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Small script for parsing the time estate to a correctly displayed enddate in ICS format.
Please do 'pip install ics' before using."""
# Python 2 and 3 switch for importing urllib
try:
from urllib.request import urlopen
except ImportError:
from urllib2 import urlopen
@tkan
tkan / index.php
Last active August 17, 2016 17:52
Remember The Milk - Show work progress
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Doing</title>
<!--
uncomment if you'd like an favicon
<link rel="shortcut icon" href="//i.imgur.com/MLB8ZWH.png">
-->
<link rel="stylesheet" type="text/css" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.6.0/pure.css">