<commit_before>angular.module('FormDirectives', ['FormServices'])
.directive('stars', function(Data) { 
    return {
        restrict: 'A'
      , link: function(scope, element, attrs) {
          $(element).children('div').hover(function() { 
                var index = $(this).index() + 1;
                $('.star-container .star').css('background-position','bottom');
                $(this).css('background-position','top');
                rating = convert_rating_to_text(index);
                $('.star-text').html(rating);
                for(var i = 0;i<index;i++){
                    $(this).parent().find('.star:eq('+i+')').css('background-position','top');
                }
          }, function() {
                var current_rating = Data.rating;

                var rating = convert_rating_to_text(current_rating - 1);
                $('.star-text').html(rating);

                $('.star-container .star').css('background-position','bottom');
                for(var i = 0;i<current_rating;i++){
                    $('.star-container').find('.star:eq('+i+')').css('background-position','top');
                }
              
          }).bind('click', function() {
                Data.rating = $(this).index() + 1;
          });
          /*
            $('.dynamic-stars .star-container .star').hover(function(){
                var index = $(this).index();
                var rating = "";
                $('.star-container .star').css('background-position','bottom');
                $(this).css('background-position','top');
                rating = convert_rating_to_text(index);
                $('.star-text span').html(rating);
                for(var i = 0;i<index;i++){<commit_msg>idiot Kennwel<commit_after>angular.module('FormDirectives', ['FormServices'])
.directive('stars', function(Data) { 
    return {
        restrict: 'A'
      , link: function(scope, element, attrs) {
          $(element).children('div').hover(function() { 
                var index = $(this).index() + 1;
                $('.star-container .star').css('background-position','bottom');
                $(this).css('background-position','top');
                rating = convert_rating_to_text(index);
                $('.star-text').html(rating);
                for(var i = 0;i<index;i++){
                    $(this).parent().find('.star:eq('+i+')').css('background-position','top');
                }
          }, function() {
                var current_rating = Data.rating;

                var rating = convert_rating_to_text(current_rating);
                $('.star-text').html(rating);

                $('.star-container .star').css('background-position','bottom');
                for(var i = 0;i<current_rating;i++){
                    $('.star-container').find('.star:eq('+i+')').css('background-position','top');
                }
              
          }).bind('click', function() {
                Data.rating = $(this).index() + 1;
          });
          /*
            $('.dynamic-stars .star-container .star').hover(function(){
                var index = $(this).index();
                var rating = "";
                $('.star-container .star').css('background-position','bottom');
                $(this).css('background-position','top');
                rating = convert_rating_to_text(index);
                $('.star-text span').html(rating);
                for(var i = 0;i<index;i++){
{'fraction_non_alphanumeric': 0.19062863795110593, 'fraction_numerical': 0.0032013969732246797, 'mean_word_length': 1.765084473049075, 'pattern_counts': {'":': 0, '<': 9, '<?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': '928524', 'n_tokens_mistral': 946, 'n_tokens_neox': 880, 'n_words': 127}