Fixed num_posts logic
Updated .gitignore to ignore *.pyc