<commit_before>#!/bin/sh
echo "Update System..."
sudo apt-get -y update > /dev/null
sudo apt-get -y upgrade > /dev/null
sudo apt-get -y dist-upgrade > /dev/null
sudo apt-get -y autoremove > /dev/null
echo "Updating System finished"

echo "install required software"
sudo apt-get -y install vim git-core i2c-tools unzip zip

#install bcm2835 library for dht-sensor
echo "install bcm2835 library for dht-sensor"
wget http://www.airspayce.com/mikem/bcm2835/bcm2835-1.46.tar.gz
tar zxvf bcm2835-1.46.tar.gz
cd bcm2835-1.46
./configure
make
sudo make check 
sudo make install
cd
rm -r bcm2835-1.46
rm bcm2835-1.46.tar.gz

#install wiringp
git clone git://git.drogon.net/wiringPi
cd wiringPi
git pull origin
./build
cd
rm -r wiringPi

#install nodejs
wget http://piw.jg-bits.de/node-v0.12.7-raspberrybuild.zip
sudo unzip node-v0.12.7-raspberrybuild.zip
cd node-v0.12.7
sudo make install
cd ..
rm -r node-v0.12.7
rm node-v0.12.7-raspberrybuild.zip

#install mysql
sudo apt-get install mysql-server
mysql -u root -p
create database pi_weather;
Create table data_log(time TIMESTAMP NOT NULL, temperature FLOAT NOT NULL, humidity FLOAT NOT NULL, pressure DOUBLE NOT NULL);

# install node depencies
sudo npm install pm2 -g
sudo pm2 startup systemd -u pi

#configure auto update raspbian
#sudo apt-get install cron-apt > /dev/null<commit_msg>FIX user pm2 startup systemd<commit_after>#!/bin/sh
echo "Update System..."
sudo apt-get -y update > /dev/null
sudo apt-get -y upgrade > /dev/null
sudo apt-get -y dist-upgrade > /dev/null
sudo apt-get -y autoremove > /dev/null
echo "Updating System finished"

echo "install required software"
sudo apt-get -y install vim git-core i2c-tools unzip zip

#install bcm2835 library for dht-sensor
echo "install bcm2835 library for dht-sensor"
wget http://www.airspayce.com/mikem/bcm2835/bcm2835-1.46.tar.gz
tar zxvf bcm2835-1.46.tar.gz
cd bcm2835-1.46
./configure
make
sudo make check 
sudo make install
cd
rm -r bcm2835-1.46
rm bcm2835-1.46.tar.gz

#install wiringp
git clone git://git.drogon.net/wiringPi
cd wiringPi
git pull origin
./build
cd
rm -r wiringPi

#install nodejs
wget http://piw.jg-bits.de/node-v0.12.7-raspberrybuild.zip
sudo unzip node-v0.12.7-raspberrybuild.zip
cd node-v0.12.7
sudo make install
cd ..
rm -r node-v0.12.7
rm node-v0.12.7-raspberrybuild.zip

#install mysql
sudo apt-get install mysql-server
mysql -u root -p
create database pi_weather;
Create table data_log(time TIMESTAMP NOT NULL, temperature FLOAT NOT NULL, humidity FLOAT NOT NULL, pressure DOUBLE NOT NULL);

# install node depencies
sudo npm install pm2 -g
sudo pm2 startup systemd -u root

#configure auto update raspbian
#sudo apt-get install cron-apt > /dev/null
{'fraction_non_alphanumeric': 0.1022769690182904, 'fraction_numerical': 0.05263157894736842, 'mean_word_length': 3.8114901256732496, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '6359987', 'n_tokens_mistral': 1099, 'n_tokens_neox': 994, 'n_words': 323}