Skip to content

Instantly share code, notes, and snippets.

@whitmo
Forked from voodootikigod/gist:1155790
Created August 28, 2011 07:00
Show Gist options
  • Save whitmo/1176336 to your computer and use it in GitHub Desktop.
Save whitmo/1176336 to your computer and use it in GitHub Desktop.
PyCodeConf Ticket Give-away
class GitHubGiveAway(object):
questions = "day job",\
"fav python project",\
"fav conference",\
"python foo"
answers = "Python DevOps Ninja Janitor Monkey @ SurveyMonkey, "\
"ZDjangoGears by Ian Bicking or Starkiller or pythong.org, "\
"Snow or Castle or Mountain Sprints or Pylons Project MiniCon, "\
"so drunk when I wrote this I only had one eye I open".split(', ')
template = """{top_shelf}
{conbolus}
{big_bottoms}
""".replace(" ", '')
@classmethod
def cred_claimed(cls):
conbolus = "\n".join("%s: %s" %x for x in zip(cls.questions, cls.answers))
big_bottoms = top_shelf = "-"*max(len(x) for x in conbolus.split('\n'))
return cls.template.format(**locals())
if __name__ == "__main__":
print GitHubGiveAway.cred_claimed()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment