<commit_before>(function() {
    
    "use strict";
    
    angular.module('common.upload', [])
    
    .directive('upload', [function() {
        return {
            restrict: 'EA',
            replace: false,
            scope: {
                upload: '=',
                ngModel: '=',
            },
            transclude: true,
            template: "<form style='margin: 0;' method='POST' enctype='multipart/form-data'>" +
                "<input type='file' name='{{ uploadName }}' style='display: none;'/>" +
                "<span style='float: left; position: relative;' class='fake-uploader' readonly='readonly' ng-model='avatar'>" +            
                    "<span ng-transclude></span>" +
                    "<strong ng-show='progress > 0' ng-class='{ \"text-success\": progress == 100, \"text-info\": progress < 100 }' style='width: {{ progress }}%'>{{ progress }}%</strong>" +
                "</span>" +
            "</form>",
            link: function($scope, element, attrs) {
                $scope.uploadName = attrs.uploadName || "file";

                $scope.progress = 0;
                $scope.avatar = '';
<commit_msg>code update<commit_after>(function() {
    
    "use strict";
    
    angular.module('common.upload', [])
    
    .directive('upload', [function() {
        return {
            restrict: 'EA',
            replace: false,
            scope: {
                upload: '=',
                ngModel: '=',
                ngChange: '&',
                ngError: '&'
            },
            transclude: true,
            template: "<form style='margin: 0;' method='POST' enctype='multipart/form-data'>" +
                "<input type='file' name='{{ uploadName }}' style='display: none;'/>" +
                "<span style='float: left; position: relative;' class='fake-uploader' readonly='readonly' ng-model='avatar'>" +            
                    "<span ng-transclude></span>" +
                    "<strong ng-show='progress > 0' ng-class='{ \"text-success\": progress == 100, \"text-info\": progress < 100 }' style='width: {{ progress }}%'>{{ progress }}%</strong>" +
                "</span>" +
            "</form>",
            link: function($scope, element, attrs) {
                $scope.uploadName = attrs.uploadName || "file";

                $scope.progress = 0;
                $scope.avatar = '';

{'fraction_non_alphanumeric': 0.18040370058873004, 'fraction_numerical': 0.007569386038687973, 'mean_word_length': 1.6610738255033557, 'pattern_counts': {'":': 4, '<': 23, '<?xml version=': 0, '>': 23, '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': '2326014', 'n_tokens_mistral': 680, 'n_tokens_neox': 647, 'n_words': 131}