def ago(date_string, date_format="%Y-%m-%d %H:%M:%S"):
    try:
        d = datetime.datetime.strptime(date_string, date_format)
        n = datetime.datetime.now()
        diff = n - d
        return "%0.2f" % ((diff.days * 24) + (diff.seconds / 3600.0))
    except:
        return '0'
dataset/ETHPy150Open cloudbuilders/radioedit/radioedit.py/ago/original