Thysrael/Horizon
📡 Your own AI-powered news radar. Generates daily briefings in English & Chinese. | 用 AI 构建你专属的新闻雷达
Python★ 12,645+121 that day#9 on trending
B70.4/100
Duplication69
4.6% in python, javascript, bash, dockerDead code92
0.8%Complexity55
45.2% The score is jscpd's own --health model: markup, data and text left out, tests kept. The numbers below are the trending scan's.
1.3%duplicated code · 186 of 14,288 lines
17clones in code
63code files of 189 scanned
4.45%duplicated over all files · 133 clones
Most complex files
- src/orchestrator.py252 cx
- src/ai/client.py154 cx
- src/ai/chatgpt_auth.py145 cx
- tests/test_webhook.py137 cx
- src/scrapers/reddit.py123 cx
- src/services/webhook.py123 cx
- src/ai/enricher.py120 cx
- src/mcp/service.py120 cx
- src/services/wechat.py110 cx
- tests/test_twitter.py103 cx
Dead code 0.76% unused · 11 findings
- docs/assets/js/horizon.jsunused-file
- src/setup/presets.py:match_domainsunused-export
- src/setup/presets.py:collect_sources_from_domainsunused-export
- src/setup/tag_aliases.py:resolve_tag_aliasunused-export
- src/ai/tokens.py:reset_usageunused-export
- src/processing/profiles.py:jsonunused-import
- src/scrapers/telegram.py:timezoneunused-import
- src/scrapers/twitter_playwright.py:globunused-import
- src/scrapers/twitter_playwright.py:Listunused-import
- src/setup/ai_recommend.py:Optionalunused-import
The code number leaves out tests, fixtures, docs, examples, data files, styles, translations and vendored code.
Largest clones in the code
- 11 lines in 4 placespython50 tokens
183Args: 184 system: System prompt 185 user: User prompt 186 temperature: Sampling temperature 187 max_tokens: Maximum tokens to generate 188 189Returns: 190 str: Generated text 191""" 192temperature = self.temperature if temperature is None else temperatureFirst 10 of 11 lines.
- 22 lines in 2 placespython104 tokens
322 response = await self._do_request( 323 system=system, 324 user=user, 325 temperature=temperature, 326 max_tokens=max_tokens, 327 include_temperature=include_temperature, 328 use_max_completion_tokens=use_max_completion_tokens, 329 ) 330 break 331except OpenAIStatusError as exc:First 10 of 22 lines.
- 11 lines in 2 placespython98 tokens
24 """Print the application banner.""" 25 banner = r""" 26[bold blue] 27 _ _ _ 28 | | | | (_) 29 | |__| | ___ _ __ _ ___ ___ _ __ 30 | __ |/ _ \| '__| |_ / / _ \| '_ \ 31 | | | | (_) | | | |/ / | (_) | | | | 32 |_| |_|\___/|_| |_/___| \___/|_| |_| 33[/bold blue]First 10 of 11 lines.
7 more
- 14 lines in 2 placespython95 tokens
- 10 lines in 2 placespython80 tokens
- 7 lines in 2 placespython65 tokens
- 13 lines in 2 placespython65 tokens
- 10 lines in 2 placespython61 tokens
- 12 lines in 2 placespython56 tokens
- 15 lines in 2 placespython54 tokens
Largest clones over all files, tests and data included
- 25 lines in 3 placesmarkdowndocs and examples824 tokens
4<p><strong>Enjoy the News itself. Leave others to Horizon</strong></p> 5 6<a href="https://trendshift.io/repositories/22864?utm_source=trendshift-badge&utm_medium=badge&utm_campaign=badge-trendshift-22864" target="_blank" rel… 7<a href="https://trendshift.io/repositories/22864?utm_source=trendshift-badge&utm_medium=badge&utm_campaign=badge-trendshift-22864" target="_blank" rel… 8<a href="https://hellogithub.com/repository/Thysrael/Horizon" target="_blank"><img src="https://abroad.hellogithub.com/v1/widgets/recommend.svg?rid=7a4b606e28e… 9<br> 10 11[](LICENSE) 12[](https://github.com/astral-sh/uv) 13[](https://www.horizon1123.top/)First 10 of 25 lines.
- 14 lines in 5 placespythontests93 tokenstests/test_webhook.py:1451–1464tests/test_webhook.py:1480–1493tests/test_webhook.py:1508–1521tests/test_webhook.py:1603–1616tests/test_webhook.py:1627–1640
1451mock_console = MagicMock() 1452 1453with patch("httpx.AsyncClient") as mock_client_cls: 1454 mock_client = AsyncMock() 1455 mock_client.get = AsyncMock(return_value=mock_response) 1456 mock_client.__aenter__ = AsyncMock(return_value=mock_client) 1457 mock_client.__aexit__ = AsyncMock(return_value=False) 1458 mock_client_cls.return_value = mock_client 1459 1460 notifier.console = mock_consoleFirst 10 of 14 lines.
- 9 lines in 4 placespythontests86 tokenstests/test_twitter.py:193–201tests/test_twitter.py:249–257tests/test_twitter.py:273–281tests/test_twitter.py:295–303
193old = (since - timedelta(hours=2)).strftime("%a %b %d %H:%M:%S +0000 %Y") 194 195def handler(request: httpx.Request) -> httpx.Response: 196 if "/runs" in request.url.path and request.method == "POST": 197 return httpx.Response(200, json=_run_resp()) 198 if "/actor-runs/" in request.url.path: 199 return httpx.Response(200, json=_status_resp()) 200 if "/datasets/" in request.url.path: 201 return httpx.Response(200, json=[_tweet("1", created_at=old)])249since = datetime.now(timezone.utc) - timedelta(hours=1) 250 251def handler(request: httpx.Request) -> httpx.Response: 252 if "/runs" in request.url.path and request.method == "POST": 253 return httpx.Response(200, json=_run_resp()) 254 if "/actor-runs/" in request.url.path: 255 return httpx.Response(200, json=_status_resp()) 256 if "/datasets/" in request.url.path: 257 return httpx.Response(200, json=[{"noResults": True}, _tweet("99")]) - 8 lines in 4 placespythontests60 tokens
- 10 lines in 4 placespythontests58 tokens
By format, code only
| Format | Files | Lines | Clones | Duplicated lines | Duplication |
|---|---|---|---|---|---|
| python | 62 | 14,225 | 17 | 186 | 1.31% |
| bash | 1 | 63 | 0 | 0 | 0% |
By format, all files
| Format | Files | Lines | Clones | Duplicated lines | Duplication |
|---|---|---|---|---|---|
| python | 113 | 27,602 | 117 | 1,271 | 4.6% |
| json | 18 | 1,794 | 9 | 243 | 13.55% |
| markdown | 35 | 4,910 | 6 | 93 | 1.89% |
| markup | 5 | 1,292 | 1 | 10 | 0.77% |
| css | 1 | 191 | 0 | 0 | 0% |
| bash | 9 | 165 | 0 | 0 | 0% |
| javascript | 1 | 132 | 0 | 0 | 0% |
| yaml | 4 | 77 | 0 | 0 | 0% |
| toml | 1 | 64 | 0 | 0 | 0% |
| docker | 1 | 45 | 0 | 0 | 0% |
Trending appearances
| Day | Rank | Stars | Files | Lines | Clones | All files | Code | Health | Commit |
|---|---|---|---|---|---|---|---|---|---|
| Nov 5, 2026 | #9 | 12,645 (+121) | 189 | 36,312 | 133 | 4.45% | 1.3% | B 70.4 | d7406f7 |
Want this for your own project? Install jscpd and run jscpd ., or measure it the way the baselines were measured.