This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import urllib2 | |
import json | |
# http://msdn.microsoft.com/en-us/library/hh441726.aspx | |
# get lat/lon data from http://itouchmap.com/latlong.html | |
latN = str(52.477213) | |
latS = str(52.356601) | |
lonW = str(-1.615194) | |
lonE = str(-1.344656) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from xml.dom.minidom import parseString, Node | |
import urllib | |
# http://www.highways.gov.uk/news/connect/rss-feeds/traffic-information-rss-feeds/ | |
url = 'http://hatrafficinfo.dft.gov.uk/feeds/rss/CurrentAndFutureEvents/West%20Midlands.xml' | |
f = urllib.urlopen(url) | |
xml = f.read() | |
xmldoc = parseString(xml) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
key = '<YOUR FLICKR API KEY>' | |
url = 'https://api.flickr.com/services/rest/?method=flickr.photos.search&api_key='+key+'&tags=coventry&format=json&nojsoncallback=1' | |
response = urllib2.urlopen(url).read() | |
data = json.loads(response.decode('utf8')) | |
photos = data['photos']['photo'] | |
for photo in photos: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Simple Form Validation</title> | |
<script> | |
window.onload = function() { | |
console.log('onLoad'); | |
var form = document.forms.register; | |
form.onsubmit = function() { | |
console.log('onSubmit'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"docs": [ | |
{ | |
"_id": "turing", | |
"name": "Alan Turing", | |
"born": "1912-06-23", | |
"quotes": [ | |
"We can only see a short distance ahead, but we can see plenty there that needs to be done", | |
"We are not interested in the fact that the brain has the consistency of cold porridge", | |
"A computer would deserve to be called intelligent if it could deceive a human into believing that it was human", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "Arthur C. Clarke", | |
"born": "1917-12-16", | |
"quotes": [ | |
"Any sufficiently advanced technology is indistinguisable from magic", | |
"Reading computer manuals without the hardware is as frustrating as reading sex manuals without the software", | |
"How innapropriate to call this planet Earth when it is quite clearly Ocean", | |
"I don't believe in astrology. I'm a Sagittarius and we're skeptical" | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Simple Form Validation</title> | |
<script> | |
window.onload = function() { | |
console.log('onLoad'); | |
var people = []; | |
var form = document.forms.register; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"people" : [ { | |
"born" : 1955, | |
"fame" : "co-founder of Apple Computers", | |
"name" : "Steve Jobs" | |
}, { | |
"born" : 1955, | |
"name" : "Tim Berners-Lee" | |
}, { | |
"born" : 1815, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker@boot2docker:~/docker$ docker-compose --verbose up -d | |
Compose version 1.3.3 | |
Docker base_url: http+docker://localunixsocket | |
Docker version: KernelVersion=4.0.5-boot2docker, Os=linux, ApiVersion=1.19, Version=1.7.0, GitCommit=0baf609, Arch=amd64, GoVersion=go1.4.2 | |
docker containers <- (all=True, filters={u'label': [u'com.docker.compose.project=docker', u'com.docker.compose.service=broker', u'com.docker.compose.oneoff=False']}) | |
docker containers -> (list with 0 items) | |
docker containers <- (all=True) | |
docker containers -> (list with 0 items) | |
docker containers <- (all=True, filters={u'label': [u'com.docker.compose.project=docker', u'com.docker.compose.service=publisher', u'com.docker.compose.oneoff=False']}) | |
docker containers -> (list with 0 items) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# BIOS Settings | |
# If you plan on running virtual machines using virtualbox you need to enable this in the BIOS | |
# on HP machines: ESC, computer setup, security > system security. enable VTx and VTd. | |
# on Lenovo: ENTER, | |
# needs to be run with root privileges | |
# sudo -s |
OlderNewer