Thysrael/Horizon

📡 Your own AI-powered news radar. Generates daily briefings in English & Chinese. | 用 AI 构建你专属的新闻雷达

Python★ 12,645+121 that day#9 on trending

Analyzed November 5, 2026 at d7406f7 (main) with jscpd v5 in 1.5s.

B70.4/100
Project health27,842 lines of code (M)
Duplication69
4.6% in python, javascript, bash, docker
Dead 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

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 temperature
    

    First 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
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&amp;utm_medium=badge&amp;utm_campaign=badge-trendshift-22864" target="_blank" rel…
    7<a href="https://trendshift.io/repositories/22864?utm_source=trendshift-badge&amp;utm_medium=badge&amp;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](https://img.shields.io/badge/license-MIT-green.svg?style=for-the-badge&logo=opensourceinitiative&logoColor=white)](LICENSE)
    12[![Tool uv](https://img.shields.io/badge/Tool-uv-4B275F?style=for-the-badge&logo=uv&logoColor=white)](https://github.com/astral-sh/uv)
    13[![Website](https://img.shields.io/badge/Website-Horizon-263238?style=for-the-badge&logo=homepage&logoColor=white)](https://www.horizon1123.top/)
    

    First 10 of 25 lines.

  • 14 lines in 5 placespythontests93 tokens
    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_console
    

    First 10 of 14 lines.

  • 9 lines in 4 placespythontests86 tokens
    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
FormatFilesLinesClonesDuplicated linesDuplication
python6214,225171861.31%
bash163000%
By format, all files
FormatFilesLinesClonesDuplicated linesDuplication
python11327,6021171,2714.6%
json181,794924313.55%
markdown354,9106931.89%
markup51,2921100.77%
css1191000%
bash9165000%
javascript1132000%
yaml477000%
toml164000%
docker145000%

Trending appearances

DayRankStarsFilesLinesClonesAll filesCodeHealthCommit
Nov 5, 2026#912,645 (+121)18936,3121334.45%1.3%B 70.4d7406f7

Want this for your own project? Install jscpd and run jscpd ., or measure it the way the baselines were measured.