Skip to content

Instantly share code, notes, and snippets.

@citadelgrad
Last active September 7, 2017 07:00
Show Gist options
  • Save citadelgrad/c082b22df116278213bf to your computer and use it in GitHub Desktop.
Save citadelgrad/c082b22df116278213bf to your computer and use it in GitHub Desktop.
from math import factorial
import numpy as np
def choose(n, k):
''' 25 choose 5 '''
x = factorial(n) / (factorial(k)*(factorial(n-k)))
return x
def solve():
# Monthly Price, Annual Price
a = np.array([[1,1], [18.99,179]])
# Transactions, Gross Sales
b = np.array([8,1432])
return np.linalg.solve(a, b)
# array([ 0., 8.])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment