Skip to content

Instantly share code, notes, and snippets.

View MikiDi's full-sized avatar

Michaël Dierick MikiDi

View GitHub Profile
@MikiDi
MikiDi / mdb2sql.sh
Last active October 24, 2015 12:21 — forked from turicas/mdb2sql.sh
Convert a MDB (Access) file to SQL
#!/bin/bash
# Convert a MDB file (Access) to SQL
# Needs mdbtools[http://mdbtools.sourceforge.net/]
# run 'aptitude install mdbtools' on Debian/Ubuntu
# Created by Álvaro Justen <https://github.com/turicas>
# License: GPLv2
mdb=$1
sql=$2
@MikiDi
MikiDi / sort_grabresults.py
Created March 13, 2016 18:31
Script for sorting grab results produced by [ebusd](https://github.com/john30/ebusd)
#!/usr/bin/python3
import string
import sys
def read_commentfile(fn):
f = open(fn, 'r')
return [l.strip('\n') for l in f.readlines()]
def parse_commentlines(l_stream):#takes a stream of lines
grabs = []
@MikiDi
MikiDi / pythonize_iso_timestamp.py
Created December 27, 2019 11:58
Convert ISO 8601 timestamp to python .fromisoformat() -compliant format
#!/usr/bin/python3
import re
def pythonize_iso_timestamp(timestamp):
""" Convert ISO 8601 timestamp to python .fromisoformat()-compliant format """
# 'Z'-timezone to '+00:00'-timezone
timestamp = timestamp.replace('Z', '+00:00')
# '+0000'-timezone to '+00:00'-timezone
def repl(matchobj):
sign = matchobj.group(1)