-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscoring.py
More file actions
45 lines (35 loc) · 849 Bytes
/
Copy pathscoring.py
File metadata and controls
45 lines (35 loc) · 849 Bytes
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
import random
from typing import Optional
def get_score(
phone: Optional[str] = None,
email: Optional[str] = None,
birthday: Optional[str] = None,
gender: Optional[int] = None,
first_name: Optional[str] = None,
last_name: Optional[str] = None,
) -> float:
score: float = 0.0
if phone:
score += 1.5
if email:
score += 1.5
if birthday and gender is not None:
score += 1.5
if first_name and last_name:
score += 0.5
return score
def get_interests(cid: int) -> list[str]:
interests = [
"cars",
"pets",
"travel",
"hi-tech",
"sport",
"music",
"books",
"tv",
"cinema",
"geek",
"otus",
]
return random.sample(interests, 2)