<commit_before>klimaChallenge.controller('newsCtrl', function($scope, $http, $sce) {

   $scope.facebookImages = Array();

   $http.get('https://graph.facebook.com/v2.4/klimachallenge/photos/uploaded?fields=link,width,name,images&limit=10&access_token=<KEY>').
   success(function(data, status, headers, config) {

      angular.forEach(data.data, function(image, key) {

         // Only take images when they are big enough
         if (image.width >= 720) {
            if (image.name) {

               // Shorten image text if longer than 160 chars
               if (image.name.length > 160) {
                  var newText = image.name.substring(0,140);
                  var i = 140;
                  while (image.name.charAt(i) != " ") {
                     newText = newText + image.name.charAt(i);
                     i++;
                  }
                  image.name = newText;
                  image.showReadMore = true;
               }
            }
            $scope.facebookImages.push(image);
         }
      });
   });
});
<commit_msg>Upgrade Facebook API to v. 2.10<commit_after>klimaChallenge.controller('newsCtrl', function($scope, $http, $sce) {

   $scope.facebookImages = Array();

   $http.get('https://graph.facebook.com/v2.10/klimachallenge/photos/uploaded?fields=link,width,name,images&limit=10&access_token=<KEY>').
   success(function(data, status, headers, config) {

      angular.forEach(data.data, function(image, key) {

         // Only take images when they are big enough
         if (image.width >= 720) {
            if (image.name) {

               // Shorten image text if longer than 160 chars
               if (image.name.length > 160) {
                  var newText = image.name.substring(0,140);
                  var i = 140;
                  while (image.name.charAt(i) != " ") {
                     newText = newText + image.name.charAt(i);
                     i++;
                  }
                  image.name = newText;
                  image.showReadMore = true;
               }
            }
            $scope.facebookImages.push(image);
         }
      });
   });
});

{'fraction_non_alphanumeric': 0.1313460642757336, 'fraction_numerical': 0.020493712156497437, 'mean_word_length': 1.6388206388206388, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '467022', 'n_tokens_mistral': 665, 'n_tokens_neox': 597, 'n_words': 115}