<commit_before>function CategoriesCtrl($stateParams, Resource, $http, GetResourcesService) {
  var self = this;
  self.name = $stateParams.name;
  // Resource.query().$promise.then(function (result) {
  //   self.resources = result.filter(function (result) {
  //     if (result.category.toLowerCase() === self.name.toLowerCase()) {
  //       return result;
  //     }
  //   });
  // });

  GetResourcesService.getResources()
    .then(function (res) {
      self.resources = res.data.filter(function (result) {
        if (result.category.toLowerCase() === self.name.toLowerCase()) {
          return result;
        }<commit_msg>add other version of http request to show<commit_after>function CategoriesCtrl($stateParams, Resource, $http, GetResourcesService) {
  var self = this;
  self.name = $stateParams.name;
  // Resource.query().$promise.then(function (result) {
  //   self.resources = result.filter(function (result) {
  //     if (result.category.toLowerCase() === self.name.toLowerCase()) {
  //       return result;
  //     }
  //   });
  // });

  // $http({
  //   method: 'GET',
  //   url: 'api/resources'
  // })
  // .then(function (data) {
  //   self.resources = data.data.filter(function (result) {
  //     if (result.category.toLowerCase() === self.name.toLowerCase()) {
  //       return result;
  //     }
  //   });
  // });

  GetResourcesService.getResources()
    .then(function (res) {
      self.resources = res.data.filter(function (result) {
        if (result.category.toLowerCase() === self.name.toLowerCase()) {
          return result;
        }
{'fraction_non_alphanumeric': 0.17391304347826086, 'fraction_numerical': 0.0, 'mean_word_length': 2.5685393258426967, 'pattern_counts': {'":': 0, '<': 3, '<?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': '2012553', 'n_tokens_mistral': 478, 'n_tokens_neox': 493, 'n_words': 84}