Want to move computation on machine with much power. We will set up Anaconda 4.0.0 and XGBoost 0.4 (it is tricky installable).
- Amazon AWS Educate gives 100$ for MIPT students.
- GitHub Students Pack additionaly gives 15$.
| sudo apt-get update | |
| sudo apt install python-pip | |
| python3 --version | |
| sudo apt-get install -y python3-pip | |
| sudo apt-get install build-essential libssl-dev libffi-dev python-dev | |
| # For virtual Environment | |
| sudo apt-get install -y python3-ven |
| """ | |
| A weighted version of categorical_crossentropy for keras (2.0.6). This lets you apply a weight to unbalanced classes. | |
| @url: https://gist.github.com/wassname/ce364fddfc8a025bfab4348cf5de852d | |
| @author: wassname | |
| """ | |
| from keras import backend as K | |
| def weighted_categorical_crossentropy(weights): | |
| """ | |
| A weighted version of keras.objectives.categorical_crossentropy | |
| class BaseTrainingPipeline(): | |
| def load_data(self, filepath, task_id): | |
| """ | |
| Method to load training data | |
| :return: Loaded dataframe | |
| """ | |
| def form_training_dataset(self, raw_df, task_id): | |
| """ |
| if [ -z "$1" ]; then | |
| shot_path=$(date +%Y-%m-%d-%H-%M-%S).mp4 | |
| else | |
| shot_path="$*" | |
| fi | |
| ffmpeg="ffmpeg" | |
| n6_frame="n6-background.png" | |
| trap ctrl_c INT |
Want to move computation on machine with much power. We will set up Anaconda 4.0.0 and XGBoost 0.4 (it is tricky installable).
| import numpy as np | |
| from keras.models import Sequential | |
| from keras.layers.core import Activation, Dense | |
| training_data = np.array([[0,0],[0,1],[1,0],[1,1]], "float32") | |
| target_data = np.array([[0],[1],[1],[0]], "float32") | |
| model = Sequential() | |
| model.add(Dense(32, input_dim=2, activation='relu')) | |
| model.add(Dense(1, activation='sigmoid')) |
| $(function(){ | |
| var formUrl = '/* ex: https://docs.google.com/a/developmentseed.org/spreadsheet/formResponse?formkey=... */'; | |
| // Set up map | |
| var m = mapbox.map('map').addLayer(mapbox.layer().id(' /* mapbox-account.id */ ')); | |
| // Set up map ui features with point selector | |
| var ui = mapbox.ui().map(m).auto().pointselector(function(d) { | |
| // Remove all points except the most recent |