Skip to content

Instantly share code, notes, and snippets.

View 2016rshah's full-sized avatar

Rushi Shah 2016rshah

View GitHub Profile
@2016rshah
2016rshah / OpenCV_for_AI2.md
Last active February 9, 2016 19:01
Instructions on installing OpenCV for AI2 on a mac

(Requirement: homebrew should already be installed) This will install opencv3 on a mac for use with python2

$ brew tap homebrew/science

$ brew install opencv3 --with-python3

$ mkdir -p /Users/rushi/Library/Python/2.7/lib/python/site-packages

--My initial solution, but I realized that maybe repeatedly calling maximum wasn't good
profits :: [Int] -> [Int]
profits (x:y:ys) = (maximum (xs) - x) : profits (xs)
where xs = y:ys
profits _ = []
--My updated solution that is slightly more complex
--But it keeps track of the current maximum until that current maximum is outdated
profits' :: [Int] -> Int -> [Int]
profits' (x:y:ys) cm =
Palette 1:
Teal? Green-ish?:
Main: #2bcabb
Darker border: #047F6F
Blue:
Main: #008ae6
Darker border: #004573