import re


def get_slug(s):
    """
    Returns a simplified version of the given string that can serve as a filename or directory name.
    :param s:
    :return:
    """
    s = str(s).strip().replace(' ', '_')
    return re.sub(r'(?u)[^-\w.]', '', s)