<commit_before>#!/bin/bash

echo "PI of Things (PIoT) Auto-Installer"

if [ $(whoami) != "root" ]; then
    echo "Script must be run as root! Exiting."
    exit 1
fi

sudo apt-get update
sudo apt-get -y upgrade
sudo apt-get -y install git python3-pip

git clone https://github.com/tnewman/piot /home/pi/PIoT

chown -R pi /home/pi/PIoT
chgrp -R pi /home/pi/PIoT

python3 /home/pi/PIoT/setup.py develop

cp /home/pi/PIoT/config.cfg.sample /home/pi/PIoT/config.cfg

/home/pi/PIoT/initializedatabase.py

cp /home/pi/PIoT/piotexportgpio.service /etc/systemd/system/piotexportgpio.service
cp /home/pi/PIoT/piotreadsensors.service /etc/systemd/system/piotreadsensors.service
cp /home/pi/PIoT/piotweb.service /etc/systemd/system/piotweb.service

systemctl daemon-reload

systemctl enable piotexportgpio.service
systemctl enable piotreadsensors.service
systemctl enable piotweb.service

systemctl start piotexportgpio.service
systemctl start piotreadsensors.service<commit_msg>Added Gunicorn<commit_after>#!/bin/bash

echo "PI of Things (PIoT) Auto-Installer"

if [ $(whoami) != "root" ]; then
    echo "Script must be run as root! Exiting."
    exit 1
fi

sudo apt-get update
sudo apt-get -y upgrade
sudo apt-get -y install git python3-pip

git clone https://github.com/tnewman/piot /home/pi/PIoT

chown -R pi /home/pi/PIoT
chgrp -R pi /home/pi/PIoT

cd /home/piot/PIoT

python3 /home/pi/PIoT/setup.py develop

pip3 install gunicorn

cp config.cfg.sample config.cfg

./initializedatabase.py

cp piotexportgpio.service /etc/systemd/system/piotexportgpio.service
cp piotreadsensors.service /etc/systemd/system/piotreadsensors.service
cp piotweb.service /etc/systemd/system/piotweb.service

systemctl daemon-reload

systemctl enable piotexportgpio.service
systemctl enable piotreadsensors.service
systemctl enable piotweb.service

systemctl start piotexportgpio.service
systemctl start piotreadsensors.service
{'fraction_non_alphanumeric': 0.10168598524762908, 'fraction_numerical': 0.0036880927291886197, 'mean_word_length': 4.275, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '1622986', 'n_tokens_mistral': 710, 'n_tokens_neox': 688, 'n_words': 165}