<commit_before>var request = require('request');  
var parseString = require('xml2js').parseString;
var colors = require('colors');

function getToolsListing (next) {
  request('https://s3.amazonaws.com/tessel-tools/', {
    headers: {
      'User-Agent': 'tessel'
    }
  }, function (err, res, body) {
    if (err) {
      return next(err);
    }

    parseString(body, {
      explicitArray: true,
    }, function (err, result) {
        if (err) {
          return next(err);
        }

        try {
          var entries = result.ListBucketResult.Contents.map(function (entry) {
            var obj = {};
            for (var key in entry) {
              obj[key.replace(/^./, function (a) { return a.toLowerCase(); })] = entry[key].join('');
            }
            return obj;
          });

          next(null, entries);
        } catch (e) {
          return next(err);
        }
    });
  });
}

function firmwareURL (tag) {
  return 'https://s3.amazonaws.com/tessel-tools/firmware/tessel-firmware'
    + (tag == 'current' ? '' : '-' + tag)
    + '.bin';
}

exports.getToolsListing = getToolsListing;
exports.firmwareURL = firmwareURL;<commit_msg>Updates repository repo to use builds.tessel.io<commit_after>var request = require('request');  
var parseString = require('xml2js').parseString;
var colors = require('colors');

var baseURL = 'https://s3.amazonaws.com/builds.tessel.io/'

function getToolsListing (next) {
  request(baseURL, {
    headers: {
      'User-Agent': 'tessel'
    }
  }, function (err, res, body) {
    if (err) {
      return next(err);
    }

    parseString(body, {
      explicitArray: true,
    }, function (err, result) {
        if (err) {
          return next(err);
        }

        try {
          var entries = result.ListBucketResult.Contents.map(function (entry) {
            var obj = {};
            for (var key in entry) {
              obj[key.replace(/^./, function (a) { return a.toLowerCase(); })] = entry[key].join('');
            }
            return obj;
          });

          next(null, entries);
        } catch (e) {
          return next(err);
        }
    });
  });
}

function firmwareURL (tag) {
  return baseURL + 'firmware/tessel-firmware-' + tag + '.bin';
}

exports.getToolsListing = getToolsListing;
exports.firmwareURL = firmwareURL;
{'fraction_non_alphanumeric': 0.15530629853321828, 'fraction_numerical': 0.0021570319240724763, 'mean_word_length': 2.1637107776261937, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 3, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '6298198', 'n_tokens_mistral': 741, 'n_tokens_neox': 723, 'n_words': 152}