<commit_before>#!/bin/bash

# should be in the same directory as setup.py

echo "Installing packages..."
sudo apt-get install -y python python-pip
sudo pip install -r requirements.txt

echo "Configuring Django..."
key=$(tr -dc "[:alpha:]" < /dev/urandom | head -c 48)
sed "s/^SECRET_KEY =.*/SECRET_KEY = '$key'/g" GoProApp/settings.py --quiet
python manage.py syncdb --noinput # remove --noinput to create a super user
chmod a+rw sqlite3.db # so apache can write to the db
chmod a+w ./ # so apache can write to the db


echo "Pulling GoProController..."
git submodule update --init

# remove the steps below if you don't want Apache and Upstart

echo "Configuring Apache..."
sudo apt-get install -y apache2 libapache2-mod-wsgi
sudo ln -s /home/$USER/GoProApp /home/GoProApp
sudo rm /etc/apache2/sites-enabled/000-default
sudo ln -s /home/GoProApp/GoProApp/apache.conf /etc/apache2/sites-enabled/GoProApp.conf
sudo service apache2 restart

echo "Configuring Upstart..."
# upstart does not support symlinks
sudo cp /home/GoProApp/GoProApp/upstart.conf /etc/init/gopro-proxy.conf
sudo start gopro-proxy

echo "Good to go!"<commit_msg>removed sudo for setup script<commit_after>#!/bin/bash

# should be in the same directory as setup.py

echo "Installing packages..."
apt-get install -y python python-pip
pip install -r requirements.txt

echo "Configuring Django..."
key=$(tr -dc "[:alpha:]" < /dev/urandom | head -c 48)
sed "s/^SECRET_KEY =.*/SECRET_KEY = '$key'/g" GoProApp/settings.py --quiet
python manage.py syncdb --noinput # remove --noinput to create a super user
chmod a+rw sqlite3.db # so apache can write to the db
chmod a+w ./ # so apache can write to the db


echo "Pulling GoProController..."
git submodule update --init

# remove the steps below if you don't want Apache and Upstart

echo "Configuring Apache..."
apt-get install -y apache2 libapache2-mod-wsgi
ln -s /home/$USER/GoProApp /home/GoProApp
rm /etc/apache2/sites-enabled/000-default
ln -s /home/GoProApp/GoProApp/apache.conf /etc/apache2/sites-enabled/GoProApp.conf
service apache2 restart

echo "Configuring Upstart..."
# upstart does not support symlinks
cp /home/GoProApp/GoProApp/upstart.conf /etc/init/gopro-proxy.conf
start gopro-proxy

echo "Good to go!"
{'fraction_non_alphanumeric': 0.11912225705329153, 'fraction_numerical': 0.009852216748768473, 'mean_word_length': 3.814655172413793, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5114737', 'n_tokens_mistral': 795, 'n_tokens_neox': 738, 'n_words': 258}