

def clean_filename(filename):
    space_chars = [' ', '-']
    not_allowed_chars = ['.', '!', ':', ';', '/', ',', '(', ')', '[', ']', '{', '}', '&', '"', "'", '*', '\\', '<', '>']
    table = dict(((ord(c), '') for c in not_allowed_chars))
    table.update(dict(((ord(c), '_') for c in space_chars)))
    return filename.translate(table)

dataset/ETHPy150Open jvrsantacruz/ipodio/ipodio/_helpers.py clean_filename/original