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]','yourPassWordPlease') | |
mail.select('inbox') | |
mail.list() |
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
#!/usr/bin/env python2.7 | |
# Python to read pywws raw weather-file and output windspeed | |
# To the GertBoard LED's based on strength | |
from collections import deque | |
import csv | |
import wiringpi | |
from time import sleep | |
import sys | |
import math |
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
#! /usr/bin/python | |
# Python3 code to print IP addresses and host name of local network | |
# to e-ink screen | |
import nmap | |
import sys | |
import socket | |
from gpiozero import RGBLED, Button | |
import smbus |
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
#!/usr/bin/env python | |
import math | |
import sys | |
import time | |
import scrollphat | |
import json | |
from pijuice import PiJuice # Import pijuice module |
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
#!/usr/bin/env python2 | |
from envirophat import weather | |
import time, os, sys, urllib, urllib2 | |
THINGSPEAKKEY = 'ENTERYOURAPIKEY' | |
THINGSPEAKURL = 'https://api.thingspeak.com/update' | |
def sendData(url, key, field1, field2, temp, pres): | |
values ={'api_key' : key, 'field1' : temp, 'field2' : pres} |
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
#!/usr/bin/env python | |
import time | |
import unicornhat as unicorn | |
import urllib | |
unicorn.set_layout(unicorn.AUTO) | |
unicorn.rotation(0) | |
unicorn.brightness(0.5) | |
width,height=unicorn.get_shape() |
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 requests | |
from bs4 import BeautifulSoup | |
response = requests.get('http://www.tesco.com/groceries/en-GB/search?query=blueberry') | |
soup = BeautifulSoup(response.text, 'html.parser') | |
for item in soup.select('.product-list--list-item'): | |
try: | |
product = item.find(class_='product-image').get('alt', '') | |
value = item.find(class_='value').get_text() |
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
#!/usr/bin/python3 | |
import sys, getopt | |
import tikteck | |
def connecttoBulb(b): | |
bulb = tikteck.tikteck(b, "Smart Light", "[PASSWORD]") | |
bulb.connect() | |
return bulb |
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
#!/usr/bin/env python | |
import time | |
import numpy as np | |
import subprocess | |
from envirophat import weather, leds, light | |
import scrollphathd as sphd | |
from scrollphathd.fonts import font3x5 | |
sphd.clear() |
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
########### Python 3.2 ############# | |
import http.client, urllib.request, urllib.parse, urllib.error, base64, json, jsonify | |
import sys, getopt | |
def main(argv): | |
query = '' | |
offset = 0 | |
limit = 10 |
OlderNewer