<commit_before>package common

import (
	"crypto/rand"
	"hash"
	"math/big"
)

func HashedRandomData(h hash.Hash, length uint64) (hash string, data string) {
	b := make([]byte, length)
	err, _ := rand.Read(b)
	if err != nil {
		panic(err)
	}

	h.Reset()
	h.Write(b)

	hash = string(h.Sum(nil))
	data = string(b)

	return
}

func RendezvousHash(h hash.Hash, items []string, key string) (r string) {
	r = items[0]
	v := big.NewInt(0)

	t := big.NewInt(0)
	for _, i := range items {
		//Hash
		h.Reset()<commit_msg>Fix compilation failure in common/hash<commit_after>package common

import (
	"crypto/rand"
	"hash"
	"math/big"
)

func HashedRandomData(h hash.Hash, length uint64) (hash string, data string) {
	b := make([]byte, length)
	_, err := rand.Read(b)
	if err != nil {
		panic(err)
	}

	h.Reset()
	h.Write(b)

	hash = string(h.Sum(nil))
	data = string(b)

	return
}

func RendezvousHash(h hash.Hash, items []string, key string) (r string) {
	r = items[0]
	v := big.NewInt(0)

	t := big.NewInt(0)
	for _, i := range items {
		//Hash
		h.Reset()
{'fraction_non_alphanumeric': 0.16905444126074498, 'fraction_numerical': 0.009551098376313277, 'mean_word_length': 3.5565217391304347, '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': '465570', 'n_tokens_mistral': 448, 'n_tokens_neox': 427, 'n_words': 107}