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 RPi.GPIO as GPIO | |
import time | |
from BeautifulSoup import BeautifulSoup | |
import urllib2 | |
#change this bit | |
url="http://www.kimondo.co.uk/swingometer-control/" | |
page=urllib2.urlopen(url) | |
soup = BeautifulSoup(page.read()) |
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
<?php | |
$rss = new DOMDocument(); | |
#feed info here | |
$rss->load('http://feeds.bbci.co.uk/news/rss.xml'); | |
$feed = array(); | |
foreach ($rss->getElementsByTagName('item') as $node) { | |
$item = array ( | |
'title' => $node->getElementsByTagName('title')->item(0)->nodeValue, | |
#I'm just using the title | |
#'desc' => $node->getElementsByTagName('description')->item(0)->nodeValue, |
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 serial | |
import time | |
import urllib2 | |
from BeautifulSoup import BeautifulSoup | |
# Configure Pi serial port | |
s = serial.Serial() | |
s.baudrate = 9600 | |
s.timeout = 0 |
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 imaplib | |
import email | |
#connect to gmail | |
mail = imaplib.IMAP4_SSL('imap.gmail.com') | |
mail.login('[email protected]','your_password') | |
mail.select('inbox') | |
mail.list() | |