Skip to content

Instantly share code, notes, and snippets.

@jastrauss
Last active April 20, 2016 18:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jastrauss/719f4f7c69707bc0715c6a8c2993d0d9 to your computer and use it in GitHub Desktop.
Save jastrauss/719f4f7c69707bc0715c6a8c2993d0d9 to your computer and use it in GitHub Desktop.
# Sample code from TheSimplePostcard.com
# TechStack: Django, PostgreSQL, VQL, Twilio, Lob, Stripe, Bootstrap, usaddress
# Occasionally, we choose to ship a card for free
import datetime, random
def FreeCard():
die_1 = random.randint(1, 6)
die_2 = random.randint(1, 6)
current_month = datetime.datetime.now().month
return (die_1 + die_2) == current_month
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment