conda create -n py27 python=2.7
activate py27
conda install -c intel mkl
conda install numpy scipy six
pip install nibabel
conda install -c conda-forge dipy
pip install https://github.com/samuelstjean/spams-python/releases/download/v2.6/spams-2.4-cp27-none-win_amd64.whl
pip install git+https://github.com/daducci/AMICO.git
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 psycopg2 | |
import psycopg2.extensions | |
from select import select | |
from twisted.internet import threads | |
class AsyncNotify(): | |
""" | |
based on http://divillo.com/, adapted to newer psycopg version | |
Class to trigger a function via PostgreSQL NOTIFY messages. |
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
#cancel consuming from queue | |
import traceback | |
from foo import app | |
import celery | |
ds = [] | |
activate =app.control.inspect().active() | |
while activate is None: | |
activate =app.control.inspect().active() |
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 | |
import os | |
os.environ['CUDA_VISIBLE_DEVICES'] = '' | |
import pandas as pd | |
import numpy as np | |
from keras import optimizers | |
from keras.utils import to_categorical | |
from keras.models import Model | |
from keras.layers import Input, Dense |
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
sudo su - | |
# go to system root, cd .. | |
mkdir /opt/anaconda3 | |
# installed anaconda to /opt/anaconda3 | |
bash /Temp/Anaconda3-5.1.0-Linux-x86_64.sh | |
# create py 3.6 | |
/opt/anaconda3/bin/conda create -p /opt/envs/conda/py36 python=3.6 | |
# activate py 3.6 | |
source /opt/anaconda3/bin/activate /opt/envs/conda/py36 | |
# install prebuilt vtk for offscreen rendering |
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 | |
set -e | |
g++ -o test_offscreen.o -c test_offscreen.cpp -I$PYTHONHPC/include/vtk-6.0 | |
g++ -o test_offscreen test_offscreen.o $PYTHONHPC/lib/libvtk*.so | |
LD_LIBRARY_PATH=$PYTHONHPC/lib/ ./test_offscreen |
- follow https://github.com/awslabs/amazon-sagemaker-examples/tree/master/advanced_functionality/scikit_bring_your_own
- prior building and pushing docker container manually create ECR, and create role for sagemaker (https://console.aws.amazon.com/ecs)
- TODO: -- invocation with cli or http -- authentication required https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html -- potential alternative? https://medium.com/@julsimon/using-chalice-to-serve-sagemaker-predictions-a2015c02b033
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
_BrBG_data = ( | |
(0.32941176470588235, 0.18823529411764706, 0.0196078431372549 ), | |
(0.5490196078431373 , 0.31764705882352939, 0.0392156862745098 ), | |
(0.74901960784313726, 0.50588235294117645, 0.17647058823529413), | |
(0.87450980392156863, 0.76078431372549016, 0.49019607843137253), | |
(0.96470588235294119, 0.90980392156862744, 0.76470588235294112), | |
(0.96078431372549022, 0.96078431372549022, 0.96078431372549022), | |
(0.7803921568627451 , 0.91764705882352937, 0.89803921568627454), | |
(0.50196078431372548, 0.80392156862745101, 0.75686274509803919), |
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
<!DOCTYPE html> | |
<html> | |
<style> | |
body { | |
font-family: Helvetica Neue, Arial, sans-serif; | |
text-align: center; | |
} | |
.wrapper { | |
max-width: 800px; | |
margin: 50px auto; |
OlderNewer