<commit_before>#!/usr/bin/env bash

export DEBIAN_FRONTEND=noninteractive
pwd
# install python3.4
sudo add-apt-repository -y ppa:fkrull/deadsnakes
sudo apt-get update
sudo apt-get install -y python3.4
# fetch network_manager.py
curl https://raw.githubusercontent.com/GianlucaBortoli/krafters/master/network_manager.py > network_manager.py
sudo chmod 777 network_manager.py
# fetch test_daemon.py
curl https://raw.githubusercontent.com/GianlucaBortoli/krafters/master/test_daemon.py > test_daemon.py
sudo chmod 777 test_daemon.py
curl https://raw.githubusercontent.com/GianlucaBortoli/krafters/master/test_daemon2.py > test_daemon2.py
sudo chmod 777 test_daemon2.py
# fetch configure_daemon.py
curl https://raw.githubusercontent.com/GianlucaBortoli/krafters/master/configure_daemon.py > configure_daemon.py
sudo chmod 777 configure_daemon.py
# run configure_daemon.py in background
./configure_daemon.py &

# install rethinkdb
source /etc/lsb-release && echo "deb http://download.rethinkdb.com/apt $DISTRIB_CODENAME main" | \
    sudo tee /etc/apt/sources.list.d/rethinkdb.list
wget -qO- https://download.rethinkdb.com/apt/pubkey.gpg | sudo apt-key add -
sudo apt-get update && \
    sudo apt-get install -y rethinkdb

sudo wget https://bootstrap.pypa.io/get-pip.py
sudo python3.4 get-pip.py
sudo -H pip install rethinkdb

# notify provisioner script is executed
instance=$(sudo curl http://metadata.google.internal/computeMetadata/v1/instance/attributes/myid -H "Metadata-Flavor: Google")
bucket=$(sudo curl http://metadata.google.internal/computeMetadata/v1/instance/attributes/bucket -H "Metadata-Flavor: Google")
sudo echo > $instance
gsutil cp $instance gs://$bucket/$instance<commit_msg>included paxos & pso for gce<commit_after>#!/usr/bin/env bash

export DEBIAN_FRONTEND=noninteractive
pwd
# install python3.4 and git
sudo add-apt-repository -y ppa:fkrull/deadsnakes
sudo apt-get update
sudo apt-get install -y \
    python3.4  \
    git
# fetch network_manager.py
curl https://raw.githubusercontent.com/GianlucaBortoli/krafters/master/network_manager.py > network_manager.py
sudo chmod 777 network_manager.py
# fetch test_daemon.py
curl https://raw.githubusercontent.com/GianlucaBortoli/krafters/master/test_daemon.py > test_daemon.py
sudo chmod 777 test_daemon.py
curl https://raw.githubusercontent.com/GianlucaBortoli/krafters/master/test_daemon2.py > test_daemon2.py
sudo chmod 777 test_daemon2.py
# fetch configure_daemon.py
curl https://raw.githubusercontent.com/GianlucaBortoli/krafters/master/configure_daemon.py > configure_daemon.py
sudo chmod 777 configure_daemon.py
# run configure_daemon.py in background
./configure_daemon.py &

# install rethinkdb
source /etc/lsb-release && echo "deb http://download.rethinkdb.com/apt $DISTRIB_CODENAME main" | \
    sudo tee /etc/apt/sources.list.d/rethinkdb.list
wget -qO- https://download.rethinkdb.com/apt/pubkey.gpg | sudo apt-key add -
sudo apt-get update && \
    sudo apt-get install -y rethinkdb

sudo wget https://bootstrap.pypa.io/get-pip.py
sudo python3.4 get-pip.py
sudo python2.7 get-pip.py
sudo -H pip3.4 install rethinkdb

# notify provisioner script is executed
instance=$(sudo curl http://metadata.google.internal/computeMetadata/v1/instance/attributes/myid -H "Metadata-Flavor: Google")
bucket=$(sudo curl http://metadata.google.internal/computeMetadata/v1/instance/attributes/bucket -H "Metadata-Flavor: Google")
sudo echo > $instance

# clone our repo & copy paxos/PSO
git clone https://github.com/GianlucaBortoli/krafters.git
mv ./krafters/paxos .
mv ./krafters/pysyncobj .
rm -rf ./krafters

# install paxos/PSO dependencies
sudo -H pip2.7 install \
    essential-paxos \
    paxos
sudo -H pip2.7 install pysyncobj

# notify we're done
gsutil cp $instance gs://$bucket/$instance
{'fraction_non_alphanumeric': 0.10992813414958744, 'fraction_numerical': 0.014373170082512644, 'mean_word_length': 4.642642642642643, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, 'https://': 13, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4246303', 'n_tokens_mistral': 1410, 'n_tokens_neox': 1314, 'n_words': 279}