This file contains 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: | |
Slicer --python-script nrrd2nifti.py --no-splash --no-main-window -- Segmentation.seg.nrrd | |
""" | |
import os | |
import sys | |
if len(sys.argv) == 1: |
This file has been truncated, but you can view the full file.
This file contains 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
- anat: s3://fcp-indi/data/Projects/ABIDE/RawDataBIDS/CMU_a/sub-0050642/anat/sub-0050642_T1w.nii.gz | |
creds_path: null | |
func: | |
rest_run-1: | |
scan: s3://fcp-indi/data/Projects/ABIDE/RawDataBIDS/CMU_a/sub-0050642/func/sub-0050642_task-rest_run-1_bold.nii.gz | |
scan_parameters: | |
AcquisitionDuration: !!binary | | |
ODowNg== | |
AcquisitionMatrix: !!binary | |
This file contains 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
import io | |
import base64 | |
import numpy as np | |
from IPython.core.display import HTML | |
from scipy.io import loadmat, wavfile | |
data = loadmat('./sounds.mat')['sounds'] | |
test = loadmat('./icaTest.mat') | |
def player(wave, bitrate=11025): |
This file contains 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
# DOWNLOAD: | |
# curl -O http://yann.lecun.com/exdb/mnist/train-images-idx3-ubyte.gz | |
# curl -O http://yann.lecun.com/exdb/mnist/train-labels-idx1-ubyte.gz | |
# curl -O http://yann.lecun.com/exdb/mnist/t10k-images-idx3-ubyte.gz | |
# curl -O http://yann.lecun.com/exdb/mnist/t10k-labels-idx1-ubyte.gz | |
# USAGE: | |
# TrD = TrainData() # or TestData | |
# X, y = TrD[0:1000] # get first 1000 images | |
# X, y = TrD[:] # get 'em all |
This file contains 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
def anicor(matrix1, matrix2): | |
d1 = matrix1.shape[-1] | |
d2 = matrix2.shape[-1] | |
def zscore(data, axis): | |
data -= data.mean(axis=axis,keepdims=True) | |
data /= data.std(axis=axis,keepdims=True) | |
return np.nan_to_num(data, copy=False) | |
assert d1 == d2 |
This file contains 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 | |
echo '{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Effect": "Allow", | |
"Principal": { "Service": "ec2.amazonaws.com"}, | |
"Action": "sts:AssumeRole" | |
} |
This file contains 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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
def compositions(l, init=None): | |
# Use init argument or | |
# start an empty list (for the first list) | |
init = init or [] | |