semvec/pypi-packages huggingface dataset:
py2hy 0.2.1
Translate Python code to Hy code

py2hy
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

py2hy is a library and command-line interface to translate Python code to `Hy <http://hylang.org>`__ code. As with Hy's built-in ``hy2py``, all style information is discarded, including most comments. The result can be messy, but it works, and it makes a good starting point for a hand translation. You can also use py2hy when still learning Hy, to help figure out how to do something in Hy given an example in Python.

Usage
============================================================

To use the command-line interface, see ``python3 -m py2hy --help``. The programmatic interface comprises two functions, of which see the docstrings:

- ``py2hy.ast_to_models``
- ``py2hy.ast_to_text``

The test suite uses pytest.

To autoformat the output, try the third-party library `beautifhy <https://github.com/atisharma/beautifhy>`__::

    $ python3 -m py2hy mycode.py | beautifhy -

Unimplemented nodes
============================================================

The following features of Python's ``ast`` are not yet implemented, and are unlikely to get implemented unless I find myself wanting them for some reason. I'll accept patches for them, though.

- ``type_comment`` for these node types: ``For``, ``AsyncFor``, ``With``, ``AsyncWith``
- Type aliases: ``TypeAlias``, ``TypeIgnore``, ``TypeVar``, ``ParamSpec``, ``TypeVarTuple``
- ``TryStar``
- Pattern-matching: ``Match``, ``MatchValue``, ``MatchSingleton``, ``MatchSequence``, ``MatchMapping``, ``MatchClass``, ``MatchStar``, ``MatchAs``, ``MatchOr``

Version history
============================================================

Here are the most important user-visible changes in each release.

- 0.2.1 (2026-01-14): Fixed some bugs with default arguments and class decorators.
- 0.2.0 (2025-06-05): ``ast_to_models`` and ``ast_to_text`` got a new parameter ``allow_unimplemented``. An anthill's worth of bugs have been exterminated.
- 0.1.0 (2025-05-08): First release.

License
============================================================

This program is copyright 2026 Kodi B. Arfer.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the `GNU General Public License`_ for more details.

.. _`GNU General Public License`: http://www.gnu.org/licenses/
mpl-gradients 0.2.1
Gradient fills for Matplotlib charts using Agg filters
Requires Python: >=3.9

# mpl-gradients

