Advertisement
hd1

Untitled

hd1
Oct 8th, 2014
979
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.42 KB | None | 0 0
  1. import datetime
  2. import pandas as pd
  3. import math
  4. import matplotlib.pyplot as plt
  5. relevant = pd.io.parsers.read_csv('http://hasan.d8u.us/links.py.cgi?format=csv')
  6. bins = math.floor(len(relevant)/50)
  7. plt.hist([int(datetime.datetime.fromtimestamp(t).strftime('%H'))+1 for t in relevant['Timestamp']], bins=bins, histtype='stepfilled', range=[1,24])
  8. plt.xlabel('Hour of Day')
  9. plt.title('What hour were links sent out?')
  10. plt.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement