Skip to content

Instantly share code, notes, and snippets.

@icheko
Created December 19, 2013 19:12
Show Gist options
  • Save icheko/8044523 to your computer and use it in GitHub Desktop.
Save icheko/8044523 to your computer and use it in GitHub Desktop.
Quick and dirty Chuck Norris python script. Used in our SVN post commit hook. In case you don't have the requests library: yum install python-requests.noarch
import json, requests
url = 'http://api.icndb.com/jokes/random'
params = dict(
category='nerdy'
)
resp = requests.get(url=url, params=params)
data = json.loads(resp.content)
print data['value']['joke']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment