semvec/pypi-packages huggingface dataset:
multicalc-suraj 0.2.5
A simple calculator library with add, subtract, multiply and divide functions.
Requires Python: >=3.7

# Multicalc Suraj

A simple Python calculator library for basic arithmetic operations.

## Installation

pip install multicalc-suraj

## Usage

```python
from multicalcs.operations import add, subtract, multiply, divide

print(add(2, 3))
print(subtract(5, 2))
print(multiply(4, 3))
print(divide(10, 2))
```

## Features

- Addition
- Subtraction
- Multiplication
- Division

## Author

Suraj KS
cronguard 0.1.0
Wrap cron jobs with timing, output capture, and exit code tracking
Requires Python: >=3.12
Keywords: cli, cron, devops, jobs, monitoring, wrapper

# cronguard

Wrap cron jobs with execution tracking, timing, output capture, and exit code reporting.

[![PyPI version](https://img.shields.io/pypi/v/cronguard.svg)](https://pypi.org/project/cronguard/)
[![Downloads](https://img.shields.io/pypi/dm/cronguard.svg)](https://pypi.org/project/cronguard/)
[![Python](https://img.shields.io/pypi/pyversions/cronguard.svg)](https://pypi.org/project/cronguard/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

## Install

```bash
pip install cronguard
```

```bash
uv add cronguard
```

```bash
brew install cronguard
```

## Usage

### Basic run

```bash
cronguard run "echo hello"
```

### With a timeout (seconds)

```bash
cronguard run "backup.sh" --timeout 300
```

### With a human label

```bash
cronguard run "deploy.sh" --label "nightly-deploy"
```

### JSON output (good for piping to monitoring)

```bash
cronguard run "test.sh" --json
```

### Quiet mode (only output on failure)

```bash
cronguard run "cleanup.sh" --quiet
```

## Drop it in your crontab

```crontab
# Run backup every night at 2am, timeout after 1 hour
0 2 * * * cronguard run "/home/me/backup.sh" --label "nightly-backup" --timeout 3600 --quiet 2>&1 | logger -t cronguard
```

The `--quiet` flag keeps things silent when everything works. If the job fails, cronguard prints the full report so `logger` (or your monitoring) picks it up.

## All options

```
cronguard run COMMAND [OPTIONS]

Arguments:
  COMMAND              The command to run

Options:
  --timeout, -t FLOAT  Timeout in seconds. Exit code 124 on timeout.
  --label, -l TEXT     Human-readable label for this job.
  --json, -j           Output results as JSON.
  --quiet, -q          Only output on failure. Silent success.

Global:
  --version, -V        Show version and exit.
  --help               Show this message and exit.
```

## Why I built this

Cron jobs fail silently. You set up a backup script, forget about it, and three months later you find out it has been broken the whole time. I wanted something dead simple that wraps any command and gives you timing, exit codes, and captured output so you can pipe it into whatever alerting you already use. No daemons, no config files, just prefix your cron command with `cronguard run` and you get visibility.

## License

MIT
branchguard 0.1.0
Clean up stale and merged git branches
Requires Python: >=3.12
Keywords: branches, cleanup, cli, git, prune

# branchguard

Clean up stale and merged git branches.

[![PyPI version](https://img.shields.io/pypi/v/branchguard)](https://pypi.org/project/branchguard/)
[![Downloads](https://img.shields.io/pypi/dm/branchguard)](https://pypi.org/project/branchguard/)
[![Python version](https://img.shields.io/pypi/pyversions/branchguard)](https://pypi.org/project/branchguard/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

## Install

```bash
pip install branchguard
```

```bash
uv tool install branchguard
```

```bash
brew install branchguard
```

## Usage

Scan for branches that can be pruned (dry run, nothing gets deleted):

```bash
branchguard
```

Or explicitly:

```bash
branchguard scan
```

Only show branches that have been merged into main:

```bash
branchguard scan --merged
```

Check against a different target branch:

```bash
branchguard scan --target develop
```

Show branches older than 30 days instead of the default 90:

```bash
branchguard scan --days 30
```

Include remote branches:

```bash
branchguard scan --remote
```

Actually delete the branches:

```bash
branchguard scan --force
```

Get JSON output:

```bash
branchguard scan --json
```

## What the output looks like

```
          branchguard
┏━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━┓
┃ Branch             ┃ Last Commit ┃ Age (days) ┃ Merged? ┃ Status  ┃
┡━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━┩
│ feature/old-login  │ 2024-08-15  │        185 │ yes     │ merged  │
│ fix/header-bug     │ 2024-09-01  │        168 │ no      │ stale   │
│ feature/signup     │ 2024-11-20  │         88 │ yes     │ merged  │
└────────────────────┴─────────────┴────────────┴─────────┴─────────┘

Found 3 branches to prune. Run with --force to delete.
```

## All options

| Option | Short | Default | Description |
|--------|-------|---------|-------------|
| `--days` | `-d` | `90` | Branches older than this many days are considered stale |
| `--merged` | `-m` | off | Only show branches merged into the target branch |
| `--target` | `-t` | `main` | Target branch to check merged status against |
| `--remote` | `-r` | off | Include remote branches |
| `--force` | `-f` | off | Actually delete branches (default is dry-run) |
| `--json` | `-j` | off | Output results as JSON |
| `--version` | `-V` | - | Show version and exit |

## Why I built this

I kept accumulating dozens of stale branches in every repo I worked on. Every few weeks I would manually run `git branch --merged` and delete them one by one, or I would forget and end up with 50+ branches cluttering my local. I wanted a single command that shows me what is safe to delete and lets me clean up in one shot.

## License

MIT
pseudo-labeling 0.1.0
A lightweight inference pipeline for pseudo-labeling and model prototyping.
Requires Python: >=3.8

# Pseudo-Labeling Inference Pipeline

A lightweight inference pipeline for running various models on datasets like CIFAR-10, ImageNet, etc., configured via Hydra.

## Quick Start

### 1. Setup Environment
Ensure your environment is set up with the required dependencies.
```bash
pip install -r requirements.txt
# Or use the existing conda env
conda activate proxy-det
```

### 2. Run Inference
Run the main script. By default, it runs `resnet18` on `cifar10` (or whatever defaults are in `configs/config.yaml`).
```bash
python main.py
```

### 3. Verify Setup & Usage
Run the included example script to understand how to interact with the dataset wrappers and verify your environment.
```bash
python src/test/example_usage.py
```

## Features

- **Batch Inference**: Efficiently run pytorch models on standard datasets.
- **Streaming Data**: Support for streaming huge datasets (e.g., ImageNet-1k) from Hugging Face without downloading.
- **Label Mapping**: Auto-map predictions between different label spaces (e.g., ImageNet -> CIFAR10).

## Project Structure

```text
├── configs/            # Hydra configs
├── src/
│   ├── datasets/       # Dataset wrappers (standard & streaming)
│   ├── models/         # Model definitions
│   ├── inference/      # Inference engine
│   ├── test/           # Tests and verification scripts
├── main.py             # Entry point
└── requirements.txt
```

## Testing & Verification

The project includes a `src/test` directory with unit tests and examples.

**Run Unit Tests:**
```bash
python src/test/test_wrappers.py
```
*Tests all wrappers including streaming and reliability edge cases.*

**Run Usage Example:**
```bash
python src/test/example_usage.py
```
*Demonstrates how to initialize wrappers (both local and streaming) and access data.*

## Output

Results are saved to the `outputs/` directory by default.

**Filename Format:**
`[dataset_name]-[model_name]-[split].csv`

**CSV Structure:**
```csv
sample_id,prediction,confidence,ground_truth
cifar10_test_0,776,0.2668,3
...
```
- `sample_id`: Unique identifier for the sample.
- `prediction`: The class index predicted by the model (mapped to target dataset space if applicable).
- `confidence`: The probability/confidence score of the prediction.
- `ground_truth`: The actual class label.

## Label Mapping

To handle label discrepancies (e.g., ImageNet model on CIFAR10), the system automatically maps equivalent classes using JSON files in `configs/mappings/`.

- **Model Config**: Models define their `source_dataset` (e.g., `imagenet1k`).
- **Logic**: If `source != target`, predictions are mapped. Unmapped classes become `-1`.
- **Supported Mappings**: ImageNet1k -> Imagenette, CIFAR10 (208 classes), CIFAR100 (131 classes).