List all top 3 articles, top 5 authors and find request error that more then 1% per day from news database.
- Python Python 2.7++
- psycopg2
- Vagrant
- VirtualBox
-
Install Vagrant
-
Install Virtualbox
-
Clone git project
git clone https://github.com/June17ang/logs-analysis.git
-
Change directory
cd logs-analysis
-
Download newsdata.zip
-
Unzip newsdata.zip in logs-analysis directory
-
Setup virtual environment
vagrant up
-
SSH into vagrant
vagrant ssh
-
Change to project directory
cd /vagrant
-
Import newsdata.sql into news database
psql -d news -f newsdata.sql
-
Check newsdb.py is in /vagrant directory
ls -lrt
-
Run newsdb.py to generate result
python newsdb.py
-
View result
cat result.txt