Skip to content

Instantly share code, notes, and snippets.

@simonw
Created September 21, 2009 22:56
Show Gist options
  • Select an option

  • Save simonw/190620 to your computer and use it in GitHub Desktop.

Select an option

Save simonw/190620 to your computer and use it in GitHub Desktop.
import httplib2, simplejson
h = httplib2.Http()
h.request("http://localhost:9173/jobs", "POST", urllib.urlencode({
'job': simplejson.dumps({
'action': 'word_count',
'inputs': [
'http://www.gutenberg.org/dirs/etext97/1ws3010.txt',
'http://www.gutenberg.org/dirs/etext99/1ws3511.txt',
'http://www.gutenberg.org/dirs/etext97/1ws2510.txt',
'http://www.gutenberg.org/dirs/etext97/1ws0610.txt',
'http://www.gutenberg.org/dirs/etext99/1ws3911.txt',
'http://www.gutenberg.org/dirs/etext00/0ws2610.txt',
'http://www.gutenberg.org/dirs/etext00/0ws1910.txt',
'http://www.gutenberg.org/dirs/etext99/1ws2411.txt',
'http://www.gutenberg.org/dirs/etext98/2ws3310.txt',
'http://www.gutenberg.org/dirs/etext99/1ws1211j.txt',
'http://www.gutenberg.org/dirs/etext98/2ws3410.txt',
'http://www.gutenberg.org/dirs/etext98/2ws1810.txt',
'http://www.gutenberg.org/dirs/etext99/1ws1711.txt',
'http://www.gutenberg.org/dirs/etext98/3ws2210.txt',
'http://www.gutenberg.org/dirs/etext00/0ws3210.txt',
'http://www.gutenberg.org/dirs/etext98/2ws1610.txt',
'http://www.gutenberg.org/dirs/etext98/2ws1010.txt',
'http://www.gutenberg.org/dirs/etext99/1ws4111.txt',
'http://www.gutenberg.org/dirs/etext00/0ws0910.txt',
'http://www.gutenberg.org/dirs/etext99/1ws2911.txt',
'http://www.gutenberg.org/dirs/etext98/3ws2810.txt',
'http://www.gutenberg.org/files/1539/1539.txt'
],
'callback_url': 'http://www.postbin.org/10bltee',
})
}))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment