Skip to content

Instantly share code, notes, and snippets.

View EngineerCoding's full-sized avatar

Wesley A EngineerCoding

View GitHub Profile
@EngineerCoding
EngineerCoding / stirling_number.py
Created October 25, 2018 08:36
I needed to generate stirling numbers programmatically but couldn't find a proper implementation available in python. Being a non-mathematician, it was quite hard to understand and thus I wrote this script. From my testing, the outputs are correct.
import functools
_use_cache = True
def set_use_cache(use_cache):
global _use_cache
_use_cache = bool(use_cache)