<commit_before>/**
 * Create a redis client
 */

var _ = require('lodash');
var redis = require('redis');

module.exports = function client (config) {

  var redisConfig = _.defaults(config || {}, { host: 'localhost', port: 6379, options: { } });
  redisConfig.options.retry_max_delay = redisConfig.options.retry_max_delay || 10000;

  var redisClient = redis.createClient(redisConfig.port, redisConfig.host, redisConfig.options);

  redisClient.on('error', function (err) {
    console.error('Error connecting to redis [%s:%s] - %s', redisConfig.host, redisConfig.port, err.message);
  });

  redisClient.on('ready', function () {
    // Do nothing - assume success unless proven otherwise
  });

  redisClient.select(redisConfig.db || 0);

  return redisClient;

};
<commit_msg>Remove dead code<commit_after>/**
 * Create a redis client
 */

var _ = require('lodash');
var redis = require('redis');

module.exports = function client (config) {

  var redisConfig = _.defaults(config || {}, { host: 'localhost', port: 6379, options: { } });
  redisConfig.options.retry_max_delay = redisConfig.options.retry_max_delay || 10000;

  var redisClient = redis.createClient(redisConfig.port, redisConfig.host, redisConfig.options);

  redisClient.on('error', function (err) {
    console.error('Error connecting to redis [%s:%s] - %s', redisConfig.host, redisConfig.port, err.message);
  });

  redisClient.select(redisConfig.db || 0);

  return redisClient;

};

{'fraction_non_alphanumeric': 0.15374056280027454, 'fraction_numerical': 0.013726835964310227, 'mean_word_length': 4.564885496183206, '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': '3051070', 'n_tokens_mistral': 501, 'n_tokens_neox': 473, 'n_words': 103}