<commit_before>package nd

import (
  "crypto/rand"
  mr "math/rand"
)

var IntRand func() int
var IntnRand func(int) int
var CryptRand func([]byte) (int, error)

func init() {
  ResetIntRand()
  ResetIntnRand()
  ResetCryptRand()
}

func ResetCryptRand() {
  CryptRand = func(b []byte) (int, error) { return rand.Read(b) }
}

func ForceCryptRand(forced []byte) {
  CryptRand = func(b []byte) (int, error) {
    n := copy(b, forced)
    return n, nil
  }
}

func ResetIntRand() {
  IntRand = func() int { return mr.Int() }
}

func ForceIntRand(forced int) {
  IntRand = func() int { return forced }
}<commit_msg>Adding a seed to generate random numbers<commit_after>package nd

import (
  "time"
  "crypto/rand"
  mr "math/rand"
)

var IntRand func() int
var IntnRand func(int) int
var CryptRand func([]byte) (int, error)

func init() {
  mr.Seed(time.Now().UTC().UnixNano())
  ResetIntRand()
  ResetIntnRand()
  ResetCryptRand()
}

func ResetCryptRand() {
  CryptRand = func(b []byte) (int, error) { return rand.Read(b) }
}

func ForceCryptRand(forced []byte) {
  CryptRand = func(b []byte) (int, error) {
    n := copy(b, forced)
    return n, nil
  }
}

func ResetIntRand() {
  IntRand = func() int { return mr.Int() }
}

func ForceIntRand(forced int) {
  IntRand = func() int { return forced }
}
{'fraction_non_alphanumeric': 0.15242494226327943, 'fraction_numerical': 0.0, 'mean_word_length': 3.8689138576779025, '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': '6968299', 'n_tokens_mistral': 524, 'n_tokens_neox': 478, 'n_words': 132}