<commit_before>if [ "$EUID" -ne 0 ]
  then echo "Please run as root"
  exit
fi

# Fetch dependencies
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install python3 python3-pip postgresql postgresql-contrib apache2 libapache2-mod-wsgi make
sudo pip3 install flask Flask_SQLAlchemy easy_install setuptools 

# Install our libraries
make sdist
sudo pip install ./dist/timeseries*.tar.gz ./dist/rbtree*.tar.gz ./dist/dbserver*.tar.gz

# Initialize time series database server
sudo useradd -r -s /bin/false dbserver
sudo mkdir /var/dbserver
sudo chown dbserver:dbserver /var/dbserver
sudo cp src/dbserver/dbserver.service /etc/systemd/system
sudo cp src/dbserver/start_dbserver.py /var/dbserver
sudo systemctl daemon-reload
sudo systemctl enable dbserver.service
sudo systemctl start dbserver.service

# Initialize postgres server
sudo -u postgres bash -c "psql -c \"CREATE USER cs207site WITH PASSWORD '<PASSWORD>';\""
sudo -u postgres bash -c "createdb -w -O cs207site timeseries"
sudo systemctl enable postgresql.service
sudo systemctl start postgresql.service

# Initialize apache server
sudo a2enmod wsgi
sudo cp src/website/cs207site.conf /etc/apache2/sites-available
sudo cp -r src/website /var/www/cs207site
sudo chown ubuntu:ubuntu -R /var/www/cs207site
sudo a2ensite cs207site.conf
sudo service apache2 reload

<commit_msg>fixed typos<commit_after>if [ "$EUID" -ne 0 ]
  then echo "Please run as root"
  exit
fi

# Fetch dependencies
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install python3 python3-pip postgresql postgresql-contrib apache2 libapache2-mod-wsgi make
sudo pip3 install flask Flask_SQLAlchemy easy_install setuptools 

# Install our libraries
make sdist
sudo pip3 install ./dist/timeseries*.tar.gz ./dist/rbtree*.tar.gz ./dist/dbserver*.tar.gz

# Initialize time series database server
sudo useradd -r -s /bin/false dbserver
sudo mkdir /var/dbserver
sudo chown dbserver:dbserver /var/dbserver
sudo cp src/dbserver/dbserver.service /etc/systemd/system
sudo cp src/dbserver/start_dbserver.py /var/dbserver
sudo systemctl daemon-reload
sudo systemctl enable dbserver.service
sudo systemctl start dbserver.service

# Initialize postgres server
sudo -u postgres bash -c "psql -c \"CREATE USER cs207site WITH PASSWORD '<PASSWORD>';\""
sudo -u postgres bash -c "createdb -w -O cs207site timeseries"
sudo systemctl enable postgresql.service
sudo systemctl start postgresql.service

# Initialize apache server
sudo a2enmod wsgi
sudo cp src/website/cs207site.conf /etc/apache2/sites-available
sudo cp -r src/website /var/www/cs207site
sudo chown ubuntu:ubuntu -R /var/www/cs207site
sudo a2ensite cs207site.conf
sudo service apache2 reload


{'fraction_non_alphanumeric': 0.07793180966654177, 'fraction_numerical': 0.021356313225927313, 'mean_word_length': 4.609243697478991, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, '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': '3235824', 'n_tokens_mistral': 950, 'n_tokens_neox': 838, 'n_words': 293}