From 5713c2e060f9653e479bb93e3af7a12d281e6139 Mon Sep 17 00:00:00 2001 From: Nicholas Karlson Date: Sun, 9 Nov 2025 11:22:31 -0800 Subject: [PATCH 1/2] chore(win): reconfigure stdout to UTF-8 to avoid UnicodeEncodeError --- scripts/ch13_fitness_mixed.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/scripts/ch13_fitness_mixed.py b/scripts/ch13_fitness_mixed.py index 5eb1491..5127cf3 100644 --- a/scripts/ch13_fitness_mixed.py +++ b/scripts/ch13_fitness_mixed.py @@ -1,10 +1,18 @@ # SPDX-License-Identifier: MIT -import argparse, os +import argparse, os, math import numpy as np, pandas as pd import statsmodels.formula.api as smf import matplotlib; matplotlib.use("Agg") import matplotlib.pyplot as plt +# --- make Windows console UTF-8 friendly --- +import sys +if os.name == "nt": + try: + sys.stdout.reconfigure(encoding="utf-8") + except Exception: + pass + def hedges_g(a, b): na, nb = len(a), len(b) sa, sb = a.var(ddof=1), b.var(ddof=1) From 7330a35fad2282584c539fa27c2ba002e246ae1c Mon Sep 17 00:00:00 2001 From: Nicholas Karlson Date: Sun, 9 Nov 2025 11:28:45 -0800 Subject: [PATCH 2/2] chore: stop tracking generated *_meta.json (timestamps are ephemeral) --- .gitignore | 3 +++ data/synthetic/fitness_meta.json | 11 ----------- 2 files changed, 3 insertions(+), 11 deletions(-) delete mode 100644 data/synthetic/fitness_meta.json diff --git a/.gitignore b/.gitignore index 022665c..c1b3ec5 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,6 @@ protection*.json *.patch outputs/*.png outputs/*.pdf + +# generated metadata (timestamps change on each run) +data/synthetic/*_meta.json diff --git a/data/synthetic/fitness_meta.json b/data/synthetic/fitness_meta.json deleted file mode 100644 index f24a6ec..0000000 --- a/data/synthetic/fitness_meta.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "seed": 7, - "n": 80, - "design": "2x2 mixed (Group between \u00d7 Time within)", - "programs": [ - "ProgramA", - "ProgramB" - ], - "dv": "strength_1RM_like", - "generated_utc": "2025-11-09T18:46:49Z" -} \ No newline at end of file