semvec/pypi-packages huggingface dataset:
llmwalk 0.2.0
Explore the answer-space for any prompt and any MLX-supported model.
Requires Python: >=3.10

# llmwalk

Explore the answer-space for any prompt and any MLX-supported model. See
<https://huggingface.co/mlx-community/models> for supported models.

![Usage example gif](example1.gif)

Instead of sampling from the possible tokens each step, llmwalk branches out
and completes all of the branches the sampler would consider based on
`--top-k`, `--top-p` and `--temperature`, ranking the results by probability
as it goes.

The tree is walked prioritising the most likely branches, until it finds `-n`
branches and then it stops. It doesn't enumerate all possibilities, just enough
to know for sure it has found the `-n` most likely branches.

## Usage

- `uvx llmwalk -p "In what year was Barack Obama born?"`
- `uvx llmwalk -p "Write a haiku about compilers" -n 5`
- `uvx llmwalk -p "Give me one word: " --top-k 200 --temperature 0.7`

## Options

- `-p, --prompt TEXT`: Prompt to score (wrapped with the model’s chat template).
- `-m, --model MODEL`: MLX-LM model identifier or path (default: `mlx-community/Llama-3.2-1B-Instruct-4bit`), supported models can be found at <https://huggingface.co/mlx-community/models>
- `-n N`: Number of answers to show. The search stops once it has `N` finished answers and no unfinished branch can beat the worst of those `N`.
- `--min-probability FLOAT`: Any branch whose cumulative probability falls below this is marked finished (`low_probability`) and not expanded further.
- `--top-k INT`: At each step, expand at most `k` next tokens (highest probability).
- `--top-p FLOAT`: Nucleus cutoff applied *within the top-k tokens* at each step (keep adding tokens until cumulative probability ≥ `p`).
- `--temperature FLOAT`: Softmax temperature applied when computing per-step probabilities (`1.0` is the model distribution; must be `> 0`).
- `--stats-interval SECONDS`: How often to refresh the live view (`<= 0` disables periodic refresh; still renders at start/end).
- `--format {csv,json}`: Output format for machine-readable output. When specified, disables the interactive display and prints results to stdout when the job completes.

## Machine-readable output

Use `--format` to get structured output for scripting or further processing:

```bash
# JSON output
uvx llmwalk -p "What is 2+2?" --format json

# CSV output
uvx llmwalk -p "What is 2+2?" --format csv
```

JSON output includes detailed token-level information:

```json
[
  {
    "answer": "4",
    "probability": 0.95,
    "finish_reason": "eos_token",
    "tokens": [
      {"token": "4", "probability": 0.95}
    ]
  }
]
```

CSV output provides a simpler tabular format with columns: `answer`, `probability`, `finish_reason`.
sfetch 1.0.3
Command-line tool for displaying spotify artist and album information. 
Requires Python: >=3.8

# Spotify Fetch

Command-line tool for displaying spotify artist and album information.

![](/images/example.png)

# Requirements

1. Make sure you have `python` and `pip` installed.

2. Register a [spotify app](https://developer.spotify.com/dashboard/login) and name it `sfetch` or whatever name you would like. 

The redirect URI can be any valid URI such as `http://localhost`, `http://example.com`.

Once you have successfully registered an app, find your `Client ID` and `Client Secret`.

Don't share your `Client ID` and `Client Secret`.

3. Put the following variables you just got in your `.zshrc` or `.bashrc` or whatever shell you are using
```bash
export SPOTIPY_CLIENT_ID='your_client_id'
export SPOTIPY_CLIENT_SECRET='your_client_secret'
```

Remember to restart your shell!

# Installation

### Install with `pip`

```bash
pip install sfetch
```

### Install from source

1. Clone the repository 
```bash
git clone https://github.com/mihasket/sfetch.git
cd sfetch
```

2. Make sure you have the latest version of PyPA’s build installed:
```bash
python3 -m pip install --upgrade build
```

3. Run this command in the same directory as `pyproject.toml`
```bash
python3 -m build
```

This will create two files in the `dist` directory. Example:
```
dist/
├── sfetch-1.0.0-py3-none-any.whl
└── sfetch-1.0.0.tar.gz
```
The `tar.gz` file is a source distribution whereas the `.whl` file is a built distribution

4. Install the `.whl` file. Example:
```bash
pip install dist/sfetch-1.0.0-py3-none-any.whl
```
The `1.0.0` is for the version of the application.

If you want to uninstall use:
```bash
pip uninstall sfetch
```

# Usage example

For displaying artist information
```bash
sfetch --artist "C418"
```

For displaying album information
```bash
sfetch --artist "C418" --album "Volume Beta"
```

For additional help
```bash
sfetch --help
```