-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcreate_sample_data.py
More file actions
401 lines (322 loc) · 11.8 KB
/
Copy pathcreate_sample_data.py
File metadata and controls
401 lines (322 loc) · 11.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
"""
create_sample_data.py
Generates 15 realistic sample resume PDFs for pipeline testing.
Profiles are intentionally varied so every pipeline stage gets exercised:
- Some fail CSP (wrong degree, low exp, missing skills)
- Some pass CSP but score low semantically
- Some are strong matches (high composite + suitability score)
Run once: python create_sample_data.py
"""
import os
from fpdf import FPDF
os.makedirs("resumes", exist_ok=True)
# ── Candidate profiles ────────────────────────────────────────
# Format: (filename, full resume text)
CANDIDATES = [
# ── STRONG MATCHES (should rank 1-5) ──────────────────────
(
"aisha_khan.pdf",
"""Aisha Khan
aisha.khan@email.com | Lahore, Pakistan
EDUCATION
Bachelor of Science in Computer Science - LUMS, 2021
EXPERIENCE
Machine Learning Engineer - DataFlow AI, 2021-Present (3 years of experience)
- Developed NLP pipelines using Python and spaCy for resume parsing
- Built classification models using scikit-learn and TensorFlow
- Deployed ML APIs using FastAPI and Docker on AWS
SKILLS
Python, machine learning, scikit-learn, TensorFlow, NLP, deep learning,
SQL, pandas, numpy, FastAPI, Docker, AWS, data analysis, REST API
PROJECTS
- Resume Screening Tool: TF-IDF + cosine similarity based candidate matcher
- Sentiment Analysis: BERT-based model fine-tuned on customer reviews
""",
),
(
"omar_farooq.pdf",
"""Omar Farooq
omar.farooq@email.com | Karachi, Pakistan
EDUCATION
Master of Science in Artificial Intelligence - NED University, 2020
EXPERIENCE
Senior ML Engineer - TechVentures, 2020-Present (4 years of experience)
- Led team of 3 to build production NLP systems
- Designed data preprocessing pipelines and feature engineering workflows
- Applied machine learning and deep learning models to real-world datasets
SKILLS
Python, machine learning, deep learning, PyTorch, scikit-learn, NLP,
computer vision, SQL, data analysis, pandas, numpy, Keras, OpenCV
CERTIFICATIONS
- DeepLearning.AI TensorFlow Developer Certificate
""",
),
(
"sara_malik.pdf",
"""Sara Malik
sara.malik@email.com | Islamabad, Pakistan
EDUCATION
Bachelor of Engineering in Software Engineering - NUST, 2022
EXPERIENCE
Junior ML Engineer - AI Solutions Pvt Ltd, 2022-Present (2 years of experience)
- Implemented machine learning models for predictive analytics
- Preprocessed large datasets using Python, pandas and NumPy
- Built REST APIs for model serving using Flask
SKILLS
Python, machine learning, scikit-learn, pandas, numpy, SQL, Flask,
data analysis, NLP, REST API, Git, Linux
PROJECTS
- Job Recommendation System using TF-IDF and cosine similarity
- Spam Classifier using Naive Bayes and logistic regression
""",
),
(
"bilal_ahmed.pdf",
"""Bilal Ahmed
bilal.ahmed@email.com | Rawalpindi, Pakistan
EDUCATION
Master of Science in Data Science - FAST NUCES, 2019
EXPERIENCE
Data Scientist - Insight Analytics, 2019-Present (5 years of experience)
- Designed end-to-end machine learning pipelines for client projects
- Applied NLP techniques including TF-IDF, word embeddings, and transformers
- Built and deployed deep learning models using TensorFlow and PyTorch
SKILLS
Python, machine learning, deep learning, TensorFlow, PyTorch, NLP,
scikit-learn, SQL, pandas, numpy, data analysis, Tableau, AWS, Spark
PUBLICATIONS
- "Comparative Analysis of Recruitment Matching Algorithms" - IEEE 2022
""",
),
(
"hina_javed.pdf",
"""Hina Javed
hina.javed@email.com | Lahore, Pakistan
EDUCATION
Bachelor of Science in Artificial Intelligence - COMSATS, 2023
EXPERIENCE
ML Research Assistant - VisionLab, 2023-Present (2 years of experience)
- Conducted research on computer vision and image classification
- Trained convolutional neural networks using PyTorch and Keras
- Preprocessed datasets using OpenCV and scikit-learn pipelines
SKILLS
Python, machine learning, deep learning, PyTorch, Keras, computer vision,
OpenCV, scikit-learn, numpy, pandas, NLP, SQL, Git
PROJECTS
- Object Detection System using YOLOv5
- Resume Parser using spaCy and regex
""",
),
# ── MODERATE MATCHES (should rank 6-10) ───────────────────
(
"zain_raza.pdf",
"""Zain Raza
zain.raza@email.com | Multan, Pakistan
EDUCATION
Bachelor of Science in Computer Science - UET, 2021
EXPERIENCE
Software Developer - WebSoft Solutions, 2021-Present (3 years of experience)
- Developed web applications using React and Node.js
- Worked with SQL databases and REST APIs
- Some exposure to Python scripting and data processing
SKILLS
JavaScript, React, Node.js, SQL, REST API, Python, Git, Linux, HTML, CSS
PROJECTS
- E-commerce platform with real-time analytics dashboard
""",
),
(
"maryam_tariq.pdf",
"""Maryam Tariq
maryam.tariq@email.com | Faisalabad, Pakistan
EDUCATION
Bachelor of Science in Statistics - Punjab University, 2020
EXPERIENCE
Data Analyst - RetailMetrics Co, 2020-Present (4 years of experience)
- Performed data analysis and statistical modeling using R and Python
- Created dashboards using Power BI and Tableau
- Basic machine learning for sales forecasting
SKILLS
Python, R, SQL, data analysis, statistics, Power BI, Tableau,
pandas, numpy, Excel, machine learning
PROJECTS
- Sales Prediction Model using linear regression
- Customer Segmentation using K-means clustering
""",
),
(
"danish_ali.pdf",
"""Danish Ali
danish.ali@email.com | Hyderabad, Pakistan
EDUCATION
Bachelor of Engineering in Computer Systems - MUET, 2022
EXPERIENCE
Backend Developer - CloudApps, 2022-Present (2 years of experience)
- Built scalable APIs in Python using Django and FastAPI
- Managed PostgreSQL and MongoDB databases
- Deployed services on AWS using Docker and Kubernetes
SKILLS
Python, Django, FastAPI, SQL, PostgreSQL, MongoDB, Docker,
AWS, Kubernetes, REST API, Git, Linux
PROJECTS
- Microservices architecture for logistics platform
""",
),
(
"nadia_hussain.pdf",
"""Nadia Hussain
nadia.hussain@email.com | Peshawar, Pakistan
EDUCATION
Master of Science in Computer Science - UoP, 2021
EXPERIENCE
Research Associate - CogSystems Lab, 2021-Present (3 years of experience)
- Researched natural language processing and information retrieval
- Implemented text classification models using Python and scikit-learn
- Published 2 papers on NLP-based document matching systems
SKILLS
Python, NLP, scikit-learn, machine learning, text classification,
SQL, pandas, numpy, research, data analysis, spaCy
PROJECTS
- Document Similarity System using TF-IDF and BERT embeddings
""",
),
(
"hamza_sheikh.pdf",
"""Hamza Sheikh
hamza.sheikh@email.com | Quetta, Pakistan
EDUCATION
Bachelor of Science in Software Engineering - BUITEMS, 2023
EXPERIENCE
Junior Developer - AppWorks, 2023-Present (1 year of experience)
- Assisted in building ML features for a mobile application
- Python scripting for data processing automation
- Familiar with machine learning concepts and scikit-learn
SKILLS
Python, machine learning, scikit-learn, SQL, Git, pandas, Java, Android
PROJECTS
- Student Grade Prediction using decision tree
""",
),
# ── CSP FAILURES (filtered out early) ────────────────────
(
"ali_rauf.pdf",
"""Ali Rauf
ali.rauf@email.com | Sialkot, Pakistan
EDUCATION
Diploma in Information Technology - Govt Polytechnic, 2020
EXPERIENCE
IT Support Technician - LocalTech, 2020-Present (4 years of experience)
- Managed hardware, networking, and desktop support
- Basic Python scripting for automation tasks
SKILLS
Python, networking, hardware, Linux, SQL, troubleshooting, Windows
NOTE: No formal bachelor degree completed yet.
""",
),
(
"farah_naz.pdf",
"""Farah Naz
farah.naz@email.com | Gujranwala, Pakistan
EDUCATION
Bachelor of Arts in English Literature - University of Punjab, 2021
EXPERIENCE
Content Writer - MediaGroup, 2021-Present (3 years of experience)
- Wrote technical blogs and documentation
- SEO optimization and content strategy
SKILLS
Writing, SEO, WordPress, Content Management, Microsoft Office, Research
NOTE: No technical programming skills or ML background.
""",
),
(
"tariq_mehmood.pdf",
"""Tariq Mehmood
tariq.mehmood@email.com | Sargodha, Pakistan
EDUCATION
Bachelor of Science in Computer Science - Virtual University, 2023
EXPERIENCE
Freelance Web Designer - Self-employed, 2023-Present (1 year of experience)
- Designed websites using HTML, CSS, and WordPress
- Basic JavaScript and PHP development
SKILLS
HTML, CSS, JavaScript, PHP, WordPress, Figma, Adobe XD
NOTE: Less than 2 years of experience, no machine learning background.
""",
),
(
"ayesha_siddiqui.pdf",
"""Ayesha Siddiqui
ayesha.siddiqui@email.com | Bahawalpur, Pakistan
EDUCATION
Bachelor of Science in Accounting - IBA Sukkur, 2020
EXPERIENCE
Accountant - FinancePro Pvt Ltd, 2020-Present (4 years of experience)
- Financial reporting, auditing, and bookkeeping
- Excel-based data analysis for finance team
SKILLS
Excel, accounting, financial analysis, bookkeeping, Tally, QuickBooks
NOTE: Finance background only, no ML or Python experience.
""",
),
(
"usman_butt.pdf",
"""Usman Butt
usman.butt@email.com | Lahore, Pakistan
EDUCATION
Master of Science in Electrical Engineering - UET Lahore, 2018
EXPERIENCE
Embedded Systems Engineer - AutoSys, 2018-Present (6 years of experience)
- Designed firmware for microcontrollers using C and C++
- Signal processing and hardware debugging
- Some Python scripting for test automation
SKILLS
C, C++, Python, MATLAB, embedded systems, signal processing,
microcontrollers, hardware debugging, PCB design
NOTE: Strong engineering background but no machine learning or NLP skills.
""",
),
]
def create_resume_pdf(filename: str, content: str, output_dir: str = "resumes"):
"""Creates a PDF resume from plain text content."""
from fpdf import FPDF, XPos, YPos
pdf = FPDF()
pdf.add_page()
pdf.set_margins(15, 15, 15)
pdf.set_auto_page_break(auto=True, margin=15)
W = pdf.w - pdf.l_margin - pdf.r_margin # effective text width
lines = content.strip().split("\n")
# First line = name
pdf.set_font("Helvetica", "B", 15)
pdf.cell(W, 10, lines[0].strip(), new_x=XPos.LMARGIN, new_y=YPos.NEXT)
# Second line = contact
pdf.set_font("Helvetica", "", 9)
if len(lines) > 1:
pdf.cell(W, 6, lines[1].strip(), new_x=XPos.LMARGIN, new_y=YPos.NEXT)
pdf.ln(3)
for line in lines[2:]:
line = line.strip()
if not line:
pdf.ln(3)
elif line.isupper() or (line.endswith(":") and len(line) < 40):
pdf.set_font("Helvetica", "B", 11)
pdf.ln(2)
pdf.cell(W, 7, line, new_x=XPos.LMARGIN, new_y=YPos.NEXT)
elif line.startswith("-"):
pdf.set_font("Helvetica", "", 10)
pdf.multi_cell(W, 6, " " + line)
else:
pdf.set_font("Helvetica", "", 10)
pdf.multi_cell(W, 6, line)
out_path = os.path.join(output_dir, filename)
pdf.output(out_path)
return out_path
if __name__ == "__main__":
print("Generating sample resume PDFs...\n")
for filename, content in CANDIDATES:
path = create_resume_pdf(filename, content)
print(f" Created: {path}")
print(f"\nDone! {len(CANDIDATES)} resumes generated in resumes/")
print("\nProfile breakdown:")
print(" Strong matches (expect rank 1-5) : aisha_khan, omar_farooq, sara_malik, bilal_ahmed, hina_javed")
print(" Moderate matches (rank 6-10) : zain_raza, maryam_tariq, danish_ali, nadia_hussain, hamza_sheikh")
print(" CSP failures (filtered out) : ali_rauf, farah_naz, tariq_mehmood, ayesha_siddiqui, usman_butt")