Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
import numpy
import scipy.optimize
from matplotlib import pyplot
cs = numpy.linspace(0.01, 0.99, 100)
ks = []
for c in cs:
def f(log_k):
k = numpy.exp(log_k)
return (c/k + 1-c)*k**0.6
res = scipy.optimize.minimize(f, 0)
optimal_log_k, = res.x
ks.append(numpy.exp(optimal_log_k))
pyplot.semilogy(cs, ks)
pyplot.grid()
pyplot.xlabel('Fraction of the time spend on real work')
pyplot.ylabel('What multiple engineers should you hire')
pyplot.savefig('2x-engineer-productivity.png')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment