-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy path__init__.py
More file actions
63 lines (57 loc) · 1.7 KB
/
__init__.py
File metadata and controls
63 lines (57 loc) · 1.7 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
import os
import yaml
from scripts.copycatch.iterative import CopyCatchParams
# Secrets (optional - not needed for local-only execution)
if os.path.exists("secrets.yaml"):
with open("secrets.yaml", "r") as f:
SECRETS = yaml.safe_load(f) or {}
else:
SECRETS = {}
MONGO_URL: str = SECRETS.get("mongo_url", "")
GITHUB_TOKENS: list[str] = [x["token"] for x in SECRETS.get("github_tokens", [])]
BIGQUERY_PROJECT: str = SECRETS.get("bigquery_project", "")
BIGQUERY_DATASET: str = SECRETS.get("bigquery_dataset", "")
GOOGLE_CLOUD_BUCKET: str = SECRETS.get("google_cloud_bucket", "")
NPM_FOLLOWER_POSTGRES: str = SECRETS.get("npm_follower_postgres", "")
VIRUS_TOTAL_API_KEY: str = SECRETS.get("virus_total_api_key", "")
# Parameters for running experiments
START_DATE: str = "190701"
END_DATE: str = "250101"
MIN_STARS_LOW_ACTIVITY: int = 50
MIN_STARS_COPYCATCH_SEED: int = 50
COPYCATCH_NUM_ITERATIONS: int = 10
COPYCATCH_PARAMS = CopyCatchParams(
delta_t=15 * 24 * 60 * 60,
n=50,
m=10,
rho=0.5,
beta=2,
)
COPYCATCH_DATE_CHUNKS = [
("190701", "200101"),
("191001", "200401"),
("200101", "200701"),
("200401", "201001"),
("200701", "210101"),
("201001", "210401"),
("210101", "210701"),
("210401", "211001"),
("210701", "220101"),
("211001", "220401"),
("220101", "220701"),
("220401", "221001"),
("220701", "230101"),
("221001", "230401"),
("230101", "230701"),
("230401", "231001"),
("230701", "240101"),
("231001", "240401"),
("240101", "240701"),
("240401", "241001"),
("240701", "250101"),
("241001", "250401"),
("250101", "250701"),
("250401", "251001"),
("250701", "260101"),
("251001", "260401"),
]