semvec/pypi-packages huggingface dataset:
ape-alchemy 0.8.11
ape-alchemy: Alchemy provider plugins
Requires Python: >=3.10
Keywords: ethereum

# Quick Start

Use the [Alchemy](https://alchemy.com/?r=jk3NDM0MTIwODIzM) provider plugin to interact with blockchains via APIs.
The `ape-alchemy` plugin supports the following ecosystems:

- Abstract
- ApeChain
- Arbitrum
- Astar
- Avalanche
- Base
- Berachain
- Blast
- BSC (including opBNB)
- CrossFi
- Ethereum
- Fantom
- Flow EVM
- Gnosis
- Lens
- Linea
- Lumia
- Mantle
- Metis
- Optimism
- Polygon
- Polygon-ZkEVM
- Rootstock
- Scroll
- Shape
- Soneium
- Sonic
- Unichain
- XMTP
- World-Chain
- zetachain
- ZkSync
- Zora

## Dependencies

- [python3](https://www.python.org/downloads) version 3.9 up to 3.12.

## Installation

### via `pip`

You can install the latest release via [`pip`](https://pypi.org/project/pip/):

```bash
pip install ape-alchemy
```

### via `setuptools`

You can clone the repository and use [`setuptools`](https://github.com/pypa/setuptools) for the most up-to-date version:

```bash
git clone https://github.com/ApeWorX/ape-alchemy.git
cd ape-alchemy
python3 setup.py install
```

## Quick Usage

First, make sure you have one of the following environment variables set (it doesn't matter which one):

- `WEB3_ALCHEMY_PROJECT_ID`
- `WEB3_ALCHEMY_API_KEY`
- `WEB3_<ecosystem>_<network>_ALCHEMY_PROJECT_ID`
- `WEB3_<ecosystem>_<network>_ALCHEMY_PROJECT_ID`

For example, to use both Arbitrum and Ethereum in the same session, you could set both `WEB3_ARBITRUM_MAINNET_ALCHEMY_PROJECT_ID` and `WEB3_ETHEREUM_MAINNET_ALCHEMY_PROJECT_ID`.

**NOTE**: If using non-Ethereum networks, take care to install the correct plugins, such as `ape-arbitrum`, `ape-optimism`, etc:

```bash
ape plugins install arbitrum
```

Then, either in your current terminal session or in your root RC file (e.g. `.bashrc`), add the following:

```bash
export WEB3_ALCHEMY_PROJECT_ID=MY_API_TOKEN=<value-of-secret-key>
```

To use the Alchemy provider plugin in most commands, set it via the `--network` option:

```bash
ape console --network ethereum:sepolia:alchemy
```

To connect to Alchemy from a Python script, use the `networks` top-level manager:

```python
from ape import networks

with networks.parse_network_choice("ethereum:mainnet:alchemy") as provider:
    ...
```

### Transaction Traces

If you are using a paid tier of Alchemy, you have access to both Geth and Parity style traces.
Parity traces are faster and thus are the ones uses in Ethereum receipts' `show_trace()` method:

```python
from ape import networks

alchemy = networks.provider  # Assuming connected to Alchemy
txn_hash = "0x053cba5c12172654d894f66d5670bab6215517a94189a9ffc09bc40a589ec04d"
receipt = alchemy.get_transaction(txn_hash)
receipt.show_trace()  # Prints the Transaction trace
```

To access the raw `CallTree`, do:

```python
from ape import networks

alchemy = networks.provider  # Assuming connected to Alchemy
txn_hash = "0x053cba5c12172654d894f66d5670bab6215517a94189a9ffc09bc40a589ec04d"
call_tree = alchemy.get_call_tree(txn_hash)
```

To learn more about transaction traces, view [Ape's transaction guide](https://docs.apeworx.io/ape/stable/userguides/transactions.html#traces).
alm-broadcast-server 0.1.2
WebSocket chat broadcast server CLI app implemented in python
Requires Python: >=3.10

# alm-broadcast-server
WebSocket chat broadcast server CLI app implemented in python.

## Requirements 
- Python v3.10+ (tested on v3.12)
- Pip

## Install 
Install the package from [PyPi](https://pypi.org/project/alm-broadcast-server/).

***Recommended:*** Use pip in a [virtual environment](https://docs.python.org/3/library/venv.html) `pip install alm-broadcast-server` **or** use [pipx](https://pipx.pypa.io/stable/) `pipx install alm-broadcast-server`.

## Usage
Use the help flag `alm-broadcast-server --help` `alm-broadcast-server start --help` `alm-broadcast-server connect --help` for informations about the commands and to see the available options. 

Use the start command `alm-broadcast-server start` to start a server. Use `--port` to specify the port used. Once running, type `help` to see the available commands.

Use the connect command `alm-broadcast-server connect` to connect to a running server. Use `--port` to specify the port the server is using. Once connected, type `/help` to see the available commands.
mps-carafe 0.2.1
CARAFE content-aware upsampling for Apple Silicon (MPS)
Requires Python: >=3.10
Keywords: pytorch, mps, apple-silicon, carafe, upsampling, segmentation

# MPS CARAFE

CARAFE (Content-Aware ReAssembly of FEatures) for Apple Silicon (M1/M2/M3/M4).

**Drop-in replacement** for mmcv's CARAFE op.

## Why?

CARAFE is a learnable upsampling operator used in:
- **Mask R-CNN**: Instance segmentation
- **FPN**: Feature Pyramid Networks
- **YOLACT**: Real-time instance segmentation

But mmcv's implementation is **CUDA-only**. On Mac you get:
```
NotImplementedError: carafe not implemented for MPS
```

This package provides a native Metal implementation.

## Installation

```bash
pip install mps-carafe
```

Or from source:

```bash
git clone https://github.com/mpsops/mps-carafe
cd mps-carafe
pip install -e .
```

## Quick Start

### Basic CARAFE Operation

```python
import torch
from mps_carafe import carafe

# Input features (N, C, H, W)
features = torch.randn(1, 64, 32, 32, device='mps')

# Reassembly masks (N, group_size * k^2, H*scale, W*scale)
kernel_size = 5
group_size = 1
scale_factor = 2
masks = torch.softmax(
    torch.randn(1, group_size * kernel_size**2, 64, 64, device='mps'),
    dim=1
)

# Upsample with CARAFE
output = carafe(features, masks, kernel_size, group_size, scale_factor)
# Output: (1, 64, 64, 64)
```

### CARAFE Module

```python
from mps_carafe import CARAFE

carafe_layer = CARAFE(kernel_size=5, group_size=1, scale_factor=2)
output = carafe_layer(features, masks)
```

### CARAFEPack (with mask predictor)

```python
from mps_carafe import CARAFEPack

# Complete upsampling block with built-in mask predictor
upsample = CARAFEPack(
    channels=64,
    kernel_size=5,
    group_size=1,
    scale_factor=2
).to('mps')

output = upsample(features)  # No need to provide masks
```

## API Reference

### `carafe(features, masks, kernel_size, group_size, scale_factor)`

| Parameter | Type | Description |
|-----------|------|-------------|
| `features` | Tensor | Input features (N, C, H, W) |
| `masks` | Tensor | Reassembly kernels (N, group_size * k^2, H*scale, W*scale) |
| `kernel_size` | int | Size of reassembly kernel (typically 5) |
| `group_size` | int | Number of channel groups (typically 1) |
| `scale_factor` | int | Upsampling factor (typically 2) |

### `CARAFEPack`

Complete CARAFE block with mask prediction convolutions.

## How It Works

CARAFE upsamples by:
1. For each output pixel, identify the corresponding input neighborhood
2. Use learned reassembly kernels (masks) to weight input pixels
3. Sum the weighted inputs to produce the output

Unlike bilinear upsampling which uses fixed weights, CARAFE learns content-aware weights that adapt to the image content.

## Compatibility

- **PyTorch**: 2.0+
- **macOS**: 12.0+ (Monterey)
- **Hardware**: Apple Silicon (M1/M2/M3/M4)

## Features

- Full forward and backward pass (training supported)
- fp32 and fp16 supported
- Compatible with mmcv CARAFE API

## Credits

- [CARAFE Paper](https://arxiv.org/abs/1905.02188) - Original research
- [mmcv](https://github.com/open-mmlab/mmcv) - Reference implementation

## License

MIT
mps-conv3d 0.2.1
3D Convolution for Apple Silicon (MPS)
Requires Python: >=3.10
Keywords: pytorch, mps, apple-silicon, conv3d, video, 3d-convolution

# MPS Conv3D

3D Convolution for Apple Silicon (M1/M2/M3/M4).

**Drop-in replacement** for `torch.nn.functional.conv3d` on MPS.

## Why?

3D convolutions are essential for video models:
- **Synchformer**: Audio-visual synchronization
- **I3D**: Video classification
- **SlowFast**: Action recognition
- **C3D**: Video feature extraction
- **MMAudio**: Audio generation from video

But PyTorch's MPS backend doesn't support 3D convolutions:
```
NotImplementedError: aten::slow_conv3d_forward is not implemented for MPS
```

This package provides a native Metal implementation.

## Installation

```bash
pip install mps-conv3d
```

Or from source:

```bash
git clone https://github.com/mpsops/mps-conv3d
cd mps-conv3d
pip install -e .
```

## Quick Start

### Patch All Conv3D Operations (Recommended)

```python
from mps_conv3d import patch_conv3d

# Patch at the start of your script
patch_conv3d()

# Now all conv3d operations use MPS!
import torch
import torch.nn.functional as F

x = torch.randn(1, 3, 16, 112, 112, device='mps')
w = torch.randn(64, 3, 3, 7, 7, device='mps')
out = F.conv3d(x, w, padding=(1, 3, 3))  # Uses MPS!
```

### Direct Usage

```python
import torch
from mps_conv3d import conv3d

x = torch.randn(1, 3, 16, 112, 112, device='mps')
w = torch.randn(64, 3, 3, 7, 7, device='mps')

out = conv3d(x, w, stride=1, padding=(1, 3, 3))
```

### Conv3d Module

```python
from mps_conv3d import Conv3d

conv = Conv3d(
    in_channels=3,
    out_channels=64,
    kernel_size=(3, 7, 7),
    stride=(1, 2, 2),
    padding=(1, 3, 3)
).to('mps')

x = torch.randn(1, 3, 16, 112, 112, device='mps')
out = conv(x)
```

## API Reference

### `conv3d(input, weight, bias, stride, padding, dilation, groups)`

Same signature as `torch.nn.functional.conv3d`.

| Parameter | Type | Description |
|-----------|------|-------------|
| `input` | Tensor | Input tensor (N, C_in, D, H, W) |
| `weight` | Tensor | Weight tensor (C_out, C_in/groups, kD, kH, kW) |
| `bias` | Tensor | Optional bias (C_out,) |
| `stride` | int/tuple | Stride of convolution |
| `padding` | int/tuple | Padding added to input |
| `dilation` | int/tuple | Dilation of kernel |
| `groups` | int | Number of groups |

### `patch_conv3d()`

Monkey-patches `torch.nn.functional.conv3d` to use MPS implementation for MPS tensors.

### `unpatch_conv3d()`

Restores original `torch.nn.functional.conv3d`.

## Compatibility

- **PyTorch**: 2.0+
- **macOS**: 12.0+ (Monterey)
- **Hardware**: Apple Silicon (M1/M2/M3/M4)

## Features

- Full forward and backward pass (training supported)
- fp32 and fp16 supported
- Groups and dilation supported
- Drop-in compatible with PyTorch API

## License

MIT