-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.py
More file actions
183 lines (164 loc) · 7.77 KB
/
Copy pathconfig.py
File metadata and controls
183 lines (164 loc) · 7.77 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
import os
from dotenv import load_dotenv
# Load environment variables from .env file
load_dotenv()
# API Keys and IDs
GEMINI_API_KEY = os.getenv("GEMINI_API_KEY")
GOOGLE_SHEETS_ID = os.getenv("GOOGLE_SHEETS_ID")
# File Paths
CV_PATH = "cv.md"
# Filtering Logic
MIN_SCORE_TO_SHOW = 6.0
# Companies to monitor
COMPANIES = [
{"name": "Anthropic", "portal": "greenhouse", "id": "anthropic"},
{"name": "Razorpay", "portal": "greenhouse", "id": "razorpay"},
{"name": "BrowserStack", "portal": "greenhouse", "id": "browserstack"},
{"name": "Postman", "portal": "greenhouse", "id": "postman"},
{"name": "OpenAI", "portal": "greenhouse", "id": "openai"},
{"name": "Stripe", "portal": "greenhouse", "id": "stripe"},
{"name": "Airbnb", "portal": "greenhouse", "id": "airbnb"},
{"name": "Dropbox", "portal": "greenhouse", "id": "dropbox"},
{"name": "Zepto", "portal": "lever", "id": "zepto"},
{"name": "Groww", "portal": "lever", "id": "groww"},
{"name": "Atlassian", "portal": "lever", "id": "atlassian"},
{"name": "Figma", "portal": "lever", "id": "figma"},
{"name": "Linear", "portal": "ashby", "id": "linear"},
{"name": "Vercel", "portal": "ashby", "id": "vercel"},
]
# YC-specific companies (optionally merged via --yc flag)
YC_COMPANIES = [
# Batch S24 / W24 — recent
{"name": "Firecrawl", "portal": "greenhouse", "id": "firecrawl"},
{"name": "Browserbase", "portal": "greenhouse", "id": "browserbase"},
{"name": "Groq", "portal": "greenhouse", "id": "groq"},
{"name": "Together AI", "portal": "greenhouse", "id": "togetherai"},
{"name": "Anyscale", "portal": "greenhouse", "id": "anyscale"},
{"name": "Modal", "portal": "lever", "id": "modal-labs"},
{"name": "Replicate", "portal": "lever", "id": "replicate"},
{"name": "Weights & Biases","portal": "lever", "id": "wandb"},
# Established YC alumni — actively hiring
{"name": "Stripe", "portal": "greenhouse", "id": "stripe"},
{"name": "Airbnb", "portal": "greenhouse", "id": "airbnb"},
{"name": "Dropbox", "portal": "greenhouse", "id": "dropbox"},
{"name": "Gusto", "portal": "greenhouse", "id": "gusto"},
{"name": "Rippling", "portal": "greenhouse", "id": "rippling"},
{"name": "Brex", "portal": "greenhouse", "id": "brex"},
{"name": "Retool", "portal": "greenhouse", "id": "retool"},
{"name": "Deel", "portal": "greenhouse", "id": "deel"},
{"name": "Clerk", "portal": "greenhouse", "id": "clerk"},
{"name": "Vercel", "portal": "lever", "id": "vercel"},
{"name": "Supabase", "portal": "ashby", "id": "supabase"},
{"name": "Linear", "portal": "ashby", "id": "linear"},
{"name": "Loom", "portal": "greenhouse", "id": "loom"},
{"name": "Webflow", "portal": "greenhouse", "id": "webflow"},
{"name": "Amplitude", "portal": "greenhouse", "id": "amplitude"},
{"name": "Segment", "portal": "greenhouse", "id": "segment"},
{"name": "Mixpanel", "portal": "greenhouse", "id": "mixpanel"},
{"name": "PostHog", "portal": "ashby", "id": "posthog"},
{"name": "Descript", "portal": "greenhouse", "id": "descript"},
{"name": "Scale AI", "portal": "greenhouse", "id": "scaleai"},
{"name": "Cohere", "portal": "greenhouse", "id": "cohere"},
{"name": "Perplexity", "portal": "ashby", "id": "perplexityai"},
{"name": "Harvey", "portal": "ashby", "id": "harvey"},
{"name": "Cursor", "portal": "ashby", "id": "anysphere"},
{"name": "Glean", "portal": "greenhouse", "id": "glean"},
{"name": "Coda", "portal": "greenhouse", "id": "coda"},
{"name": "Notion", "portal": "greenhouse", "id": "notion"},
{"name": "Figma", "portal": "greenhouse", "id": "figma"},
# YC India-connected or remote-friendly
{"name": "Razorpay", "portal": "greenhouse", "id": "razorpay"},
{"name": "Postman", "portal": "greenhouse", "id": "postman"},
{"name": "BrowserStack", "portal": "greenhouse", "id": "browserstack"},
{"name": "Hasura", "portal": "lever", "id": "hasura"},
{"name": "Setu", "portal": "lever", "id": "setu"},
]
# Department-specific keywords for job relevance
DEPARTMENTS = {
"engineering": [
"software engineer", "backend", "frontend", "full stack", "fullstack",
"ml engineer", "data engineer", "devops", "platform", "infrastructure",
"sre", "mobile", "ios", "android", "api", "python", "node", "golang"
],
"data": [
"data scientist", "data analyst", "machine learning", "ml", "ai",
"research scientist", "analytics", "data engineer", "nlp"
],
"product": [
"product manager", "pm", "product analyst", "product designer"
],
"design": [
"designer", "ux", "ui", "product design", "figma"
],
"sales": [
"sales", "account executive", "business development", "bdm", "bdr", "sdr"
],
"marketing": [
"marketing", "growth", "content", "seo", "performance marketing"
],
}
DEFAULT_DEPARTMENT = "engineering"
# Experience levels config
EXPERIENCE_LEVELS = {
"fresher": [
"fresher", "fresh graduate", "entry level", "entry-level",
"0-1 year", "0 to 1 year", "no experience", "new grad",
"new graduate", "recent graduate", "graduating 2025",
"graduating 2026", "junior", "associate"
],
"intern": [
"intern", "internship", "co-op", "coop", "trainee",
"apprentice", "student", "part-time"
],
"junior": [
"junior", "jr.", "1-2 year", "1 to 2 year",
"1-3 year", "associate engineer"
],
"mid": [
"mid level", "mid-level", "3-5 year", "3 to 5 year",
"software engineer ii", "sde 2", "sde2"
],
"senior": [
"senior", "sr.", "5+ year", "lead", "staff", "principal"
]
}
DEFAULT_EXPERIENCE = "fresher"
# Negative Keywords (Discard senior/unsuitable roles immediately)
NEGATIVE_KEYWORDS = [
"senior", "sr.", "lead", "staff", "principal", "manager",
"director", "head of", "architect", "experienced",
"vp", "vice president", "executive", "chief", "founding member",
"legal", "sales", "marketing", "hr", "recruiter", "accountant"
]
def validate_config() -> bool:
"""
Validates essential configuration parameters and files.
"""
# Check Gemini API Key
if not GEMINI_API_KEY:
print("[ERROR] GEMINI_API_KEY is missing in your .env file.")
print("Setup: Go to https://aistudio.google.com/ to get a free API key.")
return False
# Check CV file existence
if not os.path.exists(CV_PATH):
print(f"[ERROR] {CV_PATH} not found.")
print("Setup: Create a file named 'cv.md' in the project root and paste your CV in markdown format.")
return False
# Warn if Google Sheets ID is missing
if not GOOGLE_SHEETS_ID:
print("[WARNING] GOOGLE_SHEETS_ID is not set. Tracking to Google Sheets will be disabled.")
return True
def get_department_keywords(department: str) -> list[str]:
dept = department.lower().strip()
if dept not in DEPARTMENTS:
available = ", ".join(DEPARTMENTS.keys())
raise ValueError(f"Unknown department '{dept}'. Available: {available}")
return DEPARTMENTS[dept]
def get_experience_keywords(level: str) -> list[str]:
level = level.lower().strip()
if level == "any":
return [] # empty means no filter
if level not in EXPERIENCE_LEVELS:
available = ", ".join(list(EXPERIENCE_LEVELS.keys()) + ["any"])
raise ValueError(f"Unknown level '{level}'. Available: {available}")
return EXPERIENCE_LEVELS[level]