Expenses in red below, income in green above, over time on the x axis, value on y axis.
You can see this chart at: http://bl.ocks.org/galvanic/284b254c6fe3a501d8bcc46c95e6f601
#!/usr/bin/env python | |
# coding: utf-8 | |
import numpy as np | |
import pandas as pd | |
import re | |
#import os ## TODO use this to traverse folders | |
from email.parser import Parser | |
from sklearn.feature_extraction.text import CountVectorizer |
Expenses in red below, income in green above, over time on the x axis, value on y axis.
You can see this chart at: http://bl.ocks.org/galvanic/284b254c6fe3a501d8bcc46c95e6f601
Plot a calendar in python using matplotlib. The days are drawn on a 7*52 heatmap grid, with the months clearly delineated.
Slightly cleaned up from https://gist.github.com/rsnape/98bbf68e333b0948192e found in this Stack Overflow answer
Plug in RPi with Ethernet cable | |
Make sure the SD card or some sort of storage is in, so that there is an OS | |
Plug in RPi with macro-USB for power | |
http://www.dexterindustries.com/BrickPi/getting-started/using-the-pi/connect-to-your-raspberry-pi-from-a-mac/ | |
https://www.raspberrypi.org/documentation/installation/installing-images/mac.md | |
http://pingbin.com/2012/07/format-raspberry-pi-sd-card-mac-osx/ | |
http://elinux.org/RPi_Easy_SD_Card_Setup#Copying_an_image_to_the_SD_Card_in_Mac_OS_X | |
diskutil unmountDisk /dev/disk1s1 | |
sudo dd bs=1m if=~/Downloads/2015-02-16-raspbian-wheezy.img of=/dev/rdisk1 | |
Don't forget to properly eject! |
my slides: | |
https://github.com/galvanic/talk-slides/blob/master/scapy.ipynb | |
official docs: | |
http://www.secdev.org/projects/scapy/demo.html | |
http://www.secdev.org/projects/scapy/doc/usage.html#sniffing | |
some tutorials from the internet: | |
https://theitgeekchronicles.files.wordpress.com/2012/05/scapyguide1.pdf | |
https://samsclass.info/124/proj11/proj17-scapy.html |
You can see this chart at: http://bl.ocks.org/galvanic/53d5ecaa09efb809444b
« In effect, the chart becomes a rubber stamp for rendering data visually. »
Mike Bostock
Working example of a reusable chart that is re-used in space and in time (for updates). The reusable chart is the TimelineChart
constructor function in timeline.js
.
The key function is used to access the bound data in the circles
selection to convey that the represented events are different.
Bar chart of number of events per week (week starting on a Monday). The interesting bit was how to group by week while still preserving the notion of time to be able to use months in the x axis. A clipping path was used to not show the beginning of a week where there was no data (data started on a Saturday).
Fake events were generated using this fake-event-generator.
from bs4 import BeautifulSoup | |
import sys | |
with open(sys.argv[1], 'r') as ifile: | |
text = ifile.read() | |
soup = BeautifulSoup(text) | |
rsvp = soup.find('ul', {'id': 'rsvp-list'}) | |
names = rsvp.find_all('h5') | |
names = [name.text.encode('utf-8').strip().replace('\n', ' ') for name in names] |
#!/usr/bin/python | |
import sys | |
from itertools import product | |
string = sys.argv[1] | |
values = [l for l in "0123456789ABCDEF"] | |
# replace x by hexdecimal values |
#!/usr/bin/env python | |
""" | |
Script parses funding reached by the potato salad kickstarter | |
through lynx CLI browser. | |
Appends funding and date and time of funding to CSV file | |
for later plotting. | |
""" | |
import sys, re, csv | |
import datetime |