Does your favorite web service have a crappy interface? Make your own with Python, Python-Requests and BeautifulSoup!

There are some pretty useful sites out there, but some interfaces are just plain annoying. Take pof.com for example: they have millions of users, but haven’t touched their interface since the beginning; if you get lots of messages it becomes a pain to go through them all very quickly. I figured it might be easier […]

Post to Facebook on Behalf of Your User with Python/Django

Posting on facebook through python is fairly simple: you need acquire your user’s facebook access token, which you use to access the users facebook wall. Step 1: Create the facebook app First, create a new facebook app on https://developers.facebook.com/apps and note down the APP_ID and APP_SECRET. Store this information in your django settings.py file. Step […]

Setting up iOS Push Notifications (APNS) with Python/Django through pyapns

Working with iOS for the first time can be a bit frustrating. For me, the most frustrating part was working with┬ádeveloper.apple.com. Here I hope to help make push notifications with Python as painless as possible. Step 1: Enable for Apple Push Notification service and generate a certificate To get started, log in to you developer […]

The Python or Operator Shortcut

If statements are one of the most basic concepts used in all programming languages. Unfortunately they also make code ugly, unreadable, and sometimes even inefficient. Check out this google talk on if statements: http://www.youtube.com/watch?v=4F72VULWFvc Using the or operator we can avoid ifs when checking for null values before assignment: Traditional if: Using the or operator: