Initial commit: Eurojackpot analysis and prediction system
This repository contains a comprehensive Eurojackpot lottery analysis and prediction system including: - Historical data analysis and processing - ML-based prediction models - Automated weekly tip generation - Position and range analysis tools - Notification system for results 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
commit
70e0638dee
67 files changed
+8491869
No files matched your search
@@ -0,0 +1,358 @@
|
||||
# Eurojackpot Automation System
|
||||
|
||||
Vollautomatisches System für wöchentliche Tipp-Generierung und Learning nach Ziehungen.
|
||||
|
||||
## 📋 Überblick
|
||||
|
||||
Das System besteht aus 2 Hauptkomponenten:
|
||||
|
||||
1. **Weekly Tip Generator** - Generiert automatisch Tipps vor Ziehungen
|
||||
2. **Auto Update & Learn** - Aktualisiert Daten und lernt nach Ziehungen
|
||||
|
||||
## 🚀 Installation
|
||||
|
||||
### 1. Virtuelle Umgebung aktivieren
|
||||
|
||||
```bash
|
||||
cd "/Users/sebastianfrohlich/Library/Mobile Documents/com~apple~CloudDocs/Jupyter Notebooks/Eurojackpot"
|
||||
source venv/bin/activate
|
||||
```
|
||||
|
||||
### 2. Scripts ausführbar machen
|
||||
|
||||
```bash
|
||||
chmod +x scripts/automation/*.py
|
||||
```
|
||||
|
||||
## 🎯 Manuelle Nutzung
|
||||
|
||||
### Tipps generieren
|
||||
|
||||
```bash
|
||||
# Normale Generierung (prüft ob nötig)
|
||||
python scripts/automation/weekly_tip_generator.py
|
||||
|
||||
# Erzwinge Generierung
|
||||
python scripts/automation/weekly_tip_generator.py --force
|
||||
|
||||
# Generiere 20 Tipps statt 10
|
||||
python scripts/automation/weekly_tip_generator.py --num-tips 20
|
||||
|
||||
# Zeige nur Historie
|
||||
python scripts/automation/weekly_tip_generator.py --history
|
||||
```
|
||||
|
||||
### Nach Ziehung aktualisieren
|
||||
|
||||
```bash
|
||||
# Kompletter Workflow: Update + Evaluation + Learning
|
||||
python scripts/automation/auto_update_and_learn.py
|
||||
```
|
||||
|
||||
## ⏰ Automatisierung mit Cron
|
||||
|
||||
### Setup
|
||||
|
||||
1. Öffne Crontab:
|
||||
```bash
|
||||
crontab -e
|
||||
```
|
||||
|
||||
2. Füge folgende Zeilen hinzu:
|
||||
|
||||
```bash
|
||||
# Pfad zur virtuellen Umgebung
|
||||
EUROJACKPOT_PATH="/Users/sebastianfrohlich/Library/Mobile Documents/com~apple~CloudDocs/Jupyter Notebooks/Eurojackpot"
|
||||
|
||||
# Montag & Donnerstag 09:00 Uhr: Tipps generieren (vor Ziehung)
|
||||
0 9 * * 1,4 cd "$EUROJACKPOT_PATH" && source venv/bin/activate && python scripts/automation/weekly_tip_generator.py >> logs/tips_generation.log 2>&1
|
||||
|
||||
# Dienstag & Freitag 21:00 Uhr: Update nach Ziehung
|
||||
0 21 * * 2,5 cd "$EUROJACKPOT_PATH" && source venv/bin/activate && python scripts/automation/auto_update_and_learn.py >> logs/auto_update.log 2>&1
|
||||
```
|
||||
|
||||
3. Speichern (ESC, :wq in vim)
|
||||
|
||||
### Cron Zeitplan
|
||||
|
||||
```
|
||||
Montag 09:00 → Tipps für Dienstag-Ziehung generieren
|
||||
Dienstag 20:00 → Ziehung findet statt
|
||||
Dienstag 21:00 → Auto-Update & Learning
|
||||
|
||||
Donnerstag 09:00 → Tipps für Freitag-Ziehung generieren
|
||||
Freitag 20:00 → Ziehung findet statt
|
||||
Freitag 21:00 → Auto-Update & Learning
|
||||
```
|
||||
|
||||
### Logs prüfen
|
||||
|
||||
```bash
|
||||
# Erstelle Log-Verzeichnis
|
||||
mkdir -p logs
|
||||
|
||||
# Zeige letzte Tipps-Generierung
|
||||
tail -50 logs/tips_generation.log
|
||||
|
||||
# Zeige letzte Updates
|
||||
tail -50 logs/auto_update.log
|
||||
```
|
||||
|
||||
## 📊 Dateien & Verzeichnisse
|
||||
|
||||
```
|
||||
data/
|
||||
├── generated_tips/ # Generierte Tipps
|
||||
│ ├── weekly_tips_*.csv # Tipp-Dateien
|
||||
│ └── generation_history.json # Historie
|
||||
│
|
||||
├── performance_reports/ # Performance-Reports
|
||||
│ └── report_*.txt # Reports nach Ziehungen
|
||||
│
|
||||
├── learning_log.json # Learning-Historie
|
||||
└── backups/ # Automatische Backups
|
||||
|
||||
logs/
|
||||
├── tips_generation.log # Cron Log für Generierung
|
||||
└── auto_update.log # Cron Log für Updates
|
||||
```
|
||||
|
||||
## 🔍 Features im Detail
|
||||
|
||||
### Weekly Tip Generator
|
||||
|
||||
**Intelligente Prüfung:**
|
||||
- Generiert nur wenn nötig (> 3 Tage seit letzter Generierung)
|
||||
- Berücksichtigt Wochentage (Montag/Donnerstag vor Ziehungen)
|
||||
- Vermeidet unnötige Generierungen
|
||||
|
||||
**Historie-Tracking:**
|
||||
- Speichert alle Generierungen
|
||||
- Trackt Confidence & Quality Scores
|
||||
- Ermöglicht Performance-Analyse über Zeit
|
||||
|
||||
**Ausgabe:**
|
||||
```
|
||||
📊 GENERIERUNGS-HISTORIE
|
||||
======================================================================
|
||||
Nr Datum Tips Confidence Quality Datei
|
||||
----------------------------------------------------------------------
|
||||
1 2025-01-20 09:00 10 0.5823 0.6734 weekly_tips_20250120_090000.csv
|
||||
2 2025-01-16 09:00 10 0.5891 0.6812 weekly_tips_20250116_090000.csv
|
||||
```
|
||||
|
||||
### Auto Update & Learn
|
||||
|
||||
**4-Schritt-Workflow:**
|
||||
|
||||
1. **Daten aktualisieren**
|
||||
- Lädt neueste Ziehung von API
|
||||
- Erstellt automatisches Backup
|
||||
- Validiert Daten
|
||||
|
||||
2. **Neue Ziehung prüfen**
|
||||
- Erkennt automatisch neue Ziehungen
|
||||
- Verhindert Doppel-Verarbeitung
|
||||
- Extrahiert Ziehungsdaten
|
||||
|
||||
3. **Tipps evaluieren**
|
||||
- Vergleicht letzte Tipps mit Ziehung
|
||||
- Zählt Treffer (Main + Euro)
|
||||
- Ermittelt beste Strategien
|
||||
|
||||
4. **Learning Update**
|
||||
- Passt ML-Modelle an
|
||||
- Aktualisiert Predictions
|
||||
- Speichert Performance-Metriken
|
||||
|
||||
**Evaluation Output:**
|
||||
```
|
||||
🎯 EVALUIERE LETZTE TIPPS
|
||||
======================================================================
|
||||
Tip Strategie Main Euro Gesamt Bewertung
|
||||
------------------------------------------------------------
|
||||
#1 PURE-AI 2 1 3 ✅ Gut
|
||||
#2 HYBRID-OPT 3 0 3 ✅ Gut
|
||||
#3 PURE-PATTERN 1 1 2 👍 OK
|
||||
...
|
||||
|
||||
🏆 Bester Tipp: #2 (3 Main + 0 Euro)
|
||||
```
|
||||
|
||||
## 📈 Performance-Reports
|
||||
|
||||
Reports werden automatisch nach jeder Ziehung erstellt:
|
||||
|
||||
```
|
||||
======================================================================
|
||||
EUROJACKPOT PERFORMANCE REPORT
|
||||
======================================================================
|
||||
Erstellt: 2025-01-17 21:05:23
|
||||
|
||||
ZIEHUNG VOM 2025-01-17
|
||||
----------------------------------------------------------------------
|
||||
Hauptzahlen: [3, 9, 12, 24, 39]
|
||||
Eurozahlen: [5, 10]
|
||||
|
||||
EVALUATION DER TIPPS
|
||||
----------------------------------------------------------------------
|
||||
Datei: weekly_tips_20250115_090000.csv
|
||||
Tipps evaluiert: 10
|
||||
Avg Main Matches: 1.80
|
||||
Avg Euro Matches: 0.60
|
||||
Bester Tipp: #5
|
||||
- Main Treffer: 3
|
||||
- Euro Treffer: 1
|
||||
======================================================================
|
||||
```
|
||||
|
||||
## 🛠️ Troubleshooting
|
||||
|
||||
### "No module named 'requests'"
|
||||
|
||||
```bash
|
||||
cd "/Users/sebastianfrohlich/Library/Mobile Documents/com~apple~CloudDocs/Jupyter Notebooks/Eurojackpot"
|
||||
source venv/bin/activate
|
||||
pip install requests beautifulsoup4 pandas numpy scikit-learn
|
||||
```
|
||||
|
||||
### "Permission denied"
|
||||
|
||||
```bash
|
||||
chmod +x scripts/automation/*.py
|
||||
```
|
||||
|
||||
### Cron läuft nicht
|
||||
|
||||
```bash
|
||||
# Prüfe Cron-Service
|
||||
launchctl list | grep cron
|
||||
|
||||
# Prüfe System-Logs
|
||||
tail -f /var/log/system.log | grep cron
|
||||
|
||||
# Test manuell
|
||||
cd "/path/to/eurojackpot"
|
||||
source venv/bin/activate
|
||||
python scripts/automation/weekly_tip_generator.py
|
||||
```
|
||||
|
||||
### Logs sind leer
|
||||
|
||||
Stelle sicher dass das logs-Verzeichnis existiert:
|
||||
```bash
|
||||
mkdir -p logs
|
||||
```
|
||||
|
||||
## 🎯 Best Practices
|
||||
|
||||
### 1. Teste manuell vor Cron
|
||||
|
||||
```bash
|
||||
# Test 1: Tipps generieren
|
||||
python scripts/automation/weekly_tip_generator.py --force
|
||||
|
||||
# Test 2: Update & Learn
|
||||
python scripts/automation/auto_update_and_learn.py
|
||||
```
|
||||
|
||||
### 2. Überwache Logs regelmäßig
|
||||
|
||||
```bash
|
||||
# Wöchentlich prüfen
|
||||
tail -100 logs/tips_generation.log
|
||||
tail -100 logs/auto_update.log
|
||||
```
|
||||
|
||||
### 3. Backup-Strategie
|
||||
|
||||
Backups werden automatisch erstellt, aber zusätzlich:
|
||||
|
||||
```bash
|
||||
# Manuelles Backup
|
||||
cp AlleEurojackpotzahlen.csv "AlleEurojackpotzahlen_$(date +%Y%m%d).csv"
|
||||
```
|
||||
|
||||
### 4. Performance-Analyse
|
||||
|
||||
```bash
|
||||
# Zeige Generierungs-Historie
|
||||
python scripts/automation/weekly_tip_generator.py --history
|
||||
|
||||
# Analysiere Reports
|
||||
cat data/performance_reports/report_*.txt | grep "Avg Main Matches"
|
||||
```
|
||||
|
||||
## 📱 Benachrichtigungen (Optional)
|
||||
|
||||
Füge Benachrichtigungen zu Cron hinzu:
|
||||
|
||||
### macOS Notification
|
||||
|
||||
```bash
|
||||
# In Cron-Zeile hinzufügen:
|
||||
&& osascript -e 'display notification "Eurojackpot Tipps generiert" with title "Automation"'
|
||||
```
|
||||
|
||||
### Email (wenn konfiguriert)
|
||||
|
||||
```bash
|
||||
# In Cron-Zeile:
|
||||
&& echo "Tipps generiert" | mail -s "Eurojackpot Update" your@email.com
|
||||
```
|
||||
|
||||
## 🔄 Workflow-Diagramm
|
||||
|
||||
```
|
||||
WOCHE
|
||||
│
|
||||
├─ Montag 09:00
|
||||
│ └─ 🎲 Generiere Tipps für Dienstag
|
||||
│ └─ weekly_tips_TIMESTAMP.csv
|
||||
│
|
||||
├─ Dienstag 20:00
|
||||
│ └─ 🎰 Ziehung findet statt
|
||||
│
|
||||
├─ Dienstag 21:00
|
||||
│ └─ 🔄 Auto-Update & Learning
|
||||
│ ├─ Daten aktualisieren
|
||||
│ ├─ Tipps evaluieren
|
||||
│ ├─ Learning Update
|
||||
│ └─ Report erstellen
|
||||
│
|
||||
├─ Donnerstag 09:00
|
||||
│ └─ 🎲 Generiere Tipps für Freitag
|
||||
│ └─ weekly_tips_TIMESTAMP.csv
|
||||
│
|
||||
├─ Freitag 20:00
|
||||
│ └─ 🎰 Ziehung findet statt
|
||||
│
|
||||
└─ Freitag 21:00
|
||||
└─ 🔄 Auto-Update & Learning
|
||||
├─ Daten aktualisieren
|
||||
├─ Tipps evaluieren
|
||||
├─ Learning Update
|
||||
└─ Report erstellen
|
||||
```
|
||||
|
||||
## 💡 Tipps
|
||||
|
||||
1. **Erste Woche:** Nutze `--force` um initiale Tipps zu generieren
|
||||
2. **Strategie-Mix:** Das System nutzt automatisch den optimalen Mix
|
||||
3. **Learning:** Nach 4-5 Ziehungen beginnt das System besser zu werden
|
||||
4. **Reports:** Analysiere Reports monatlich für Trend-Analyse
|
||||
5. **Backup:** Die automatischen Backups werden im backups/ Ordner gespeichert
|
||||
|
||||
## 🆘 Support
|
||||
|
||||
Bei Problemen:
|
||||
1. Prüfe Logs: `tail -100 logs/*.log`
|
||||
2. Teste manuell: `python script.py`
|
||||
3. Prüfe venv: `source venv/bin/activate && pip list`
|
||||
4. Checke Cronjobs: `crontab -l`
|
||||
|
||||
---
|
||||
|
||||
**Version:** 1.0
|
||||
**Erstellt:** 2025-01-25
|
||||
**Kompatibel mit:** Ultimate AI-ML Generator V2.1
|
||||
Reference in new issue
Block a user