<commit_before><%! import json %>

<%def name="render_dropdown(map)">
    % for child in map["children"]:
        % if child in map["entries"]:
            ${render_entry(map["entries"], child)}
        %else:
            ${render_category(map["subcategories"], child)}
        %endif
    %endfor
</%def>

<%def name="render_entry(entries, entry)">
    <li><a href="#"><span class="board-name" data-discussion_id='${json.dumps(entries[entry])}'>${entry}</span> <span class="unread">1,248</span></a></li>
</%def>

<%def name="render_category(categories, category)">
    <li>
        <a href="#"><span class="board-name">${category}</span></a>
        <ul>
            ${render_dropdown(categories[category])}
        </ul>
    </li>
</%def>

<div class="browse-topic-drop-menu-wrapper">
    <div class="browse-topic-drop-search">
        <input type="text" class="browse-topic-drop-search-input" placeholder="filter topics">
    </div>
    <ul class="browse-topic-drop-menu">        
        <li>
            <a href="#">
                <span class="board-name" data-discussion_id='#all'>All</span> <span class="unread">1,248</span>
            </a>
        </li>
        ${render_dropdown(category_map)}
    </ul>
</div>
<commit_msg>drop unread counts for now<commit_after><%! import json %>

<%def name="render_dropdown(map)">
    % for child in map["children"]:
        % if child in map["entries"]:
            ${render_entry(map["entries"], child)}
        %else:
            ${render_category(map["subcategories"], child)}
        %endif
    %endfor
</%def>

<%def name="render_entry(entries, entry)">
    <li><a href="#"><span class="board-name" data-discussion_id='${json.dumps(entries[entry])}'>${entry}</span></a></li>
</%def>

<%def name="render_category(categories, category)">
    <li>
        <a href="#"><span class="board-name">${category}</span></a>
        <ul>
            ${render_dropdown(categories[category])}
        </ul>
    </li>
</%def>

<div class="browse-topic-drop-menu-wrapper">
    <div class="browse-topic-drop-search">
        <input type="text" class="browse-topic-drop-search-input" placeholder="filter topics">
    </div>
    <ul class="browse-topic-drop-menu">        
        <li>
            <a href="#">
                <span class="board-name" data-discussion_id='#all'>All</span>
            </a>
        </li>
        ${render_dropdown(category_map)}
    </ul>
</div>

{'fraction_non_alphanumeric': 0.20638209697472026, 'fraction_numerical': 0.003315375051802735, 'mean_word_length': 2.8624, 'pattern_counts': {'":': 0, '<': 75, '<?xml version=': 0, '>': 75, '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': '4432648', 'n_tokens_mistral': 808, 'n_tokens_neox': 773, 'n_words': 136}