Skip to content

Instantly share code, notes, and snippets.

View haehn's full-sized avatar
🤠

Daniel Haehn haehn

🤠
View GitHub Profile
@haehn
haehn / creative_commons_4_by_license.tex
Created January 12, 2019 21:23
Creative Commons Attribution 4.0 International Public License LaTeX Code
%
%
% Creative Commons Attribution 4.0 International Public License
% from: https://creativecommons.org/licenses/by/4.0/legalcode
%
\RequirePackage{enumitem} % we need this
\setlistdepth{9} % and this
\section{Creative Commons Attribution 4.0 International Public License}

Keybase proof

I hereby claim:

  • I am haehn on github.
  • I am haehn (https://keybase.io/haehn) on keybase.
  • I have a public key whose fingerprint is 848A E455 F72E 75BE 2776 C457 BFE5 EA96 3DA6 5BA3

To claim this, I am signing this object:

@haehn
haehn / trackvis.py
Last active December 17, 2015 13:49 — forked from satra/trackvis.py
import numpy as np
from nibabel import load
import nibabel.trackvis as nibtrk
# filename = "DeterministicTractography/QBALLRecon/hardiO10.trk"
trkfilename = "/software/data/STUT/DTI_TV/PWS04/dtk_35/dti_35.trk" #%hardiO10.trk_cross_streamline_id_20.trk"
trkfilename_out = "newtracks.trk"
bfilename = "/software/data/STUT/DTI_TV/PWS04/dt_recon/lowb.nii"
mrfilename = "/software/data/MIBR/data/PWS04/head.nii"
@haehn
haehn / gist:5614966
Created May 20, 2013 19:52
Load an ITK transform file in Python.
def readITKtransform( transform_file ):
'''
'''
# read the transform
transform = None
with open( transform_file, 'r' ) as f:
for line in f:
# check for Parameters:
@haehn
haehn / gist:1274156
Created October 9, 2011 20:50
Extract YouTube Annotations
import xml.dom.minidom
import urllib2
import sys
from urlparse import urlparse
from datetime import datetime
import time
def sort(adict):
''' sort a map by keys '''
items = adict.items()