<commit_before>#!/usr/bin/env bash
cd "$(dirname "${BASH_SOURCE}")";

wget https://repo.continuum.io/archive/Anaconda3-4.4.0-MacOSX-x86_64.sh

# Install in batch mode
bash Anaconda3-4.4.0-MacOSX-x86_64.sh -b

# Install in a batch mode required to add path
export PATH="~/anaconda3/bin:$PATH"

# add path to ~/.path
echo # For anaconda >> ~/.path
echo export PATH='~/anaconda3/bin:$PATH' >> ~/.path


# Update anaconda root enviroment to the latest
conda update -y --all

# Clean old packages and free memory
conda clean -y --all

# Install importent packages
conda install -y future

brew install ta-lib

###############################################################################
# We installing the enviroment using conda & pip
# But: We also provide enviroment.yml for creating
###############################################################################
# Python 3 Virtual Enviroment                                                 #
###############################################################################

echo "------------------------------"
echo "Setting up py36 virtual environment."

conda env create -f conda_py36.yml

#conda create --name py36 python=3.6
source activate py36

# For python 3.6
# http://pytorch.org/
pip install http://download.pytorch.org/whl/torch-0.1.12.post2-cp36-cp36m-macosx_10_7_x86_64.whl
pip install torchvision

git clone --recursive https://github.com/dmlc/xgboost
cd xgboost; cp make/minimum.mk ./config.mk; make -j4

cd python-package; python setup.py install
cd ../..

#
###############################################################################

brew install cmake pkg-config
brew install jpeg libpng libtiff openexr
brew install eigen tbb
brew install gtk+3 boost
#brew cask install xquartz

#brew tap homebrew/science
#brew install opencv3 --with-contrib --with-python3

###############################################################################



###############################################################################
# Python 2.7
###############################################################################
# conda create -n py27 python=2.7
conda env create -f conda_py27.yml
source activate py27


pip install http://download.pytorch.org/whl/torch-0.1.12.post2-cp27-none-macosx_10_7_x86_64.whl
pip install torchvision
# OSX Binaries dont support CUDA, install from source if CUDA is needed

pip install http://download.pytorch.org/whl/torch-0.1.12.post2-cp27-none-macosx_10_7_x86_64.whl
pip install torchvision
# OSX Binaries dont support CUDA, install from source if CUDA is needed

# git clone --recursive https://github.com/dmlc/xgboost
cd xgboost; cp make/minimum.mk ./config.mk; make -j4

cd python-package; python setup.py install
cd ../..


# Clean up
rm -Rf xgboost


###############################################################################
# Install IPython Profile
###############################################################################

echo "------------------------------"
echo "Installing IPython Notebook Default Profile"

# Add the IPython profile
mkdir -p ~/.ipython
cp -r ../init/profile_default/ ~/.ipython/profile_default


#    If this is your first install of dbus, automatically load on login with:
#        mkdir -p ~/Library/LaunchAgents
#        cp /Users/shmuelm/anaconda3/envs/py36/org.freedesktop.dbus-session.plist ~/Library/LaunchAgents/
#        launchctl load -w ~/Library/LaunchAgents/org.freedesktop.dbus-session.plist
#
#    If this is an upgrade and you already have the org.freedesktop.dbus-session.plist loaded:
#        launchctl unload -w ~/Library/LaunchAgents/org.freedesktop.dbus-session.plist
#        cp /Users/shmuelm/anaconda3/envs/py36/org.freedesktop.dbus-session.plist ~/Library/LaunchAgents/
#        launchctl load -w ~/Library/LaunchAgents/org.freedesktop.dbus-session.plist

conda clean -y --all

echo "#"
echo "# To activate python 2.7 environment, use:"
echo "# > source activate py27"
echo "#"
echo "# To activate python 3.6 environment, use:"
echo "# > source activate py36"
echo "#"
echo "# To deactivate an active environment, use:"
echo "# > source deactivate"
echo "#"
<commit_msg>update cleanup<commit_after>#!/usr/bin/env bash
cd "$(dirname "${BASH_SOURCE}")";

