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
-- show tables | |
SELECT * FROM pg_catalog.pg_tables; | |
-- describe table | |
select column_name, data_type, character_maximum_length from INFORMATION_SCHEMA.COLUMNS where table_name = 'tablename'; |
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
jupyter nbconvert --to script config_template.ipynb |
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 cp jupyter.service /usr/lib/systemd/system/ | |
sudo systemctl enable jupyter.service | |
sudo systemctl daemon-reload | |
sudo systemctl restart jupyter.service | |
journalctl -u jupyter > /tmp/test.txt && cat /tmp/test.txt |
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
[Unit] | |
Description=Jupyter Notebook | |
[Service] | |
Type=simple | |
PIDFile=/run/jupyter.pid | |
# Step 1 and Step 2 details are here.. | |
# ------------------------------------ | |
ExecStart=/usr/local/bin/jupyter notebook --ip=0.0.0.0 --no-browser | |
User=ubuntu |
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 jupyter notebook --allow-root --ip=0.0.0.0 --port=80 --no-browser |
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
*~ | |
.settings | |
.project | |
.factorypath | |
.cache | |
.classpath | |
.tmpBin | |
*.pyc | |
.cache-main | |
.pydevproject |
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
dd if=/dev/urandom of=/dev/sdX bs=1M |
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
JOBID=`cat /dev/urandom | tr -dc 'a-zA-Z' | fold -w 10 | head -n 1` | |
gcloud ml-engine jobs submit training $JOBID \ | |
--module-name=$MODULE \ | |
--region=us-central1 \ | |
--package-path=$PACKAGE \ | |
--job-dir=$BUCKET \ | |
--project=$PROJECT \ | |
--scale-tier=basic_gpu | |
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
cat /dev/urandom | tr -dc 'a-zA-Z' | fold -w 10 | head -n 1 |
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
from sklearn.linear_model import LogisticRegression | |
from sklearn.neighbors import KNeighborsClassifier | |
from sklearn.svm import SVC | |
from sklearn.gaussian_process import GaussianProcessClassifie | |
from sklearn.ensemble import RandomForestClassifier | |
from sklearn.neural_network import MLPClassifier | |
from sklearn.ensemble import AdaBoostClassifier | |
from sklearn.naive_bayes import GaussianNB | |
from sklearn.discriminant_analysis import QuadraticDiscriminantAnalysis |