save outputs, tweak num samples & output width

This commit is contained in:
NunoSempere 2024-06-02 22:30:32 +02:00
parent c4b27215e2
commit 895baeb1ad
4 changed files with 1138 additions and 2 deletions

View File

@ -298,7 +298,7 @@ func printElectoralCollegeHistogram(samples []int) {
cp := 0.0
for i, count := range histogram {
bar_length := (count * 75) / max_count // Assuming max_count bar length is 50 characters
bar_length := (count * 100) / max_count // Assuming max_count bar length is 50 characters. 75.
p := float64(count) / float64(len(samples)) * 100
cp += p
@ -491,7 +491,7 @@ func main() {
return
}
n_sims := 100_000
n_sims := 1_000_000
printStates(states)
fmt.Printf("\n\n")

View File

@ -1,6 +1,9 @@
run:
go run main.go
save:
go run main.go > "out/output-$$(date +"%Y-%m-%d").txt"
polls:
mkdir -p data/polls
rm data/polls/president_polls.csv

1133
out/output-2024-06-02.txt Normal file

File diff suppressed because it is too large Load Diff