def truthiness(s):
    try:
        return str(s).lower() in ['true', 't', '1']
    except (TypeError, ValueError, UnicodeEncodeError):
        return False
Returns a boolean from a string
dataset/ETHPy150Open rehandalal/buchner/buchner/helpers.py/truthiness