-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsrc.py
More file actions
118 lines (89 loc) · 3.11 KB
/
src.py
File metadata and controls
118 lines (89 loc) · 3.11 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
import feedparser
import smtplib
from email.mime.text import MIMEText
from email.mime.multipart import MIMEMultipart
from datetime import datetime
# =========================
# USER CONFIGURATION
# =========================
EMAIL_TO = "ENTER YOUR EMAIL"
EMAIL_FROM = "ENTER YOUR EMAIL"
SMTP_SERVER = "smtp.gmail.com"
SMTP_PORT = 587
SMTP_PASSWORD = "xxxx yyyy zzzz aaaa" #App password: App - EmailAutomation
MAX_ITEMS_PER_FEED = 20
KEYWORDS = [
"fpga", "asic", "risc-v", "accelerator", "embedded",
"edge", "soc", "architecture", "hardware",
"inference", "low power", "real-time",
"gpu", "tensor", "neural", "optimization",
"design", "performance", "memory", "processor",
"circuit", "chip", "iot", "quantum",
"distributed", "parallel", "compute", "network",
"controller", "microprocessor", "systolic"
]
RSS_FEEDS = {
"arXiv – Embedded Systems": "https://export.arxiv.org/rss/cs.ET",
"arXiv – Computer Architecture": "https://export.arxiv.org/rss/cs.AR",
"arXiv – Machine Learning": "https://export.arxiv.org/rss/cs.LG",
"arXiv – AI Systems": "https://export.arxiv.org/rss/cs.AI",
"arXiv – Image & Video": "https://export.arxiv.org/rss/eess.IV",
"arXiv – Systems Control": "https://export.arxiv.org/rss/eess.SY",
"Google AI Blog": "https://blog.google/technology/ai/rss/",
"NVIDIA Developer Blog": "https://developer.nvidia.com/blog/feed/"
}
# =========================
# CORE LOGIC
# =========================
def keyword_match(title):
title_lower = title.lower()
return any(k in title_lower for k in KEYWORDS)
def collect_items():
results = {}
seen_links = set()
for source, url in RSS_FEEDS.items():
feed = feedparser.parse(url)
matched = []
for entry in feed.entries[:MAX_ITEMS_PER_FEED]:
title = entry.title
link = entry.link
if keyword_match(title) and link not in seen_links:
matched.append((title, link))
seen_links.add(link)
if matched:
results[source] = matched
return results
def build_email(results):
today = datetime.now().strftime("%Y-%m-%d")
body = f"""
DAILY RESEARCH DIGEST
Date: {today}
Focus:
� Embedded Systems
� Hardware Architecture
� Hardware Acceleration
� ML for Systems
==================================================
"""
for source, items in results.items():
body += f"\n\n{source}\n"
body += "-" * len(source) + "\n"
for i, (title, link) in enumerate(items, 1):
body += f"{i}. {title}\n {link}\n"
body += "\n\nEnd of digest.\n"
return body
def send_email(body):
msg = MIMEMultipart()
msg["From"] = EMAIL_FROM
msg["To"] = EMAIL_TO
msg["Subject"] = "Daily Embedded & Hardware Research Digest"
msg.attach(MIMEText(body, "plain"))
with smtplib.SMTP(SMTP_SERVER, SMTP_PORT) as server:
server.starttls()
server.login(EMAIL_FROM, SMTP_PASSWORD)
server.send_message(msg)
if __name__ == "__main__":
data = collect_items()
if data:
email_text = build_email(data)
send_email(email_text)