This file contains hidden or 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 sys | |
import random | |
from PySide2 import QtCore, QtWidgets | |
class TableModel(QtCore.QAbstractTableModel): | |
def __init__(self, parent=None, data=None, columns=None, *args): | |
QtCore.QAbstractTableModel.__init__(self, parent, *args) | |
self.dataset = data | |
self.columns = columns |
This file contains hidden or 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 zmq | |
from flask import Flask | |
from threading import Thread | |
HOST = '127.0.0.1' | |
PORT = 9090 | |
TASK_SOCKET = zmq.Context().socket(zmq.REQ) | |
TASK_SOCKET.connect('tcp://{}:{}'.format(HOST, PORT)) | |
app = Flask("app") |
This file contains hidden or 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 pandas as pd | |
import jinja2 | |
import pdfkit | |
from random import getrandbits, randint | |
# pdfkit is just a wrapper for whktmltopdf. you need to install wkhtml and have it on the path | |
# alternatively, you can move wkhtmltoimage.exe, wkhtmltopdf.exe and wkhtmltox.dll into the working directory | |
# Create some data | |
def random_hex(length=10): |
This file contains hidden or 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 traceback | |
import sys | |
class NumberFactory(object): | |
def __init__(self, starting_value): | |
self.value = starting_value | |
def increment(self): | |
self.value += 1 |
This file contains hidden or 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 sys | |
import time | |
class MainWindow(QtGui.QMainWindow): | |
def __init__(self, parent=None): | |
super(MainWindow, self).__init__(parent) | |
#Build a UI | |
self.myLayout = QtGui.QVBoxLayout() | |
self.myCentralWidget = QtGui.QWidget() |
This file contains hidden or 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 | |
printf "%.2f" $(curl -s -H "Accept: application/json" -H "Content-Type: application/json" https://api.bitfinex.com/v1/pubticker/btcusd | grep -Po '(?<="mid":")[^"]*') |
This file contains hidden or 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
# -*- coding: utf-8 -*- | |
""" | |
Created on Sun Apr 17 11:45:45 2016 | |
@author: Blake Anderson | |
""" | |
from PySide import QtGui | |
from PySide import QtCore | |
import requests |