import pandas as pd
import numpy as np
import random
import os

# Create directory for dataset
os.makedirs("data", exist_ok=True)

# Generate synthetic resume data
np.random.seed(42)
n_samples = 1000
python_experience = np.random.uniform(0, 10, n_samples)  # Years of Python experience
ml_knowledge = np.random.uniform(0, 10, n_samples)  # ML knowledge score (0-10)
communication_skills = np.random.uniform(0, 10, n_samples)  # Communication score
teamwork = np.random.uniform(0, 10, n_samples)  # Teamwork score

# Simulate AI job fit (1 = fit, 0 = not fit)
ai_job_fit = []
for i in range(n_samples):
    prob = 0.9 if python_experience[i] > 5 and ml_knowledge[i] > 6 else 0.3
    ai_job_fit.append(1 if random.random() < prob else 0)

# Create DataFrame
data = {
    'python_experience': python_experience,
    'ml_knowledge': ml_knowledge,
    'communication_skills': communication_skills,
    'teamwork': teamwork,
    'ai_job_fit': ai_job_fit
}
df = pd.DataFrame(data)
csv_path = "data/resume_data.csv"
df.to_csv(csv_path, index=False)
print(f"Created {csv_path} with {len(df)} entries.")

# Print sample
print("\nSample of resume_data.csv:")
print(df.head())