Skip to content

Instantly share code, notes, and snippets.

@cristobal
Created March 31, 2014 08:48
Show Gist options
  • Save cristobal/9888101 to your computer and use it in GitHub Desktop.
Save cristobal/9888101 to your computer and use it in GitHub Desktop.
Do you want to script in some random lang, just change the langs list to your choice…
#!/usr/bin/env python
import sys
from random import shuffle
def main():
langs = ["coffe", "node", "lua", "python", "ruby", "php"]
scores = {}
for lang in langs:
scores[lang] = 0
while True:
shuffle(langs)
scores[langs[0]] += 1
if scores[langs[0]] == 3:
lang = langs[0]
break
print "You will now code your next script in `%s`" % lang
pass
if __name__ == "__main__":
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment