<commit_before>'use strict';

var _ = require('underscore');
require('isomorphic-fetch');

var cosmopolitanApiUrl = 'http://os-cosmopolitan.herokuapp.com/?format=json';

function upper(v) {
  return (v + '').toUpperCase();
}

function processFetchResponse(response) {
  if (response.status != 200) {
    throw 'Failed loading data from ' + response.url;
  }
  return response.text().then(JSON.parse);<commit_msg>#24 Change URL of API<commit_after>'use strict';

var _ = require('underscore');
require('isomorphic-fetch');

var cosmopolitanApiUrl = 'http://cosmopolitan.openspending.org/?format=json';

function upper(v) {
  return (v + '').toUpperCase();
}

function processFetchResponse(response) {
  if (response.status != 200) {
    throw 'Failed loading data from ' + response.url;
  }
  return response.text().then(JSON.parse);
{'fraction_non_alphanumeric': 0.16105769230769232, 'fraction_numerical': 0.009615384615384616, 'mean_word_length': 5.125, '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': '7560796', 'n_tokens_mistral': 276, 'n_tokens_neox': 264, 'n_words': 55}