diff --git a/data/AlleEurojackpotzahlen.csv b/data/AlleEurojackpotzahlen.csv index afb5634..b366b1b 100644 --- a/data/AlleEurojackpotzahlen.csv +++ b/data/AlleEurojackpotzahlen.csv @@ -914,3 +914,4 @@ datum;Z1;Z2;Z3;Z4;Z5;SZ1;SZ2 2025-12-26;15;21;26;29;42;4;12 2026-01-02;10;15;29;34;38;2;9 2026-01-06;21;23;30;33;38;8;12 +2026-01-09;1;17;19;25;41;6;12 diff --git a/data/generated_tips/generation_history.json b/data/generated_tips/generation_history.json index 7112c71..a40844a 100644 --- a/data/generated_tips/generation_history.json +++ b/data/generated_tips/generation_history.json @@ -125,6 +125,13 @@ "file": "weekly_tips_20260108_090029.csv", "avg_confidence": 0.49425787623829, "avg_quality": 0.6145839981272502 + }, + { + "timestamp": "2026-01-12T21:00:15.818890", + "num_tips": 10, + "file": "weekly_tips_20260112_210015.csv", + "avg_confidence": 0.49425787623829, + "avg_quality": 0.6145839981272502 } ] } \ No newline at end of file diff --git a/run_update_and_learn.sh b/run_update_and_learn.sh new file mode 100755 index 0000000..0c3c57a --- /dev/null +++ b/run_update_and_learn.sh @@ -0,0 +1,4 @@ +#!/bin/bash +cd "/Users/sebastianfrohlich/Projekte/Eurojackpot" +source venv/bin/activate +python scripts/automation/auto_update_and_learn.py diff --git a/scripts/automation/com.eurojackpot.update.plist b/scripts/automation/com.eurojackpot.update.plist new file mode 100644 index 0000000..fd85c49 --- /dev/null +++ b/scripts/automation/com.eurojackpot.update.plist @@ -0,0 +1,58 @@ + + + + + Label + com.eurojackpot.update + + ProgramArguments + + /Users/sebastianfrohlich/Projekte/Eurojackpot/run_update_and_learn.sh + + + StartCalendarInterval + + + Weekday + 3 + Hour + 8 + Minute + 0 + + + Weekday + 6 + Hour + 8 + Minute + 0 + + + + WorkingDirectory + /Users/sebastianfrohlich/Projekte/Eurojackpot + + StandardOutPath + /Users/sebastianfrohlich/Projekte/Eurojackpot/logs/update_stdout.log + StandardErrorPath + /Users/sebastianfrohlich/Projekte/Eurojackpot/logs/update_stderr.log + + RunAtLoad + + + EnvironmentVariables + + PATH + /opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin + LANG + de_DE.UTF-8 + + + LaunchOnlyOnce + + + Nice + 10 + + diff --git a/scripts/generators/ultimate_ai_ml_eurojackpot_generator.py b/scripts/generators/ultimate_ai_ml_eurojackpot_generator.py index 8fd4331..3ad4f74 100644 --- a/scripts/generators/ultimate_ai_ml_eurojackpot_generator.py +++ b/scripts/generators/ultimate_ai_ml_eurojackpot_generator.py @@ -1673,14 +1673,21 @@ def main(): print("⚑ OPTIMIZED VERSION with Progress Indicators") print("=" * 70) - data_path = "/Users/sebastianfrohlich/Library/Mobile Documents/com~apple~CloudDocs/Jupyter Notebooks/AlleEurojackpotzahlen.csv" + # Use --data-dir parameter or default to Projekte path + import argparse + parser = argparse.ArgumentParser() + parser.add_argument('--data-dir', type=str, default="/Users/sebastianfrohlich/Projekte/Eurojackpot/data") + parser.add_argument('--num-tips', type=int, default=10) + args = parser.parse_args() + + data_path = os.path.join(args.data_dir, "AlleEurojackpotzahlen.csv") try: # Initialize with fast mode generator = UltimateAIMLEurojackpotGenerator(data_path, fast_mode=True) # Generate Tips - tips = generator.generate_ultimate_tips(10) + tips = generator.generate_ultimate_tips(args.num_tips) if tips: print("\nπŸ† GENERATION COMPLETED!") diff --git a/scripts/utils/notifier.py b/scripts/utils/notifier.py index eac80f3..b278553 100644 --- a/scripts/utils/notifier.py +++ b/scripts/utils/notifier.py @@ -60,24 +60,41 @@ class EurojackpotNotifier: """ subject = f"🎲 {len(tips)} neue Eurojackpot-Tipps generiert!" - # Sortiere Tips nach Confidence - sorted_tips = sorted(tips, key=lambda x: x.get('confidence', 0), reverse=True) + # Statistiken + avg_conf = sum(t.get('confidence', 0) for t in tips) / len(tips) if tips else 0 + avg_qual = sum(t.get('quality', 0) for t in tips) / len(tips) if tips else 0 - # Top 5 formatieren - top5_text = "" - for i, tip in enumerate(sorted_tips[:5], 1): + # Top 3 nach Confidence + sorted_by_conf = sorted(tips, key=lambda x: x.get('confidence', 0), reverse=True)[:3] + top3_conf_text = "" + for i, tip in enumerate(sorted_by_conf, 1): + emoji = "πŸ₯‡" if i == 1 else "πŸ₯ˆ" if i == 2 else "πŸ₯‰" main = tip.get('main_numbers', '?') euro = tip.get('euro_numbers', '?') conf = tip.get('confidence', 0) - strat = tip.get('strategy', 'UNKNOWN') qual = tip.get('quality', 0) + strat = tip.get('strategy', 'UNKNOWN') - # Emoji basierend auf Rang - emoji = "πŸ†" if i == 1 else "πŸ₯ˆ" if i == 2 else "πŸ₯‰" if i == 3 else "⭐" - - top5_text += f"""{emoji} #{i} - Confidence: {conf:.2%} + top3_conf_text += f"""{emoji} #{i} - Conf: {conf:.2%} | Q: {qual:.3f} πŸ”’ {main} + ⭐ {euro} -πŸ“ˆ {strat} | Quality: {qual:.3f} +πŸ“ˆ {strat} + +""" + + # Top 3 nach Quality + sorted_by_qual = sorted(tips, key=lambda x: x.get('quality', 0), reverse=True)[:3] + top3_qual_text = "" + for i, tip in enumerate(sorted_by_qual, 1): + emoji = "πŸ₯‡" if i == 1 else "πŸ₯ˆ" if i == 2 else "πŸ₯‰" + main = tip.get('main_numbers', '?') + euro = tip.get('euro_numbers', '?') + conf = tip.get('confidence', 0) + qual = tip.get('quality', 0) + strat = tip.get('strategy', 'UNKNOWN') + + top3_qual_text += f"""{emoji} #{i} - Q: {qual:.3f} | Conf: {conf:.2%} +πŸ”’ {main} + ⭐ {euro} +πŸ“ˆ {strat} """ @@ -87,9 +104,16 @@ class EurojackpotNotifier: πŸ“Š Anzahl Tipps: {len(tips)} ⏰ Zeitpunkt: {timestamp} -πŸ† TOP 5 EMPFEHLUNGEN: +πŸ“Š STATISTIKEN: +🎯 Ø Confidence: {avg_conf:.4f} +πŸ’Ž Ø Quality: {avg_qual:.4f} + +🎯 TOP 3 NACH CONFIDENCE: ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ -{top5_text} +{top3_conf_text} +πŸ’Ž TOP 3 NACH QUALITY: +━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +{top3_qual_text} πŸ’‘ Alle 10 Tipps findest du in der CSV-Datei! Viel GlΓΌck! πŸ€