<commit_before>def list_dashboards():
    import os
    wd = os.getcwd()
    os.chdir('templates/dashboards')
    dashboards = []
    for f in os.listdir("."):
        if not f.endswith(".tpl"):
            continue
        dashboards.append(f[:-4])
    os.chdir(wd)
    return sorted(dashboards)<commit_msg>refactor list_dashboards<commit_after>import os
import glob


def list_dashboards():
    tpl_list = glob.glob('templates/dashboards/*.tpl')
    dashboards = map(lambda tpl: os.path.basename(tpl)[:-4], tpl_list)
    return sorted(dashboards)
{'fraction_non_alphanumeric': 0.1386861313868613, 'fraction_numerical': 0.0036496350364963502, 'mean_word_length': 3.322834645669291, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5779815', 'n_tokens_mistral': 187, 'n_tokens_neox': 185, 'n_words': 35}