https://gist.github.com/DannyQuah/5f43f9b75970bc4e357e42c7c9214b5d
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<!-- Meta --> | |
<meta charset="UTF-8" /> | |
<title>Vue InstantSearch | display results in table</title> | |
<!-- Styles --> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous"> |
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 pandas as pd | |
import matplotlib.pyplot as plt | |
import seaborn as sns | |
%matplotlib inline | |
df = pd.read_csv('environment_bra.csv') | |
df.head() |
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 | |
from PySide.QtCore import Qt | |
from PySide.QtGui import QWidget, QTableView, QVBoxLayout, QApplication | |
def setup_consonants_vowels(): | |
letters = 'abcdefghijklmnopqrstuvwxyz' | |
vowels = set(['a','e','i','o','u','A','E','I','O','U']) | |
consonants = set([c for c in (letters + letters.upper()) if not c in vowels]) | |
return (consonants, vowels) |
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 sip | |
sip.setapi('QString', 2) | |
sip.setapi('QVariant', 2) | |
from PyQt4 import QtCore, QtGui | |
class TableModel(QtCore.QAbstractTableModel): | |
""" | |
A simple 5x4 table model to demonstrate the delegates |
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
""" | |
DataFrameTable | |
============== | |
Quick and Dirty Qt app to view pandas DataFrames. Includes sorting and | |
filterting. | |
Based on qtpandas in pandas sandbox module, by Jev Kuznetsov | |
Usage: |
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
# -*- coding: utf-8 -*- | |
""" | |
Created on Wed Jul 17 10:50:56 2013 | |
@author: cmarshall | |
""" | |
import sip | |
sip.setapi('QString', 1) | |
sip.setapi('QVariant', 1) |