<commit_before>package main

/* Copyright 2014, <NAME> <<EMAIL>>
See the LICENSE file for more details. */

import (
	"bufio"
	"fmt"
	"math/rand"

	"github.com/tbogdala/noisey"
	"os"
)

func main() {
	fmt.Println("Doing a noisey test.")

	const imageSize int = 128

	// make a test generator seeded to 1
	r := rand.New(rand.NewSource(int64(1)))

	// create a new perlin noise generator with a 'standard' 256 int
	// table of random permutations
	perlin := noisey.NewPerlinGenerator2D(r, 256)

	// make an ascii pixel image by calculating random noise
	pixels := make([]float64, imageSize*imageSize)
	for i := 0; i < 100; i++ {
		for y := 0; y < imageSize; y++ {
			for x := 0; x < imageSize; x++ {
				v := perlin.Get(float64(x)*0.1, float64(y)*0.1, noisey.FastQuality)
				v = v*0.5 + 0.5
				pixels[y*imageSize+x] = v
			}
		}
	}

	// print the image out to the terminal using the symbols below
	symbols := []string{" ", "░", "▒", "▓", "█", "█"}
	out := bufio.NewWriter(os.Stdout)
	for y := 0; y < imageSize; y++ {
		for x := 0; x < imageSize; x++ {
			fmt.Fprint(out, symbols[int(pixels[y*imageSize+x]/0.2)])
		}
		fmt.Fprintln(out)
	}
	out.Flush()
}<commit_msg>didnt need 100 runs of the loop.<commit_after>package main

/* Copyright 2014, <NAME> <<EMAIL>>
See the LICENSE file for more details. */

import (
	"bufio"
	"fmt"
	"math/rand"

	"github.com/tbogdala/noisey"
	"os"
)

func main() {
	fmt.Println("Doing a noisey test.")

	const imageSize int = 128

	// make a test generator seeded to 1
	r := rand.New(rand.NewSource(int64(1)))

	// create a new perlin noise generator with a 'standard' 256 int
	// table of random permutations
	perlin := noisey.NewPerlinGenerator2D(r, 256)

	// make an ascii pixel image by calculating random noise
	pixels := make([]float64, imageSize*imageSize)
	for y := 0; y < imageSize; y++ {
		for x := 0; x < imageSize; x++ {
			v := perlin.Get(float64(x)*0.1, float64(y)*0.1, noisey.FastQuality)
			v = v*0.5 + 0.5
			pixels[y*imageSize+x] = v
		}
	}

	// print the image out to the terminal using the symbols below
	symbols := []string{" ", "░", "▒", "▓", "█", "█"}
	out := bufio.NewWriter(os.Stdout)
	for y := 0; y < imageSize; y++ {
		for x := 0; x < imageSize; x++ {
			fmt.Fprint(out, symbols[int(pixels[y*imageSize+x]/0.2)])
		}
		fmt.Fprintln(out)
	}
	out.Flush()
}
{'fraction_non_alphanumeric': 0.1722198182604933, 'fraction_numerical': 0.03591518823020338, 'mean_word_length': 3.3870967741935485, 'pattern_counts': {'":': 0, '<': 18, '<?xml version=': 0, '>': 9, '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': '1656114', 'n_tokens_mistral': 1009, 'n_tokens_neox': 899, 'n_words': 262}