This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/opt/conda/bin/python | |
""" | |
Convert files to json objects uploadable to GitHub gists using: | |
curl -v -H "Authorization: token <insert token here>" -X POST https://api.github.com/gists --data @<filename.json> | |
""" | |
import sys | |
import json |
This file has been truncated, but you can view the full file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nose.config: INFO: Ignoring files matching ['^\\.', '^_', '^setup\\.py$'] | |
nose.plugins.cover: INFO: Coverage report will include only packages: ['nipype'] | |
nose.selector: INFO: /root/src/nipype/nipype/interfaces/tests/use_resources is executable; skipped | |
/root/src/nipype/nipype/workflows/dmri/mrtrix/group_connectivity.py:15: UserWarning: cmp not installed | |
warnings.warn('cmp not installed') | |
Doctest: nipype.algorithms.mesh ... ok | |
Doctest: nipype.algorithms.metrics ... ok | |
Doctest: nipype.algorithms.metrics.ErrorMap ... ok | |
Doctest: nipype.algorithms.metrics.FuzzyOverlap ... ok | |
Doctest: nipype.algorithms.metrics.Overlap ... ok |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh | |
# | |
# Author: Andreas Olsson <[email protected]> | |
# Version: @(#)autossh_tunnel.foo 0.1 27-Aug-2008 [email protected] | |
# | |
# For each tunnel; make a uniquely named copy of this template. | |
## SETTINGS | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Usage: python remove_output.py notebook.ipynb [ > without_output.ipynb ] | |
Modified from remove_output by Minrk | |
""" | |
import sys | |
import io | |
import os | |
from IPython.nbformat.current import read, write |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# A universal helper to enable NeuroDebian repository for a travis | |
# environment. | |
# | |
# Its purpose to remove all repetative actions from various .travis.yml spread | |
# across projects and gain control in the future to point to an alternative, | |
# more appropriate for travis deployments, mirror. | |
# for the protocol |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// -------------------------------------------------------------------------------------- | |
// File: slice_contours.cxx | |
// Date: Nov 18, 2014 | |
// Author: [email protected] (Oscar Esteban) | |
// Version: 1.0 beta | |
// License: GPLv3 - 29 June 2007 | |
// Short Summary: | |
// -------------------------------------------------------------------------------------- | |
// | |
// Copyright (c) 2014, [email protected] (Oscar Esteban) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 4mm scale | |
setscale 4 | |
setoption smoothing 6 | |
setoption paramsubset 1 0 0 0 0 0 0 1 1 1 1 1 1 | |
clear U | |
clear UA | |
clear UB | |
clear US | |
clear UP | |
# try the identity transform as a starting point at this resolution |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 4mm scale | |
setscale 4 | |
setoption smoothing 6 | |
clear U | |
clear UA | |
clear UB | |
clear US | |
clear UP | |
# try the identity transform as a starting point at this resolution | |
clear UQ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#http://stackoverflow.com/questions/15880367/python-uniform-distribution-of-points-on-4-dimensional-sphere | |
dim = 3 | |
norm = np.random.normal | |
normal_deviates = norm(size=(dim, N)) | |
radius = np.sqrt((normal_deviates**2).sum(axis=0)) | |
points = normal_deviates/radius | |
points = points.reshape(-1,3) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# http://surfer.nmr.mgh.harvard.edu/fswiki/FreeSurferTrackVisTransforms | |
tkr1_tfm = fsbt.mri_info( op.join( tpms_dir, 'wm_volume_fraction.nii.gz' ), 'vox2ras-tkr' ) | |
r2v_tfm = fsbt.mri_info( op.join( tpms_dir, 'wm_volume_fraction.nii.gz' ), 'ras2vox' ) | |
tkr2_tfm = fsbt.mri_info( op.join( tpms_dir, 'wm_volume_fraction.nii.gz' ), 'ras2vox-tkr' ) | |
v2r_tfm = fsbt.mri_info( op.join( tpms_dir, 'wm_volume_fraction.nii.gz' ), 'vox2ras' ) | |
tfm = np.dot( tkr2_tfm, v2r_tfm ) | |
M = tfm[0:3,0:3] | |
O = tfm[0:3,3] |