Python Code for teh Web Science project