<commit_before>var headcountControllers = angular.module('headcountControllers', []);


headcountControllers.controller('headcountMainPage', ['$scope', '$http', function ($scope, $http) {
  var recentCountLimit = 5;

  $scope.headcounts = [];
  $http({
    method: 'GET',
    url: '/api/headcount/recent?limit=' + recentCountLimit,
  }).success(function (data, status) {
    data.forEach(function(x) {x.ts = moment(x.ts)});
    $scope.headcounts = data;
  }).error(function (data, status) {
    console.error('Error occurred: ' + data);
  });
<commit_msg>add loading bar to recent headcounts<commit_after>var headcountControllers = angular.module('headcountControllers', []);


headcountControllers.controller('headcountMainPage', ['$scope', '$http', function ($scope, $http) {
  var recentCountLimit = 5;

  $scope.headcounts = [];
  NProgress.start();
  $http({
    method: 'GET',
    url: '/api/headcount/recent?limit=' + recentCountLimit,
  }).success(function (data, status) {
    data.forEach(function(x) {x.ts = moment(x.ts)});
    NProgress.done(function() {
      $scope.headcounts = data;
    });
  }).error(function (data, status) {
    console.error('Error occurred: ' + data);
    NProgress.done();
  });

{'fraction_non_alphanumeric': 0.180623973727422, 'fraction_numerical': 0.0016420361247947454, 'mean_word_length': 4.540909090909091, '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': '1863012', 'n_tokens_mistral': 399, 'n_tokens_neox': 396, 'n_words': 74}