<commit_before>function classificacao(event) {
    if (!event) {
        return false;
    }
    switch (event.classificacaoEtaria) {
        case 'Livre':
            return 'clivre';

        case '18 anos':
            return 'c18';

        case '16 anos':
            return 'c16';

        case '14 anos':
            return 'c14';

        case '12 anos':
            return 'c12';

        case '10 anos':
            return 'c10';
    }
}
angular.module('mapasculturais.controllers', [])

    .controller('eventsCtrl', [
        '$scope', 'mapas.service.event', 'FavoriteEvents', function ($scope, eventApi, FavoriteEvents) {
            var api = eventApi(window.config.url);
            var _limit = 25;
            var _page = 1;
            var _endData = false;
            var _lastGroup = null;
            var _now = moment().format('X');
            
            $scope.groups = [];
            $scope.notFound = false;

            $scope.filters = {};


            $scope.moreDataCanBeLoaded = function () {
                return !_endData;
            }

            $scope.loadMore = function () {
                var events, from;
                var params = {
                    '@limit': _limit,
                    '@page': _page
                };
                
                if($scope.filters.showPast){
                    from = $scope.filters.from;
                } else {
                    from = moment().toDate();
                }

                if($scope.filters.keyword){
                    params['@keyword'] = '%' + $scope.filters.keyword + '%';
                }

                if($scope.filters.linguagem){
                    params['term:linguagem'] = $IN($scope.filters.linguagem);
                }

                if($scope.filters.verified){
                    params['isVerified'] = $EQ('true');
                }

                if ($scope.findFunction) {
                    var entityId = $scope.findEntityId;
                    events = api[$scope.findFunction](entityId, from, $scope.filters.to, params);
                } else {
                    events = api.find(from, $scope.filters.to, params);
                }

                _page++;

                events.then(function (rs) {
                    var happening;
                    
                    if (rs.length < _limit) {
                        _endData = true;<commit_msg>corrige filtro pela data inicial<commit_after>function classificacao(event) {
    if (!event) {
        return false;
    }
    switch (event.classificacaoEtaria) {
        case 'Livre':
            return 'clivre';

        case '18 anos':
            return 'c18';

        case '16 anos':
            return 'c16';

        case '14 anos':
            return 'c14';

        case '12 anos':
            return 'c12';

        case '10 anos':
            return 'c10';
    }
}
angular.module('mapasculturais.controllers', [])

    .controller('eventsCtrl', [
        '$scope', 'mapas.service.event', 'FavoriteEvents', function ($scope, eventApi, FavoriteEvents) {
            var api = eventApi(window.config.url);
            var _limit = 25;
            var _page = 1;
            var _endData = false;
            var _lastGroup = null;
            var _now = moment().format('X');
            
            $scope.groups = [];
            $scope.notFound = false;

            $scope.filters = {};


            $scope.moreDataCanBeLoaded = function () {
                return !_endData;
            }

            $scope.loadMore = function () {
                var events, from;
                var params = {
                    '@limit': _limit,
                    '@page': _page
                };
                
                if($scope.filters.showPast || ($scope.filters.from && moment($scope.filters.from).toDate() > moment().toDate())){
                    from = $scope.filters.from;
                } else {
                    from = moment().toDate();
                }

                if($scope.filters.keyword){
                    params['@keyword'] = '%' + $scope.filters.keyword + '%';
                }

                if($scope.filters.linguagem){
                    params['term:linguagem'] = $IN($scope.filters.linguagem);
                }

                if($scope.filters.verified){
                    params['isVerified'] = $EQ('true');
                }

                if ($scope.findFunction) {
                    var entityId = $scope.findEntityId;
                    events = api[$scope.findFunction](entityId, from, $scope.filters.to, params);
                } else {
                    events = api.find(from, $scope.filters.to, params);
                }

                _page++;

                events.then(function (rs) {
                    var happening;
                    
                    if (rs.length < _limit) {
                        _endData = true;
{'fraction_non_alphanumeric': 0.12282476730068798, 'fraction_numerical': 0.009307972480777013, 'mean_word_length': 1.1594582787243337, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 4, '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': '3356099', 'n_tokens_mistral': 1367, 'n_tokens_neox': 1243, 'n_words': 252}