Skip to content

Instantly share code, notes, and snippets.

View AllanLRH's full-sized avatar

Allan L. R. Hansen AllanLRH

  • Copenhagen, Denmark
View GitHub Profile
@AllanLRH
AllanLRH / Vitual keystroke example
Created May 17, 2017 08:21 — forked from chriskiehl/Vitual keystroke example
Python win32api simple Vitual keystroke example
#Giant dictonary to hold key name and VK value
VK_CODE = {'backspace':0x08,
'tab':0x09,
'clear':0x0C,
'enter':0x0D,
'shift':0x10,
'ctrl':0x11,
'alt':0x12,
'pause':0x13,
'caps_lock':0x14,
@AllanLRH
AllanLRH / plotCausalGraph.py
Created April 7, 2017 12:24 — forked from nimezhu/plotCausalGraph.py
plot directed graph (python matplotlib)
#!/usr/bin/python
# programmer : zhuxp
# usage:
import sys
from getopt import getopt
import networkx as nx
import matplotlib.pyplot as plt
def show_help():
print >>sys.stderr,"\n\nplotCausalGraph.py: drawing causal graph from LiNGAM output equation matrix B"
print >>sys.stderr,"Library Dependence: networkx , matplotlib\n\n"
@AllanLRH
AllanLRH / latex-clean.sh
Last active December 18, 2015 00:58 — forked from djsutherland/latex-clean.sh
Bash script for cleaning up after a LaTeX run
#!/bin/bash
exts=".ind .out .sync .idx .ilg .fls .log .aux .fdb_latexmk .bbl .blg .brf .lof .lol .lot .nav .snm .tdo .thm .toc .synctex.gz .run.xml -blx.bib"
for x in "${@:-.}"; do
arg=$(echo ${x:-.} | perl -pe 's/\.(tex|pdf)$//')
if [[ -d "$arg" ]]; then
for ext in $exts; do
rm -f "$arg"/*$ext