c-programming

Simple C programs
git clone git://git.laack.co/c-programming.git
Log | Files | Refs

commit 25b5c4dd75a9068220538f3e5b4d4d229773cfd2
parent 040fdaedb0dd8c830129964ee040fd239d0c106c
Author: Andrew Laack <andrew@laack.co>
Date:   Sat, 17 Oct 2026 18:10:40 -0500

Haversine generation

Diffstat:
M.gitignore | 1+
Mperf-aware-programming/haversine/Makefile | 3++-
Mperf-aware-programming/haversine/gen.py | 4++--
3 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/.gitignore b/.gitignore @@ -1,3 +1,4 @@ *.out *artifacts* *.csv +*.json diff --git a/perf-aware-programming/haversine/Makefile b/perf-aware-programming/haversine/Makefile @@ -1,4 +1,5 @@ gen: - python3 gen.py out/out.json 100 + mkdir artifacts || true + python3 gen.py artifacts/out.json 100 clean: rm -rf out.json diff --git a/perf-aware-programming/haversine/gen.py b/perf-aware-programming/haversine/gen.py @@ -78,12 +78,12 @@ print("Avg x: " + str(sum(rndx) / len(rndx))) print("Avg y: " + str(sum(rndy) / len(rndy))) hvS = str(hav) -with open('out/results.txt', 'w') as f: +with open('artifacts/results.txt', 'w') as f: f.writelines([hvS]) h = hashlib.new('sha256') h.update(hvS.encode()) print(h.hexdigest()) -with open('out/sha.txt', 'w') as f: +with open('artifacts/sha.txt', 'w') as f: f.writelines([str(h.hexdigest())])