Skip to content

Instantly share code, notes, and snippets.

View ap--'s full-sized avatar
🪐

Andreas Poehlmann ap--

🪐
View GitHub Profile
@ap--
ap-- / binary-wheels.zip
Last active August 29, 2015 14:15
SB-Binary-dep-33-x64
This file has been truncated, but you can view the full file.
@ap--
ap-- / binary-wheels.zip
Last active August 29, 2015 14:15
SB-Binary-dep-33-win32
This file has been truncated, but you can view the full file.
@ap--
ap-- / binary-wheels.zip
Last active August 29, 2015 14:15
SB-Binary-dep-27-x64
This file has been truncated, but you can view the full file.
@ap--
ap-- / binary-wheels.zip
Last active August 29, 2015 14:15
SB-Binary-dep-27-win32
This file has been truncated, but you can view the full file.
@ap--
ap-- / unnumpyfy
Last active August 29, 2015 14:11
scipy.io.loadmat to a nicer format.
# When loading data with scipy.io.loadmat the information is terribly deep encapsulated in structured arrays.
# This function returns some nice simplified python types.
def unnumpyfy(arr):
if isinstance(arr, (np.ndarray,)):
if arr.dtype == np.dtype('O') or arr.dtype.names is None:
try:
return unnumpyfy(arr.item())
except ValueError:
tmplist = arr.squeeze()
@ap--
ap-- / docx2md
Created July 17, 2014 08:18
Convert Docx to Markdown using calibre
#!/bin/bash
CDIR=`pwd`
TDIR=`mktemp -d`
DOCXFN=$(basename "$1")
MDFN=${DOCXFN%.docx}.md
echo "Converting: $DOCXFN"
cp "$1" $TDIR
cd $TDIR
ebook-convert $DOCXFN output.htmlz
unzip output.htmlz
@ap--
ap-- / onlinetex
Last active December 19, 2015 13:29
python command line tool for compiling tex documents to pdf online.
#!/usr/bin/env python
import requests
def compile2pdf(ifile, ofile):
"""
Sends the tex file to sciencesoft.at and compiles it to pdf.
requires two file objects.
"""