Skip to content

Instantly share code, notes, and snippets.

View samuelstjean's full-sized avatar

Samuel St-Jean samuelstjean

View GitHub Profile
@samuelstjean
samuelstjean / test.py
Last active July 18, 2020 19:41
loky and pyinstaller test issues
#!/usr/bin/env python
import argparse
import numpy as np
from multiprocessing import freeze_support
from joblib import Parallel, delayed, parallel_backend
# this works
backend1 = 'threading'
@samuelstjean
samuelstjean / strip_comments_from_nifti.py
Created May 31, 2017 18:07
Remove the comments field from a nifti file
#! /usr/bin/env python
import nibabel as nib
import sys
if len(sys.argv) <= 2:
print('Usage : strip_comments_from_nifti.py input_file output_file')
exit()
infile, outfile = sys.argv[1:]
@samuelstjean
samuelstjean / bench_hyp1f1.ipynb
Last active April 8, 2017 07:36
benchmark gsl hyp1f1 vs scipy hyp1f1
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@samuelstjean
samuelstjean / onimage.dtx
Last active August 29, 2015 14:19
onimage latex class to use tikz in a relative coordinate system
% Sam : Original is hosted here https://code.launchpad.net/~tex-sx/tex-sx/development
% run latex/pdflatex on the dtx file to produce the class file
% \iffalse meta-comment
%<*internal>
\def\nameofplainTeX{plain}
\ifx\fmtname\nameofplainTeX\else
\expandafter\begingroup
\fi
%</internal>