Skip to content

Instantly share code, notes, and snippets.

@german
Created January 29, 2015 18:58
Show Gist options
  • Save german/f7ed68c53d8c2e0803a7 to your computer and use it in GitHub Desktop.
Save german/f7ed68c53d8c2e0803a7 to your computer and use it in GitHub Desktop.
prometheus course
import math, sys
def formula(x, mu, sigma):
exp = math.exp(- ((x - mu)**2) / (2*sigma**2))
return 1.0 / (sigma * math.sqrt(2*math.pi)) * exp
x_cli = float(sys.argv[1])
mu_cli = float(sys.argv[2])
sigma_cli = float(sys.argv[3])
print(formula(x_cli, mu_cli, sigma_cli))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment