forked from kindrat86/agentshield
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwarmup_stats.py
More file actions
executable file
·28 lines (22 loc) · 1.12 KB
/
Copy pathwarmup_stats.py
File metadata and controls
executable file
·28 lines (22 loc) · 1.12 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
#!/usr/bin/env python3.11
"""Print warm-up statistics from log files."""
import os, datetime
def read_log(path):
if not os.path.exists(path):
return []
with open(path) as f:
return [l.strip() for l in f if l.strip()]
hn_log = os.path.expanduser('~/agentshield/outreach/hn_karma_log.txt')
reddit_log = os.path.expanduser('~/agentshield/outreach/reddit_warmup_log.txt')
hn_entries = read_log(hn_log)
reddit_entries = read_log(reddit_log)
hn_comments = [l for l in hn_entries if 'comment' in l.lower() or 'posted' in l.lower()]
reddit_comments = [l for l in reddit_entries if 'comment' in l.lower() or 'posted' in l.lower()]
total = len(hn_comments) + len(reddit_comments)
print(f"=== AgentShield Warm-Up Stats — {datetime.date.today()} ===")
print(f"HN comments: {len(hn_comments)}")
print(f"Reddit comments: {len(reddit_comments)}")
print(f"Combined: {total}")
print(f"20:1 ratio: {total} comments → {max(total // 20, 0)} AgentShield posts allowed")
print(f"HN karma target: 15 (check https://news.ycombinator.com/user?id=SipitenoMK)")
print(f"Reddit target: 40 comments across 5+ subreddits")