Skip to content

Instantly share code, notes, and snippets.

Brandon Carl bcarl

Block or report user

Report or block bcarl

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am bcarl on github.
  • I am bcarl (https://keybase.io/bcarl) on keybase.
  • I have a public key whose fingerprint is 9F77 306B C9E6 297D 34E7 2A7A 5C2C F74C D843 9578

To claim this, I am signing this object:

View main.py
#!/usr/bin/env python
"""
Another fun python variable manipulation question is: given an int, write a one
liner that returns the string representation of the int, but with a comma every
three decimal places starting from the right. (i.e., 1 return "1", and 1000
returns "1,000")
(Rules: the one line cannot use anything that has to be imported, and cannot use
any string formatting)
@bcarl
bcarl / backends.py
Created Jul 6, 2012
Django Email as Username Authentication Backend
View backends.py
from django.contrib.auth.models import User, check_password
class LoginUsingEmailAsUsernameBackend(object):
"""
Custom Authentication backend that supports using an e-mail address
to login instead of a username.
See: http://blog.cingusoft.org/custom-django-authentication-backend
"""
supports_object_permissions = False
@bcarl
bcarl / autograder.py
Created Jun 10, 2012 — forked from bulatb/autograder.py
Autograder submission bot for CSE 120
View autograder.py
#!/software/common/python-2.7/bin/python2.7
# ^ /software is where ieng6 keeps the nice things we can't have
import os
import time
import subprocess
from optparse import OptionParser
You can’t perform that action at this time.