https://pypy.pythonprogramminghelp.com/how-acceptance-sampling-by-attributes-is-ripping-you-off/