<commit_before><commit_msg>added simple ruby script to generate some redis test data<commit_after>#!/usr/bin/env ruby

require 'rubygems'
require 'redis'

redis = Redis.new

# puts "This test suite flushes Redis. Are you sure you want to do this?"

redis.flushall

# add some data so we can test

def randstr
  (0...50).map{ ('a'..'z').to_a[rand(26)] }.join
end

for i in 1..100
  redis.set(i, randstr)
end


{'fraction_non_alphanumeric': 0.12745098039215685, 'fraction_numerical': 0.022058823529411766, 'mean_word_length': 3.8117647058823527, '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': '4982837', 'n_tokens_mistral': 162, 'n_tokens_neox': 152, 'n_words': 52}