Skip to content

Instantly share code, notes, and snippets.

Avatar

Allan L. R. Hansen AllanLRH

  • Copenhagen, Denmark
View GitHub Profile
@AllanLRH
AllanLRH / Vitual keystroke example
Created May 17, 2017 — forked from chriskiehl/Vitual keystroke example
Python win32api simple Vitual keystroke example
View 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 Apr 7, 2017 — forked from nimezhu/plotCausalGraph.py
plot directed graph (python matplotlib)
View plotCausalGraph.py
#!/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 Dec 18, 2015 — forked from djsutherland/latex-clean.sh
Bash script for cleaning up after a LaTeX run
View latex-clean.sh
#!/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
You can’t perform that action at this time.