Skip to content

Instantly share code, notes, and snippets.

import math
from functools import lru_cache
@lru_cache(3)
def fibonacci(n):
"""" Finds fibonacci number for index supplied
Recursive function to find the fibonacci number for a certain index
where F{n} = F{n-1} + F{n-2}.
This function utilises lru_cache to cache recently computed results
in order for faster calculations at the next iteration.
gimp_hue = input("Gimp H:)
gimp_saturation = input("Gimp S:)
gimp_value = input("Gimp V:)
opencv_hue = gimp_hue / 2
opencv_saturation = (gimp_saturation / 100) * 255
opencv_value = (gimp_value / 100) * 255
print('OpenCV\nH: {}\nS: {}\nV: {}\n'.format(opencv_hue, opencv_saturation, opencv_value))
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.