[![PyPI version](https://badge.fury.io/py/mpl-gradients.svg)](https://badge.fury.io/py/mpl-gradients)
![Gradient Demo](assets/polished_demo.png)

A lightweight, zero-dependency library to add linear gradient fills to Matplotlib charts.
*Solves [matplotlib/matplotlib#30958](https://github.com/matplotlib/matplotlib/issues/30958).*

## Features
* **Vertical Gradients:** Fade from Top to Bottom.
* **Horizontal Gradients:** Fade from Left to Right.
* **Diagonal Gradients:** Fade from Corner to Corner.
* **Alpha Blending:** Correctly handles transparency.

## Installation

You can install directly from GitHub:

```bash
pip install mpl-gradients
```

## Quick start 
```python
import matplotlib.pyplot as plt
from mpl_gradients import LinearGradient

fig, ax = plt.subplots()
ax.bar([0, 1, 2], [10, 20, 15])

# Create a gradient (Top-Left Navy -> Bottom-Right Lime)
gradient = LinearGradient("navy", "lime", direction="diagonal")

# Apply to bars
for bar in ax.containers[0]:
    bar.set_agg_filter(gradient)

plt.show()
```
## Requirements
Python 3.9+

Matplotlib

Numpy

## New in v0.2.0: Transparency Support

You can now create gradients that fade to transparent!

By default, gradients preserve the original alpha of the plot (`preserve_alpha=True`).
To create transparent gradients (e.g., Red -> Transparent), set `preserve_alpha=False`.

```python
from mpl_gradients import LinearGradient

# Create a gradient that fades from Red to Transparent to Green
gradient = LinearGradient.from_colors(
    ["red", "#ffffff00", "green"],
    preserve_alpha=False
)

# Apply it
ax.fill_between(x, y, color="blue").set_agg_filter(gradient)
langchain-ampersend-ai 0.0.2
LangChain integration for Ampersend x402 payments
Requires Python: >=3.13

# langchain-ampersend

LangChain integration for Ampersend x402 payments. Call remote A2A agents with automatic payment handling.

## Installation

```bash
pip install langchain-ampersend
```

## Usage

```python
from langchain_ampersend import (
    A2AToolkit,
    AmpersendTreasurer,
    ApiClient,
    ApiClientOptions,
    SmartAccountWallet,
)
from langchain.agents import create_agent
from langchain_openai import ChatOpenAI

# Setup Ampersend API client
api_client = ApiClient(ApiClientOptions(
    base_url="https://api.ampersend.ai",
    session_key_private_key="0x...",  # Your session key
))

# Setup wallet (smart account)
wallet = SmartAccountWallet(
    owner_private_key="0x...",
    smart_account_address="0x...",
)

# Create treasurer
treasurer = AmpersendTreasurer(api_client=api_client, wallet=wallet)

# Create toolkit for a remote agent
toolkit = A2AToolkit(
    remote_agent_url="https://agent.example.com",
    treasurer=treasurer,
)

# Initialize (discovers the agent)
await toolkit.initialize()

# Use with LangGraph
llm = ChatOpenAI(model="gpt-4")
agent = create_agent(llm, toolkit.get_tools())

# Run
result = await agent.ainvoke({"messages": [("user", "Query some data")]})
```

## Tools

The toolkit provides two tools:

- `a2a_get_agent_details` - Get the capabilities and skills of the remote agent
- `a2a_send_message` - Send a message to the remote agent (payments handled automatically)
beswarm 0.3.23
MAS
Requires Python: >=3.11

# beswarm

beswarm: be swarm

beswarm is a tool for creating a swarm of agents to complete a task.

## 任务

```
DiT-Air 架构与MMDiT和PixArt的区别是什么？详细分析三个模型的架构，并给出代码实现。
```

```
arXiv:2502.14831v2 和 arXiv:2503.10618v2 的 渐进式 VAE 训练方法有一定的相似性，请详细分析这两种方法的异同，底层原理的异同。
```

```
论文地址：'/Users/yanyuming/Library/Mobile Documents/iCloud~QReader~MarginStudy~easy/Documents/论文/EQ-VAE Equivariance Regularized Latent Space for Improved Generative Image Modeling.pdf'
仓库地址：https://github.com/zelaki/eqvae
```

```
论文地址：'/Users/yanyuming/Library/Mobile Documents/iCloud~QReader~MarginStudy~easy/Documents/论文/Vector Quantized Diffusion Model for Text-to-Image Synthesis.pdf'

查看代码库，我需要将论文的公式，代码，理论，实验结果，总结，形成一个文档。请进行彻底的分析。

找到每一个数学概念对应的代码实现。整理成文档保存到本地。
```

```bash
docker buildx build --platform linux/amd64,linux/arm64 -t yym68686/beswarm:latest --push .
docker pull yym68686/beswarm
```

```bash
cd ~/Downloads/GitHub/beswarm && docker run --rm \
--env-file .env \
-v ./work:/app/work beswarm \
--goal "分析这个仓库 https://github.com/cloneofsimo/minRF"
```

测试 docker 是否可以用 GPU：

```bash
docker run --gpus all -it --rm --entrypoint nvidia-smi yym68686/beswarm

docker run -it --rm --entrypoint cat yym68686/beswarm /app/beswarm/aient/src/aient/models/chatgpt.py
```

beswarm docker debug 命令

```bash
cd /Users/yanyuming/Downloads/GitHub/beswarm
docker run --rm -it \
--network="host" \
--env-file .env \
-v ./work/test:/app/work yym68686/beswarm \
--goal '帮我写一个简单的python脚本打印hello world' /bin/bash
```

服务器安装

```bash
pip install pipx
pipx ensurepath
source ~/.bashrc
pipx install nvitop
pip install beswarm -i https://pypi.tuna.tsinghua.edu.cn/simple

# 升级 从海外官方 pypi 升级
pip install --upgrade beswarm -i https://pypi.org/simple
pip install --upgrade beswarm -i https://pypi.tuna.tsinghua.edu.cn/simple
```

main.py

```python
import os
import asyncio
import nest_asyncio
nest_asyncio.apply()

from beswarm.tools import (
    worker,
    get_code_repo_map,
    search_arxiv,
    read_file,
    list_directory,
    excute_command,
    write_to_file,
    download_read_arxiv_pdf,
)

os.environ['API_KEY'] = ''
os.environ['BASE_URL'] = 'https://api.xxx.xyz/v1/chat/completions'
os.environ['MODEL'] = 'gemini-2.5-pro'

# 设定任务目标
goal = """

"""
work_dir = '/work_dir'

tools = [read_file, list_directory, write_to_file, excute_command, search_arxiv, download_read_arxiv_pdf, get_code_repo_map]
asyncio.run(worker(goal, tools, work_dir))
```