Corin1998 commited on
Commit
971ee39
·
verified ·
1 Parent(s): cc571ea

Create modules/company_score.py

Browse files
Files changed (1) hide show
  1. modules/company_score.py +26 -0
modules/company_score.py ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from dataclasses import dataclass
2
+
3
+ @dataclass
4
+ class CompanyScore:
5
+ fit: float
6
+ urgency: float
7
+ size: float
8
+ tech_readiness: float
9
+ overall: float
10
+
11
+ def score_company(name: str, website: str) -> dict:
12
+ base = 50.0
13
+ fit = base + (10.0 if name else 0)
14
+ urgency = base + (5.0 if "contact" in (website or "") else 0)
15
+ size = base + (10.0 if website and len(website) > 12 else 0)
16
+ tech = base + (10.0 if website and website.startswith("https") else 0)
17
+ overall = round((fit + urgency + size +tech) / 4.0, 1)
18
+ return {
19
+ "name": name,
20
+ "website": website,
21
+ "fit": round(fit,1),
22
+ "urgency": round(urgency,1),
23
+ "size": round(size,1),
24
+ "tech_readiness": round(tech,1),
25
+ "overall":overall
26
+ }