Skip to content

Instantly share code, notes, and snippets.

View acrymble's full-sized avatar

Adam Crymble acrymble

  • London
View GitHub Profile
@acrymble
acrymble / using-greet.py
Created June 30, 2011 09:39
Python calling Function example
# using-greet.py
import greet
greet.greetEntity("everybody")
greet.greetEntity("programming historian")
@acrymble
acrymble / open-webpage.py
Created June 30, 2011 10:44
Python open a webpage
# open-webpage.py
import urllib2
url = 'http://www.oldbaileyonline.org/print.jsp?div=t17800628-33'
response = urllib2.urlopen(url)
webContent = response.read()
print webContent[0:300]
@acrymble
acrymble / save-webpage.py
Created June 30, 2011 10:51
Python save webpage
# save-webpage.py
import urllib2
url = 'http://www.oldbaileyonline.org/print.jsp?div=t17800628-33'
response = urllib2.urlopen(url)
webContent = response.read()
f = open('obo-t17800628-33.html', 'w')
@acrymble
acrymble / basic-url
Created June 30, 2011 11:50
basic url
http://oldbaileyonline.org
@acrymble
acrymble / url-port
Created June 30, 2011 11:51
url plus port
http://oldbaileyonline.org:80
@acrymble
acrymble / url-longer
Created June 30, 2011 11:51
url longer
http://oldbaileyonline.org/static/Project.jsp
@acrymble
acrymble / url-query
Created June 30, 2011 11:51
url query
http://www.oldbaileyonline.org/search.jsp?form=custom&_divs_fulltext=arsenic
@acrymble
acrymble / obo-url-long
Created June 30, 2011 11:52
obo url-long
http://www.oldbaileyonline.org/browse.jsp?id=t17800628-33&div=t17800628-33
@acrymble
acrymble / obo-url-print
Created June 30, 2011 11:53
obo url-print
http://www.oldbaileyonline.org/print.jsp?div=t17800628-33
@acrymble
acrymble / obo-print-source.html
Created June 30, 2011 12:26
obo-print-source
<div style="font-family:serif;"><i>Old Bailey Proceedings Online</i>
(www.oldbaileyonline.org, version 6.0, 01 July 2011), June 1780, trial of BENJAMIN BOWSEY (t17800628-33).<hr/><h2>BENJAMIN BOWSEY...