Skip to content
Switch branches/tags
Go to file
Cannot retrieve contributors at this time
# figure out why people put this shit here
#!/usr/bin/env bash <--- why?
# Installation Instructions
# 1. download scripts
# wget
# wget
# 2. make it executable
# chmod a+x
# 3. Run it
# ./
# sets LC_ALL environment variable - Ubuntu server often does not specify this
export LC_ALL="en_US.UTF-8"
# updates apt repository index
sudo apt -y update
# install linux functionality
sudo apt install -y git-all curl
# installs pip3
sudo apt install -y python3-pip
# installs virtualenv
pip3 install virtualenv
pip3 install virtualenvwrapper
echo "
export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3.5
" | sudo tee -a ~/.bashrc
export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3.5
echo "
export WORKON_HOME=$HOME/.virtualenvs
export PROJECT_HOME=$HOME/Projects
source $HOME/.local/bin/
" | sudo tee -a ~/.profile
export WORKON_HOME=$HOME/.virtualenvs
export PROJECT_HOME=$HOME/Projects
source $HOME/.local/bin/
# create & activate virtual environment
mkvirtualenv data-science
# start installing base stack
# edit this line for installing additional packages
pip install jupyter matplotlib numpy pandas scipy seaborn sklearn statsmodels
# project management
pip install cookiecutter
# text processing stack
pip install nltk gensim
# installing XGBoost
cd $HOME
git clone --recursive
cd xgboost
make -j4
cd python-package
python install
echo "
export PYTHONPATH=~/xgboost/python-package
" | sudo tee -a ~/.bashrc
export PYTHONPATH=~/xgboost/python-package
# setting up Jupyter notebook
cd $HOME
echo "Create Jupyter password"
echo "---"
read -p "Input password for Jupyter notebook: " passwd
read -p "Please confirm password: " passwd_confirm
while [ "$passwd" != "$passwd_confirm" ]
echo "***"
read -s -p "Passwords do not match. Please input password: " passwd
read -s -p "Please confirm password: " passwd_confirm
ipython $passwd
passwd_hash=$(cat $passwd_file)
rm $passwd_file
mkdir $HOME/.certs
cd $HOME/.certs
sudo openssl req -x509 -nodes -days 365 -newkey rsa:1024 -keyout $path_to_pem -out $path_to_pem
jupyter notebook --generate-config
echo "
c = get_config()
c.IPKernelApp.pylab = 'inline'
c.NotebookApp.certfile = u'/home/ubuntu/.certs/jupyter.pem'
c.NotebookApp.ip = '*'
c.NotebookApp.open_browser = False
c.NotebookApp.password = u'$passwd_hash'
c.NotebookApp.port = 8888
" | sudo tee -a $jupyter_config
### setting up git
read -p "Input GitHub username: " $github_username
git config --global "$github_username"
read -p "Input Github email address: " $github_email
git config --global "$github_email"
git config --global core.editor vi