<commit_before><!-- Filters -->
<div id="filters">
    <div class="placeholder"></div>

    <div class="section">
        <div class="container row valign-wrapper">
            <div class="col s6 valign">
                <input type="checkbox" id="show_plugins" checked="checked" class="filled-in checkbox-blue"/>
                <label for="show_plugins" class="plugin uppercase">Plugin <i class="fa fa-plug plugin"></i></label>

                <input type="checkbox" id="show_themes" checked="checked" class="filled-in checkbox-magenta"/>
                <label for="show_themes" class="theme uppercase">Theme <i class="fa fa-paint-brush theme"></i></label>
            </div>
            <div class="col s6 right-align">
                <!-- Dropdown Trigger -->
                <a id="sortby_trigger" class="dropdown-button btn waves-effect waves-light light-blue" href='#'
                   data-activates='sortby'>Sorted by
                    stars <i class="fa fa-toggle-down"></i></a>
                <!-- Dropdown Structure -->
                <ul id="sortby" class='dropdown-content'>
                    <li><a href="#" data-sort="stars" class="light-blue-text">Sort by stars <i
                                class="fa fa-star"></i></a>
                    </li>
                    <li><a href="#" data-sort="forks" class="light-blue-text">Sort by forks <i
                                class="fa fa-code-fork"></i></a>
                    </li>
                    <li><a href="#" data-sort="issues" class="light-blue-text">Sort by issues <i class="fa fa-bug"></i></a>
                    </li>
                    <li class="divider"></li>
                    <li><a href="#!" data-sort="name" class="light-blue-text">Sort by name <i
                                class="fa fa-sort-alpha-asc"></i></a>
                    </li>
                    <!--            <li><a href="#!">three</a></li>-->
                </ul>
            </div>

            <script type="text/javascript">
                $('#sortby a').on('click', function () {
                    var $cards = $('.card-container'),
                        sortBy = $(this).attr('data-sort');

                    $cards.sort(function (a, b) {
                        var an, bn;

                        if ('name' === sortBy) {
                            an = $(a).find('.card-title').text();
                            bn = $(b).find('.card-title').text();

                            return an.localeCompare(bn);
                        }

                        // By GitHub details.
                        an = parseInt($(a).find('.github-details .' + sortBy + ' span').text());
                        bn = parseInt($(b).find('.github-details .' + sortBy + ' span').text());

                        // Descending sort.
                        if (an > bn)
                            return -1;

                        if (an < bn)
                            return 1;

                        return 0;
                    });

                    $cards.detach().appendTo($('#frameworks > .container'));

                    $('#sortby_trigger').html($(this).html().replace('Sort', 'Sorted'))
                });

                $('#show_plugins').change(function () {
                    if ($(this).is(':checked'))
                        $('.card-container.plugins').fadeIn();
                    else
                        $('.card-container.plugins:not(.themes)').fadeOut();
                });
                $('#show_themes').change(function () {
                    if ($(this).is(':checked'))
                        $('.card-container.themes').fadeIn();
                    else
                        $('.card-container.themes:not(.plugins)').fadeOut();
                });
            </script>
        </div>
    </div>
</div>
<!--/ Filters --><commit_msg>[filters] [sorting] [bug-fix] Fixed sorting method (was sorting by string instead of numeric values).<commit_after><!-- Filters -->
<div id="filters">
    <div class="placeholder"></div>

    <div class="section">
        <div class="container row valign-wrapper">
            <div class="col s6 valign">
                <input type="checkbox" id="show_plugins" checked="checked" class="filled-in checkbox-blue"/>
                <label for="show_plugins" class="plugin uppercase">Plugin <i class="fa fa-plug plugin"></i></label>

                <input type="checkbox" id="show_themes" checked="checked" class="filled-in checkbox-magenta"/>
                <label for="show_themes" class="theme uppercase">Theme <i class="fa fa-paint-brush theme"></i></label>
            </div>
            <div class="col s6 right-align">
                <!-- Dropdown Trigger -->
                <a id="sortby_trigger" class="dropdown-button btn waves-effect waves-light light-blue" href='#'
                   data-activates='sortby'>Sorted by
                    stars <i class="fa fa-toggle-down"></i></a>
                <!-- Dropdown Structure -->
                <ul id="sortby" class='dropdown-content'>
                    <li><a href="#" data-sort="stars" class="light-blue-text">Sort by stars <i
                                class="fa fa-star"></i></a>
                    </li>
                    <li><a href="#" data-sort="forks" class="light-blue-text">Sort by forks <i
                                class="fa fa-code-fork"></i></a>
                    </li>
                    <li><a href="#" data-sort="issues" class="light-blue-text">Sort by issues <i class="fa fa-bug"></i></a>
                    </li>
                    <li class="divider"></li>
                    <li><a href="#!" data-sort="name" class="light-blue-text">Sort by name <i
                                class="fa fa-sort-alpha-asc"></i></a>
                    </li>
                    <!--            <li><a href="#!">three</a></li>-->
                </ul>
            </div>

            <script type="text/javascript">
                $('#sortby a').on('click', function () {
                    var $cards = $('.card-container'),
                        sortBy = $(this).attr('data-sort');

                    $cards.sort(function (a, b) {
                        var an, bn;

                        if ('name' === sortBy) {
                            an = $(a).find('.card-title').text();
                            bn = $(b).find('.card-title').text();

                            return an.localeCompare(bn);
                        }

                        // By GitHub details.
                        an = $(a).find('.github-details .' + sortBy + ' span').text();
                        bn = $(b).find('.github-details .' + sortBy + ' span').text();

                        // Descending sort.
                        return bn.localeCompare(an);
                    });

                    $cards.detach().appendTo($('#frameworks > .container'));

                    $('#sortby_trigger').html($(this).html().replace('Sort', 'Sorted'))
                });

                $('#show_plugins').change(function () {
                    if ($(this).is(':checked'))
                        $('.card-container.plugins').fadeIn();
                    else
                        $('.card-container.plugins:not(.themes)').fadeOut();
                });
                $('#show_themes').change(function () {
                    if ($(this).is(':checked'))
                        $('.card-container.themes').fadeIn();
                    else
                        $('.card-container.themes:not(.plugins)').fadeOut();
                });
            </script>
        </div>
    </div>
</div>
<!--/ Filters -->
{'fraction_non_alphanumeric': 0.17451235370611184, 'fraction_numerical': 0.0009102730819245773, 'mean_word_length': 1.2567488262910798, 'pattern_counts': {'":': 0, '<': 134, '<?xml version=': 0, '>': 136, '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': '5493216', 'n_tokens_mistral': 2072, 'n_tokens_neox': 1892, 'n_words': 377}