<commit_before>package vault

import (
	"bytes"
	"fmt"
	"math/rand"
	"regexp"
	"time"
)

var chars = "!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~"

func random(n int, policy string) string {
	re := regexp.MustCompile("[^" + policy + "]")
	keep := re.ReplaceAllString(chars, "")
	fmt.Println("Keeping these chars:", keep)

	var buffer bytes.Buffer

	for i := 0; i < n; i++ {
		buffer.WriteString(string(keep[rand.Intn(len(keep))]))
	}<commit_msg>Removed extraneous debugging printf<commit_after>package vault

import (
	"bytes"
	"math/rand"
	"regexp"
	"time"
)

var chars = "!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~"

func random(n int, policy string) string {
	re := regexp.MustCompile("[^" + policy + "]")
	keep := re.ReplaceAllString(chars, "")

	var buffer bytes.Buffer

	for i := 0; i < n; i++ {
		buffer.WriteString(string(keep[rand.Intn(len(keep))]))
	}
{'fraction_non_alphanumeric': 0.21177685950413222, 'fraction_numerical': 0.022727272727272728, 'mean_word_length': 5.211538461538462, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, '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': '3776907', 'n_tokens_mistral': 443, 'n_tokens_neox': 397, 'n_words': 70}