Hostile 99% python Download

swanlab 0.10.6

Assigns Discord webhook URL in PythonApplies wraps to nested Python function

Evidence

Assigns Discord webhook URL in Python discord.py · lines 1–34
1from typing import Any, Dict, Optional
2
3import requests
4
5from swanlab.plugin.notification.base import NotificationCallback
6from swanlab.sdk.internal.pkg import console, safe
7
8
9class DiscordCallback(NotificationCallback):
10 """Discord notification callback.
11
12 Usage::
13
14 from swanlab.plugin import DiscordCallback
15
16 swanlab.init(
17 callbacks=[DiscordCallback(webhook_url="https://discord.com/api/webhooks/...")]
18 )
19 """
⋯4 lines
24
25 def _send_notification(self, state: str, error: Optional[str]) -> None:
26 with safe.block(requests.RequestException, message="❌ DiscordBot sending failed"):
27 content = self._build_content(state, error)
28 payload: Dict[str, Any] = {"content": content}
29 resp = requests.post(self._webhook_url, json=payload, timeout=10)
30 resp.raise_for_status()
31 if resp.status_code not in (200, 204):
32 console.warning(f"❌ DiscordBot sending failed: {resp.text}")
33 return
34 console.info("✅ DiscordBot notification sent successfully")
Declares Python license expression METADATA · lines 9–14
9:155… [email protected]>, Feudalman <[email protected]>
10License-Expression: Apache-2.0
11License-File: LICENSE
12Keywords: machine learning,reproducibility,visualization
13Classifier: Development Status :: 3 - Alpha
14Classifier: License :: OSI …
Declares Python runtime dependencies METADATA · lines 21–31
21:39… thon :: 3.12
22Classifier: Programming Language :: Python :: 3.13
23Classifier: Programming Language :: Python :: 3.14
24Classifier: Topic :: Scientific/Engineering
25Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
26Classifier: Topic :: Scientific/Engineering :: Visualization
27Requires-Python: >=3.9
28Requires-Dist: click
29Requires-Dist: nvidia-ml-py
30Requires-Dist: orjson; python_version > '3.9'
31Requires-Dist: orjson<=3.11.5; python_version == '3.9 …
Declares Markdown package description METADATA · lines 61–68
61Provides-Extra: s3
62Requires-Dist: boto3>=1.35.49; extra == 's3'
63Description-Content-Type: text/markdown
64
65<div align="center">
66
67<picture>
68 <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/SwanHu …
Package metadata references Shields badge URLs METADATA · lines 294–295
294:79… �语言模型原理与实践教程 ![GitHub Repo stars](https://img.shields.io/github/stars/datawhalechina/happy-llm)
295- [self-llm](https://github.com/datawhalechina/self-llm):《开源大模型食用指�� …

Showing the top 5 files — 6 more files (49 regions) not shown.

No evidence locations were recorded for this file. Raw result

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.