<commit_before><!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1"/>

    <title>Clippy</title>

    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.6/css/bootstrap.min.css"/>
    <style>
        [ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], .ng-cloak, .x-ng-cloak { display: none !important; }
    </style>
</head>
<body>
    <div class="container" ng-app="clippy" ng-controller="docVersions">
        <div class="page-header">
            <h1>Clippy lints documention</h1>
        </div>

        <div ng-cloak>
            <div class="alert alert-info" role="alert" ng-if="loading">
                Loading&#x2026;
            </div>
            <div class="alert alert-danger" role="alert" ng-if="error">
                Error loading versions!<br/>
                You can always try to get <a href="master/index.html">the master branch docs</a>.
            </div>

            <article class="panel panel-default" ng-show="data">
                <div class="panel-heading">
                    <h3 class="panel-title">
                        Available versions
                    </h3>
                </div>

                <ul class="list-group">
                    <a class="list-group-item" ng-repeat="version in data | orderBy"
                       href="./{{version}}/index.html">
                        {{version}}
                    </a>
                </ul>
            </article>
        </div>
    </div>

    <a href="https://github.com/rust-lang-nursery/rust-clippy">
        <img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png"/>
    </a>


    <script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.12/angular.min.js"></script>
    <script>
        angular.module('clippy', [])
        .controller('docVersions', function ($scope, $http) {
            $scope.loading = true;

            $http.get('./versions.json')
            .success(function (data) {
                $scope.data = data;
                $scope.loading = false;
            })
            .error(function (data) {
                $scope.error = data;
                $scope.loading = false;
            });
        })
        ;
    </script>
</body>
</html><commit_msg>Docs index: Sort versions in a nice way<commit_after><!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1"/>

    <title>Clippy</title>

    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.6/css/bootstrap.min.css"/>
    <style>
        [ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], .ng-cloak, .x-ng-cloak { display: none !important; }
    </style>
</head>
<body>
    <div class="container" ng-app="clippy" ng-controller="docVersions">
        <div class="page-header">
            <h1>Clippy lints documention</h1>
        </div>

        <div ng-cloak>
            <div class="alert alert-info" role="alert" ng-if="loading">
                Loading&#x2026;
            </div>
            <div class="alert alert-danger" role="alert" ng-if="error">
                Error loading versions!<br/>
                You can always try to get <a href="master/index.html">the master branch docs</a>.
            </div>

            <article class="panel panel-default" ng-show="data">
                <div class="panel-heading">
                    <h3 class="panel-title">
                        Available versions
                    </h3>
                </div>

                <ul class="list-group">
                    <a class="list-group-item" ng-repeat="version in data | orderBy:versionOrder:true"
                       href="./{{version}}/index.html">
                        {{normalizeVersion(version)}}
                    </a>
                </ul>
            </article>
        </div>
    </div>

    <a href="https://github.com/rust-lang-nursery/rust-clippy">
        <img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png"/>
    </a>


    <script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.12/angular.min.js"></script>
    <script>
        angular.module('clippy', [])
        .controller('docVersions', function ($scope, $http) {
            $scope.loading = true;

            $scope.normalizeVersion = function(v) {
                return v.replace(/^v/, '');
            };

            $scope.versionOrder = function(v) {
                if (v === 'master') { return Infinity; }
                if (v === 'current') { return Number.MAX_VALUE; }

                return $scope.normalizeVersion(v)
                    .split('.')
                    .reverse()
                    .reduce(function(acc, val, index) {
                        return acc + (val * Math.pow(100, index));
                    }, 0);
            }

            $http.get('./versions.json')
            .success(function (data) {
                $scope.data = data;
                $scope.loading = false;
            })
            .error(function (data) {
                $scope.error = data;
                $scope.loading = false;
            });
        })
        ;
    </script>
</body>
</html>
{'fraction_non_alphanumeric': 0.16348273328434973, 'fraction_numerical': 0.0106539309331374, 'mean_word_length': 1.6317061382310294, 'pattern_counts': {'":': 0, '<': 95, '<?xml version=': 0, '>': 95, 'https://': 8, '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': '4304283', 'n_tokens_mistral': 1723, 'n_tokens_neox': 1592, 'n_words': 301}