semvec/pypi-packages huggingface dataset:
syrk 0.1.1
A multi-backend SYRK (Symmetric Rank-K Update) implementation
License: MIT
Requires Python: >=3.9
Keywords: syrk, linear-algebra, triton, cuda, gpu

# SYRK

A multi-backend implementation of the Symmetric Rank-K Update (SYRK) operation.

## Overview

SYRK computes the symmetric rank-k update operation:

```
D = α × A × Aᵀ + β × C
```

Where:
- `A` is an (N, K) input matrix
- `C` is an optional (N, N) symmetric matrix
- `α` and `β` are scalar coefficients
- `D` is the (N, N) symmetric output matrix

## Installation

```bash
# Basic installation
pip install .

# With Triton backend support
pip install ".[triton]"

# With all optional dependencies
pip install ".[all]"
```

## Quick Start

```python
import torch
from syrk import syrk

# Create input tensor (bfloat16 on CUDA)
a = torch.randn(1024, 512, dtype=torch.bfloat16, device='cuda')

# Compute A @ A^T
result = syrk(a)
print(result.shape)  # torch.Size([1024, 1024])

# With scaling factors
result = syrk(a, alpha=0.5)

# With additive term
c = torch.randn(1024, 1024, dtype=torch.bfloat16, device='cuda')
c = (c + c.T) / 2  # Make symmetric
result = syrk(a, c=c, alpha=1.0, beta=0.5)
```

## API Reference

### `syrk(a, c=None, alpha=1.0, beta=0.0, skip_upper_triangle=False, backend=None)`

Compute the Symmetric Rank-K Update operation.

**Parameters:**
- `a` (torch.Tensor): Input tensor of shape (N, K). Must be bfloat16.
- `c` (torch.Tensor, optional): Symmetric input tensor of shape (N, N). Required if beta != 0.
- `alpha` (float): Scaling factor for the matrix multiplication. Default: 1.0.
- `beta` (float): Scaling factor for the matrix addition. Default: 0.0.
- `skip_upper_triangle` (bool): If True, only compute the lower triangle. Default: False.
- `backend` (Backend, optional): The backend to use. Auto-selects if None.

**Returns:**
- torch.Tensor: Output tensor of shape (N, N).

## Backends

### Triton Backend

The Triton backend provides a high-performance GPU implementation using NVIDIA's Triton compiler. It requires:
- Triton >= 3.4.0 with TMA (Tensor Memory Accelerator) support
- NVIDIA GPU with appropriate compute capability

```python
from syrk import syrk
from syrk.backends import Backend, get_available_backends

# Check available backends
print(get_available_backends())  # [<Backend.TRITON: 'triton'>]

# Explicitly use Triton backend
result = syrk(a, backend=Backend.TRITON)
```

## Requirements

- Python >= 3.9
- PyTorch >= 2.0.0
- (Optional) Triton >= 3.4.0 for Triton backend

## License

This project is licensed under the MIT License. See [LICENSE](LICENSE) for details.

The Triton backend implementation is based on code from NVIDIA Corporation, 
originally licensed under the Apache License 2.0.

## Acknowledgments

- NVIDIA Corporation for the original Triton SYRK implementation
streamlit-advanced-dataframe 0.1.0
Streamlitの標準st.dataframeを拡張した高機能カスタムコンポーネント
License: MIT
Requires Python: >=3.12
Keywords: streamlit, dataframe, table, component, tanstack-table

# streamlit-advanced-dataframe

Streamlit's `st.dataframe` with advanced features using TanStack Table.

## Installation

```bash
pip install streamlit-advanced-dataframe
```

## Usage

```python
import pandas as pd
from streamlit_advanced_dataframe import advanced_dataframe

df = pd.DataFrame({
    "name": ["Alice", "Bob", "Charlie"],
    "age": [25, 30, 35],
    "city": ["Tokyo", "Osaka", "Kyoto"]
})

# Basic usage
advanced_dataframe(data=df, height=400, key="my_table")

# Single row selection
selected = advanced_dataframe(
    data=df,
    selection_mode="single-row",
    key="selectable_table"
)
if selected:
    st.write(f"Selected rows: {selected}")  # Returns list[int]

# Multi-row selection
selected = advanced_dataframe(
    data=df,
    selection_mode="multi-row",
    key="multi_selectable_table"
)
if selected:
    st.dataframe(df.iloc[selected])  # Show selected rows

# Filter columns
advanced_dataframe(
    data=df,
    filterable_columns=["name", "age", "city"],
    show_row_count=True,
    key="filterable_table"
)

# Header groups
advanced_dataframe(
    data=df,
    header_groups=[
        {"header": "Personal Info", "columns": ["name", "age"]},
        {"header": "Location", "columns": ["city"]}
    ],
    key="grouped_table"
)

# Column config (prefix/suffix)
df_sales = pd.DataFrame({
    "product": ["Product A", "Product B"],
    "price": [1000, 2000],
    "discount": [10, 20]
})
advanced_dataframe(
    data=df_sales,
    column_config={
        "price": {"prefix": "$"},
        "discount": {"suffix": "%"}
    },
    key="config_table"
)
```

## Parameters

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `data` | `pd.DataFrame` | required | DataFrame to display |
| `height` | `int` | `600` | Table height in pixels |
| `use_container_width` | `bool` | `False` | Use full container width |
| `selection_mode` | `"single-row"` \| `"multi-row"` \| `None` | `None` | Row selection mode |
| `filterable_columns` | `list[str]` \| `None` | `None` | Columns to enable filtering |
| `show_row_count` | `bool` | `False` | Show filtered row count |
| `column_order` | `list[str]` \| `None` | `None` | Columns to display (in order) |
| `header_groups` | `list[dict]` \| `None` | `None` | Header group configuration |
| `expandable` | `bool` | `False` | Enable row expansion |
| `sub_rows_key` | `str` | `"subRows"` | Key for sub-row data |
| `show_summary` | `bool` | `True` | Show summary row |
| `column_config` | `dict[str, dict]` \| `None` | `None` | Per-column display config (prefix/suffix) |
| `key` | `str` \| `None` | `None` | Streamlit component key |

## Returns

`list[int]` - List of selected row indices (0-based). Returns an empty list `[]` when no rows are selected or `selection_mode` is `None`.