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/a/2916320/3397171 | |
# http://stackoverflow.com/a/8256424/3397171 | |
pip install --install-option="--prefix=$PREFIX_PATH" git+git://github.com/PyMVPA/PyMVPA.git@somebranch | |
PYTHONPATH=$PREFIX_PATH/lib/python2.7/site-packages/ python some_script.py |
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
module avail | |
module list | |
module initadd python/2.7.6 | |
module load python/2.7.6 | |
nodestat | |
qshow | |
showq -u someone # In case your job is blocked. | |
myjobs |
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
#!/usr/bin/env python | |
import numpy as np | |
from scipy.optimize import minimize | |
def cost_function(x): | |
return (x[0]-3)**2 + (x[1]-2)**2 | |
x0 = [0, 0] # initial guess | |
method = 'nelder-mead' | |
res = minimize(cost_function, x0, method=method, |
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
#!/usr/bin/env python | |
""" | |
Enable debugging from commond line: | |
MVPA_DEBUG_METRICS=pid,asctime,reltime MVPA_DEBUG=SLC.* python some_script.py | |
""" | |
## kNN | |
kNN(k=2, dfx=<function squared_euclidean_distance>, voting='weighted') | |
""" |