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>
78 lines
2.4 KiB
Python
78 lines
2.4 KiB
Python
#!/usr/bin/env python3
|
|
"""
|
|
Erstellt Beispiel-CSV-Dateien für das Eurojackpot-Processing
|
|
"""
|
|
|
|
import pandas as pd
|
|
import itertools
|
|
from datetime import datetime, timedelta
|
|
import random
|
|
|
|
def create_all_combinations():
|
|
"""Erstellt eine CSV mit allen möglichen 5-aus-50 Kombinationen (Beispiel mit ersten 100)."""
|
|
print("Erstelle Beispiel-Kombinationsdatei...")
|
|
|
|
# Für Demo: nur erste 100 Kombinationen von 5 aus 20 Zahlen
|
|
# (Vollständige 5-aus-50 Kombinationen wären über 2 Millionen!)
|
|
combinations = []
|
|
count = 0
|
|
|
|
for combo in itertools.combinations(range(1, 21), 5): # 5 aus 20 für Demo
|
|
combinations.append({
|
|
'Zahl1': combo[0],
|
|
'Zahl2': combo[1],
|
|
'Zahl3': combo[2],
|
|
'Zahl4': combo[3],
|
|
'Zahl5': combo[4]
|
|
})
|
|
count += 1
|
|
if count >= 100: # Limitierung für Demo
|
|
break
|
|
|
|
df = pd.DataFrame(combinations)
|
|
df.to_csv('alle_kombinationen_beispiel.csv', index=False)
|
|
print(f"Beispiel-Kombinationsdatei erstellt: {len(df)} Kombinationen")
|
|
return df
|
|
|
|
def create_drawn_numbers():
|
|
"""Erstellt eine CSV mit gezogenen Zahlen (Beispieldaten)."""
|
|
print("Erstelle Beispiel-Datei mit gezogenen Zahlen...")
|
|
|
|
drawn_numbers = []
|
|
start_date = datetime(2023, 1, 1)
|
|
|
|
# 20 zufällige Ziehungen erstellen
|
|
for i in range(20):
|
|
date = start_date + timedelta(days=i*7) # Wöchentliche Ziehungen
|
|
|
|
# 5 zufällige Zahlen zwischen 1 und 20 (ohne Wiederholung)
|
|
numbers = sorted(random.sample(range(1, 21), 5))
|
|
|
|
drawn_numbers.append({
|
|
'Datum': date.strftime('%Y-%m-%d'),
|
|
'Z1': numbers[0],
|
|
'Z2': numbers[1],
|
|
'Z3': numbers[2],
|
|
'Z4': numbers[3],
|
|
'Z5': numbers[4]
|
|
})
|
|
|
|
df = pd.DataFrame(drawn_numbers)
|
|
df.to_csv('gezogene_zahlen_beispiel.csv', index=False)
|
|
print(f"Beispiel-Datei mit gezogenen Zahlen erstellt: {len(df)} Ziehungen")
|
|
return df
|
|
|
|
if __name__ == "__main__":
|
|
print("=== Erstelle Beispiel-CSV-Dateien ===\n")
|
|
|
|
# Seed für reproduzierbare Ergebnisse
|
|
random.seed(42)
|
|
|
|
combinations_df = create_all_combinations()
|
|
drawn_df = create_drawn_numbers()
|
|
|
|
print("\n=== Beispieldateien erstellt ===")
|
|
print("- alle_kombinationen_beispiel.csv")
|
|
print("- gezogene_zahlen_beispiel.csv")
|
|
print("\nSie können jetzt das Hauptscript testen:")
|