wget https://repo.continuum.io/archive/Anaconda3-4.4.0-MacOSX-x86_64.sh

# Install in batch mode
bash Anaconda3-4.4.0-MacOSX-x86_64.sh -b

# Install in a batch mode required to add path
export PATH="~/anaconda3/bin:$PATH"

# add path to ~/.path
echo # For anaconda >> ~/.path
echo export PATH='~/anaconda3/bin:$PATH' >> ~/.path


# Update anaconda root enviroment to the latest
conda update -y --all

# Clean old packages and free memory
conda clean -y --all

# Install importent packages
conda install -y future

brew install ta-lib

###############################################################################
# We installing the enviroment using conda & pip
# But: We also provide enviroment.yml for creating
###############################################################################
# Python 3 Virtual Enviroment                                                 #
###############################################################################

echo "------------------------------"
echo "Setting up py36 virtual environment."

conda env create -f conda_py36.yml

#conda create --name py36 python=3.6
source activate py36

# For python 3.6
# http://pytorch.org/
pip install http://download.pytorch.org/whl/torch-0.1.12.post2-cp36-cp36m-macosx_10_7_x86_64.whl
pip install torchvision

git clone --recursive https://github.com/dmlc/xgboost
cd xgboost; cp make/minimum.mk ./config.mk; make -j4

cd python-package; python setup.py install
cd ../..

#
###############################################################################

brew install cmake pkg-config
brew install jpeg libpng libtiff openexr
brew install eigen tbb
brew install gtk+3 boost
#brew cask install xquartz

#brew tap homebrew/science
#brew install opencv3 --with-contrib --with-python3

conda clean -y --all

###############################################################################
# Python 2.7
###############################################################################
# conda create -n py27 python=2.7
conda env create -f conda_py27.yml
source activate py27


pip install http://download.pytorch.org/whl/torch-0.1.12.post2-cp27-none-macosx_10_7_x86_64.whl
pip install torchvision
# OSX Binaries dont support CUDA, install from source if CUDA is needed

pip install http://download.pytorch.org/whl/torch-0.1.12.post2-cp27-none-macosx_10_7_x86_64.whl
pip install torchvision
# OSX Binaries dont support CUDA, install from source if CUDA is needed

# git clone --recursive https://github.com/dmlc/xgboost
cd xgboost; cp make/minimum.mk ./config.mk; make -j4

cd python-package; python setup.py install
cd ../..


# Clean up
rm -Rf xgboost
conda clean -y --all

###############################################################################
# Install IPython Profile
###############################################################################

echo "------------------------------"
echo "Installing IPython Notebook Default Profile"

# Add the IPython profile
mkdir -p ~/.ipython
cp -r ../init/profile_default/ ~/.ipython/profile_default


#    If this is your first install of dbus, automatically load on login with:
#        mkdir -p ~/Library/LaunchAgents
#        cp /Users/shmuelm/anaconda3/envs/py36/org.freedesktop.dbus-session.plist ~/Library/LaunchAgents/
#        launchctl load -w ~/Library/LaunchAgents/org.freedesktop.dbus-session.plist
#
#    If this is an upgrade and you already have the org.freedesktop.dbus-session.plist loaded:
#        launchctl unload -w ~/Library/LaunchAgents/org.freedesktop.dbus-session.plist
#        cp /Users/shmuelm/anaconda3/envs/py36/org.freedesktop.dbus-session.plist ~/Library/LaunchAgents/
#        launchctl load -w ~/Library/LaunchAgents/org.freedesktop.dbus-session.plist

source deactivate
conda clean -y --all

echo "#"
echo "# To activate python 2.7 environment, use:"
echo "# > source activate py27"
echo "#"
echo "# To activate python 3.6 environment, use:"
echo "# > source activate py36"
echo "#"
echo "# To deactivate an active environment, use:"
echo "# > source deactivate"
echo "#"

{'fraction_non_alphanumeric': 0.26717464925012097, 'fraction_numerical': 0.025157232704402517, 'mean_word_length': 4.00544794188862, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 17, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '471048', 'n_tokens_mistral': 2631, 'n_tokens_neox': 2449, 'n_words': 697}