<commit_before><!doctype html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Untitled Document</title>
</head>
<body>


<!--
The Model-View-ViewModel Pattern
The fact is the MVC pattern plays a predominant role in the browser. All popular JavaScript frameworks, including AngularJS, use this pattern as the basic approach to structure the application. However, often used in the area of client-side web application is an extended version of the MVC pattern: the Model-View-ViewModel pattern, or MVVM for short.
-->
</body>
</html>
<commit_msg>Module 2.2<commit_after><!doctype html>
<html>

<head>
    <meta charset="UTF-8">
    <title>Module 2.2</title>
</head>

<body ng-app="myApp">


    <!--
The Model-View-ViewModel Pattern
The fact is the MVC pattern plays a predominant role in the browser. All popular JavaScript frameworks, including AngularJS, use this pattern as the basic approach to structure the application. However, often used in the area of client-side web application is an extended version of the MVC pattern: the Model-View-ViewModel pattern, or MVVM for short.
-->
    <div ng-controller="MyCtrl">
        <div>
            <p>
                Hello, {{user.name | uppercase}}!
                <br> Five years ago you were {{user.age - 5}} years old.
                <br> and his email id is {{user.email | atlcase }}
            </p>
            <h3>{{ 'My name is <NAME>' | endwith:'Bhakuni'}}</h3>
            <div>
                <h2>The family member of {{user.name}}</h2>
                <ul>
                    <li ng-repeat="member in family | endwith:'Stark'">{{member}}</li>
                </ul>
            </div>
        </div>
    </div>


    <script src="bower_components/angular/angular.js"></script>
    <script>
        var app = angular.module('myApp', []);
        app.controller("MyCtrl", function($scope) {
            // a simple JavaScript object
            $scope.user = {
                name: '<NAME>',
                age: 27,
                email: '<EMAIL>'
            }

            // a simple JavaScript array
            $scope.family = [
                '<NAME>', '<NAME>', '<NAME>', 'dg', 'Ned Stark', '<NAME>', '<NAME>', '<NAME>'
            ];

            $scope.loggedIn = true;

        });

        // Customs filter for alternate case

        app.filter('atlcase', function() {
            return function(input) {
                var output = '',
                    tmp;
                for (var i = 0; i < input.length; i++) {
                    tmp = input.charAt(i);
                    if (i % 2 == 0) {
                        output += tmp.toUpperCase();
                    } else {
                        output += tmp.toLowerCase();
                    }
                }
                return output;
            };
        });

        app.filter('endwith', function() {
            return function(inArr, endsWith) {
                console.log(typeof(inArr));
                var outputArray = [],
                    subStr, hasMinLen, isSubStrMatch;
                if (typeof(inArr) == 'string') {
                    var outputArray = '';
                    if (inArr.length >= endsWith.length && inArr.substring(inArr.length - endsWith.length) === endsWith) {
                        outputArray = inArr;
                    }
                } else {
                    angular.forEach(inArr, function(item) {
                        console.log(item);
                        hasMinLen = item.length >= endsWith.length;
                        subStr = item.substring(item.length - endsWith.length);
                        isSubStrMatch = subStr === endsWith;
                        if (hasMinLen && isSubStrMatch) {
                            outputArray.push(item);
                        }
                    });
                }
                return outputArray;
            };
        });
    </script>
</body>

</html>

{'fraction_non_alphanumeric': 0.12290502793296089, 'fraction_numerical': 0.004062976130015236, 'mean_word_length': 1.464956195244055, 'pattern_counts': {'":': 0, '<': 57, '<?xml version=': 0, '>': 58, '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': '1611500', 'n_tokens_mistral': 1081, 'n_tokens_neox': 1000, 'n_words': 301}