Created
February 6, 2009 12:44
-
-
Save mattfoster/59382 to your computer and use it in GitHub Desktop.
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 numpy as np | |
import matplotlib as mpl | |
import matplotlib.pylab as plt | |
import time | |
from datetime import datetime | |
f = plt.load('heist_countdown') | |
x = f[:,1] | |
y = f[:,0] | |
A = np.vstack([x, np.ones(len(x))]).T | |
m, c = np.linalg.lstsq(A, y)[0] | |
# Uncomment for a plot! | |
plt.plot(x, y ) | |
plt.plot(x, y, 'x', label='Web Data') | |
xx = np.arange(490, 505, 5) | |
plt.plot(xx, m*xx + c, 'r', label='Fitted line') | |
plt.title('MacHeist Release Estimate') | |
plt.xlabel('Bar Width') | |
plt.ylabel('Time') | |
plt.legend() | |
plt.show() | |
est = m*500 + c | |
print "MacHeist Completion Estimate:", | |
print datetime.fromtimestamp(est).strftime("%Y-%m-%d %H:%M:%S") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment