Skip to content

Instantly share code, notes, and snippets.

View mfitzp's full-sized avatar

Martin Fitzpatrick mfitzp

View GitHub Profile
from bs4 import BeautifulSoup
# Python 3.x
from urllib.request import urlopen, urlretrieve
# Removed the trailing / from the URL
url = 'https://www.rbi.org.in/Scripts/bs_viewcontent.aspx?Id=2009'
u = urlopen(url)
try:
html = u.read().decode('utf-8')
finally:
@mfitzp
mfitzp / gist:59a579e65d029129ad78
Last active January 21, 2016 15:31
GPIO example
def down():
if GPIO.input(7) == False:
# Turn on the LED
GPIO.output(13, True)
# Loop until we're at the bottom
while GPIO.input(7) == False:
time.sleep(0.5)
from PyQt5.QtCore import *
from PyQt5.QtWidgets import *
from PyQt5.QtGui import *
from PyQt5.QtWebKitWidgets import *
from PyQt5.QtPrintSupport import *
import os
import sys
class AboutDialog(QDialog):