If your github account has two-factor authentication enabled, this script will throw an exception with the following message:
github.GithubException.GithubException: 401 {u'documentation_url': u'https://developer.github.com/v3/auth#working-with-two-factor-authentication', u'message': u'Must specify two-factor authentication OTP code.'}