semvec/pypi-packages huggingface dataset:
steerex 0.1.0
A research platform for LLM steering vector optimization and analysis
Requires Python: >=3.10
Keywords: activation engineering, alignment, interpretability, llm, steering

# steerex

> **Attribution**: This library is a modular reimplementation of [llm-steering-opt](https://github.com/jacobdunefsky/llm-steering-opt) by Jacob Dunefsky. Full credit goes to the original author for the steering vector optimization algorithms.

A research platform for LLM activation engineering and steering vector extraction.

## Installation

```bash
uv pip install -e ".[dev]"
```

## Quick Start

### CAA Extraction

Extract steering vectors using Contrastive Activation Addition (difference of means):

```python
from transformers import AutoModelForCausalLM, AutoTokenizer
from steerex import extract, ContrastPair, HuggingFaceBackend

# Load model
model = AutoModelForCausalLM.from_pretrained("google/gemma-2-2b")
tokenizer = AutoTokenizer.from_pretrained("google/gemma-2-2b")
backend = HuggingFaceBackend(model, tokenizer)

# Define contrast pairs
pairs = [
    ContrastPair.from_messages(
        positive=[
            {"role": "user", "content": "Hi"},
            {"role": "assistant", "content": "Hello! How can I help?"},
        ],
        negative=[
            {"role": "user", "content": "Hi"},
            {"role": "assistant", "content": "Go away."},
        ],
    ),
]

# Extract and use
result = extract(backend, tokenizer, pairs, layer=16)
steering = result.to_steering()

output = backend.generate_with_steering(
    "Hello!",
    steering_mode=steering,
    layers=16,
    max_new_tokens=50,
)
```

### Gradient Optimization

Learn steering vectors through optimization:

```python
from steerex import (
    SteeringOptimizer,
    VectorSteering,
    HuggingFaceBackend,
    TrainingDatapoint,
    OptimizationConfig,
)

backend = HuggingFaceBackend(model, tokenizer)
steering = VectorSteering()
config = OptimizationConfig(lr=0.1, max_iters=50)

datapoint = TrainingDatapoint(
    prompt="My favorite animal is",
    dst_completions=[" definitely cats!"],  # Promote
    src_completions=[" definitely dogs!"],  # Suppress
)

optimizer = SteeringOptimizer(backend, steering, config)
result = optimizer.optimize([datapoint], layer=10)

output = backend.generate_with_steering(
    "My favorite animal is",
    steering_mode=steering,
    layers=10,
    max_new_tokens=30,
)
```

## Extraction Methods

| Method | How it works |
|--------|--------------|
| CAA | `mean(positive) - mean(negative)` activations |
| Gradient | Optimizes vector to promote/suppress completions |

## Steering Modes

```python
from steerex import VectorSteering, ClampSteering, AffineSteering

VectorSteering()   # Additive: activation += strength * vector
ClampSteering()    # Projects activations toward vector direction
AffineSteering()   # Learned affine transformation
```
KEGG-parser 0.0.14
KEGG Parser: A tool for parsing and converting KEGG data into manipulable Python objects.
Requires Python: >=3.8

# KEGG-parser
[![PyPI](https://img.shields.io/pypi/v/KEGG-parser.svg?style=flat)](https://pypi.python.org/pypi/KEGG-parser) ![Build Status](https://github.com/lozuponelab/KEGG_parser/actions/workflows/main.yml/badge.svg)
[![Coveralls](https://img.shields.io/coveralls/lozuponelab/KEGG_parser.svg)](https://coveralls.io/github/lozuponelab/KEGG_parser)

A python API to parse KEGG objects.

## Installation

KEGG-parser can be installed via pip.
```bash
pip install KEGG-parser
```
iflow-mcp_braindead-dev_instagram-dms-mcp 0.1.4
A Model Context Protocol server that lets AI assistants read and send Instagram DMs
Requires Python: >=3.11

# Instagram DMs MCP

A Model Context Protocol (MCP) server that lets AI assistants read and send Instagram DMs.

[![Deploy to Render](https://render.com/images/deploy-to-render-button.svg)](https://render.com/deploy?repo=https://github.com/braindead-dev/instagram-dms-mcp)

## Deployment

### Option 1: One-Click Deploy (Render)

1. Click the "Deploy to Render" button above
2. Add your environment variables in Render dashboard:
   - `IG_COOKIES` - Your Instagram cookies as JSON (see below)
   - `POKE_API_KEY` - Your Poke API key (optional, for DM notifications)
3. Your MCP server will be at `https://your-service.onrender.com/mcp`

### Option 2: Local Development

## Quick Start

### 1. Get Your Instagram Cookies

1. Go to [instagram.com](https://www.instagram.com) and log in
2. Open DevTools (F12) → **Application** tab → **Cookies** → `https://www.instagram.com`
3. Copy these values into your `.env`:

| Cookie | Env Variable |
|--------|--------------|
| `sessionid` | `IG_SESSION_ID` |
| `ds_user_id` | `IG_USER_ID` |
| `csrftoken` | `IG_CSRF_TOKEN` |
| `datr` | `IG_DATR` |
| `ig_did` | `IG_DID` |
| `mid` | `IG_MID` |

### 2. Setup

```bash
git clone https://github.com/braindead-dev/instagram-dms-mcp.git
cd instagram-dms-mcp

# Build the gateway (requires Go 1.22+)
cd gateway && ./build.sh && cd ..

# Configure
cp env.example .env
# Edit .env with your cookies

# Run
pip install -r requirements.txt
python src/server.py
```

## Tools

| Tool | Description |
|------|-------------|
| `get_inbox()` | See all your conversations |
| `get_conversation(user)` | Read messages with someone |
| `send_message(user, message)` | Send a message |
| `react(user, emoji)` | React to their last message |

### Example Flow

```
User: "Check my Instagram DMs"
→ get_inbox()

User: "What did @johndoe say?"
→ get_conversation("johndoe")

User: "Reply with 'sounds good!'"
→ send_message("johndoe", "sounds good!")

User: "React with a heart"
→ react("johndoe", "❤️")
```

## Incoming DM Notifications (Poke)

To get notified when you receive new DMs:

1. Get your API key from [poke.com/settings/advanced](https://poke.com/settings/advanced)
2. Add to `.env`:
   ```
   POKE_API_KEY=your_key_here
   ```

New DMs will be forwarded to Poke as: `📩 Instagram DM from @username: message`

## Behavior Settings

The MCP simulates natural behavior by default:

| Setting | Default | Description |
|---------|---------|-------------|
| `IG_SIMULATE_TYPING` | `true` | Show typing indicator before sending |
| `IG_AUTO_MARK_SEEN` | `true` | Mark as read when opening conversation |
| `IG_TYPING_DELAY` | `1.5` | Seconds to "type" before sending |
envkit 0.7.0.post1
A lightweight, strongly-typed environment variable parser focused on explicit configuration and predictable behavior, inspired by environs.
Requires Python: >=3.12

# EnvKit

[![PyPI - Version](https://img.shields.io/pypi/v/envkit)](https://pypi.org/project/envkit/)
[![PyPI - Downloads](https://img.shields.io/pypi/dm/envkit)](https://pypi.org/project/envkit/)

A lightweight, strongly‑typed environment variable parser focused on explicit configuration and predictable behavior, inspired by [environs](https://github.com/sloria/environs).

*This project is in an early development stage. Expect breaking changes and incomplete features.*

## Installation

```bash
pip install envkit
```

## Usage

```python
from envkit import Env

# Required string with minimum length
api_key = Env.str("API_KEY", min_length=32)

# Optional integer with default and range
port = Env.int("PORT", required=False, default=8080, min_value=1, max_value=65535)

# Boolean with default
debug = Env.bool("DEBUG", required=False, default=False)

# Enum parsing
log_level = Env.enum("LOG_LEVEL", enum=LogLevel, required=False, default=LogLevel.INFO)
```

## Contributing

Contributions are welcome!
Whether you want to report an issue, suggest an improvement, or submit a pull
request, your help is appreciated.

If you're new to open source, feel free to participate as well — the project is
open to contributors of all experience levels.

- Open an issue for bugs, ideas, or questions
- Submit a pull request with changes or enhancements
- Documentation and test improvements are also valuable

Everyone is welcome to contribute.
inkpython 0.1.0
Python runtime for Ink stories.
Requires Python: >=3.10
Keywords: ink, interactive-fiction, narrative

# Inkpython

Python runtime for ink (ported from inkjs) that loads compiled `.ink.json` files and plays them in pure Python.

## Table of contents

- [Installation](#installation)
- [Quickstart](#quickstart)
- [Working with a JSON file](#working-with-a-json-file)
- [CLI player](#cli-player)
- [External functions](#external-functions)
- [Tests](#tests)
- [License](#license)

## Installation

From PyPI: `pip install inkpython`

Dependencies:
- Runtime: none
- Tests: `pytest`

## Quickstart

```python
from pathlib import Path
from inkpython import Story

story_json = Path("path/to/story.ink.json").read_text(encoding="utf-8-sig")
story = Story(story_json)

print(story.ContinueMaximally())
```

## Working with a JSON file

Inkpython runs compiled ink JSON output (from `inklecate` or the official ink compiler).

If you load from disk, make sure to strip the BOM or read with `utf-8-sig`:

```python
from pathlib import Path
from inkpython import Story

text = Path("story.ink.json").read_text(encoding="utf-8-sig")
story = Story(text)
```

## CLI player

A simple CLI player is included:

```bash
inkpython path/to/story.ink.json
```

It prints output, lists choices, and lets you pick by number.

## External functions

You can bind external functions via `BindExternalFunction`:

```python
story.BindExternalFunction("message", lambda arg: print("MESSAGE:", arg))
```

If you need the text output from a function call, use `EvaluateFunction(..., True)`:

```python
result = story.EvaluateFunction("my_func", [1, 2], True)
# result == {"returned": <value>, "output": "text\n"}
```

## Tests

```bash
pytest -q
```

## License

MIT. See `LICENSE`.