Skip to content

Instantly share code, notes, and snippets.

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
pyplot.semilogy(cs, ks)
pyplot.xlabel('Fraction of the time spend on real work')
pyplot.ylabel('What multiple engineers should you hire')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment