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 | |
import requests | |
import oauthlib | |
# Do oauth something or other | |
# https://pypi.python.org/pypi/oauthlib | |
# See http://docs.python-requests.org/en/latest/user/quickstart/#make-a-request | |
# replace place-holders -- Python string formatting is cool | |
r = requests.get('https://app.sycamoreeducation.com/api/v1/School/:schoolid/Directory/:id') |
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 PySide import QtCore, QtGui | |
class MyWindow(QtGui.QDialog): | |
def __init__(self, parent=None): | |
super(MyWindow, self).__init__(parent) | |
self.model = QtGui.QStringListModel(['sam', 'sally', 'jack'], self) | |
self.v = QtGui.QListView() | |
self.v.setModel(self.model) |
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 time | |
import numpy | |
from PySide import QtCore, QtGui | |
import matplotlib | |
import matplotlib.ticker | |
matplotlib.use('Qt4Agg') | |
from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas | |
from matplotlib.figure import Figure | |
class Graph(QtGui.QWidget): |
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 PySide import QtCore, QtGui | |
import matplotlib | |
import matplotlib.widgets as widgets | |
matplotlib.use('Qt4Agg') | |
from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas | |
from matplotlib.figure import Figure | |
class GraphWindow(QtGui.QMainWindow): | |
def __init__(self, parent=None): | |
super(GraphWindow, self).__init__(parent) |