<commit_before>"use strict";

/**
 * @ngdoc overview
 * @name algoland
 * @description
 * # algoland
 *
 * Main module of the application.
 */

var app = angular.module("algoland", [
    "ngAnimate",
    "ngCookies",
    "ngResource",
    "ngRoute",
    "ngSanitize",
    "ngTouch",
    "hc.marked",
    "angularUtils.directives.dirDisqus"
]);

app.constant("hljs", window.hljs)
    .constant("jQuery", window.jQuery)
    .constant("moment", window.moment)
    .constant("appConfig", {
        latestAlgosAmount: 10,
        algosUrl: "algos/catalog.json",
        algoInfoUrl: "algos/{category}/{algo}.md",

        github: "tabalinas/algoland.net",
        twitter: "algolandnet",

        routes: [
            { url: "/", view: "views/main.html", controller: "MainCtrl", title: "Home", root: true },
            { url: "/algo", view: "views/algo.html", controller: "AlgoCtrl", title: "Algorithms", root: true },
            { url: "/algo/:algo", view: "views/algo-info.html", controller: "AlgoInfoCtrl" },
            { url: "/about", view: "views/about.html", controller: "AboutCtrl", title: "About", root: true },
            { url: "/search/:query", view: "views/search.html", controller: "SearchCtrl", title: "Algorithms Search" }
        ]
    });

app.config(function($routeProvider, appConfig) {
        angular.forEach(appConfig.routes, function(route) {
            $routeProvider
                .when(route.url, {
                    title: route.title,
                    templateUrl: route.view,
                    controller: route.controller
                });
        });

        $routeProvider.otherwise({
            redirectTo: "/"
        });
    })
    .config(function($locationProvider) {
        $locationProvider.html5Mode(true);
    })
    .config(function(markedProvider, hljs) {
        markedProvider.setOptions({
            gfm: true,
            tables: true,
            highlight: function(code) {
                return hljs.highlightAuto(code).value;
            }
        });
    });

app.run(["$location", "$rootScope", "$anchorScroll", function($location, $rootScope, $anchorScroll) {
    $rootScope.$on("$routeChangeSuccess", function(event, current) {
        $rootScope.title = current.$$route.title;

        if($location.hash())
            setTimeout(function() {
                $anchorScroll();
            });
    });
}]);
<commit_msg>Lint: Add curly braces for condition body<commit_after>"use strict";

/**
 * @ngdoc overview
 * @name algoland
 * @description
 * # algoland
 *
 * Main module of the application.
 */

var app = angular.module("algoland", [
    "ngAnimate",
    "ngCookies",
    "ngResource",
    "ngRoute",
    "ngSanitize",
    "ngTouch",
    "hc.marked",
    "angularUtils.directives.dirDisqus"
]);

app.constant("hljs", window.hljs)
    .constant("jQuery", window.jQuery)
    .constant("moment", window.moment)
    .constant("appConfig", {
        latestAlgosAmount: 10,
        algosUrl: "algos/catalog.json",
        algoInfoUrl: "algos/{category}/{algo}.md",

        github: "tabalinas/algoland.net",
        twitter: "algolandnet",

        routes: [
            { url: "/", view: "views/main.html", controller: "MainCtrl", title: "Home", root: true },
            { url: "/algo", view: "views/algo.html", controller: "AlgoCtrl", title: "Algorithms", root: true },
            { url: "/algo/:algo", view: "views/algo-info.html", controller: "AlgoInfoCtrl" },
            { url: "/about", view: "views/about.html", controller: "AboutCtrl", title: "About", root: true },
            { url: "/search/:query", view: "views/search.html", controller: "SearchCtrl", title: "Algorithms Search" }
        ]
    });

app.config(function($routeProvider, appConfig) {
        angular.forEach(appConfig.routes, function(route) {
            $routeProvider
                .when(route.url, {
                    title: route.title,
                    templateUrl: route.view,
                    controller: route.controller
                });
        });

        $routeProvider.otherwise({
            redirectTo: "/"
        });
    })
    .config(function($locationProvider) {
        $locationProvider.html5Mode(true);
    })
    .config(function(markedProvider, hljs) {
        markedProvider.setOptions({
            gfm: true,
            tables: true,
            highlight: function(code) {
                return hljs.highlightAuto(code).value;
            }
        });
    });

app.run(["$location", "$rootScope", "$anchorScroll", function($location, $rootScope, $anchorScroll) {
    $rootScope.$on("$routeChangeSuccess", function(event, current) {
        $rootScope.title = current.$$route.title;

        if($location.hash()) {
            setTimeout(function() {
                $anchorScroll();
            });
        }
    });
}]);

{'fraction_non_alphanumeric': 0.16113645790128578, 'fraction_numerical': 0.001244296972210701, 'mean_word_length': 2.2347417840375585, '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': '5478962', 'n_tokens_mistral': 1455, 'n_tokens_neox': 1421, 'n_words': 260}