semvec/pypi-packages huggingface dataset:
pokerFunctions 0.6
A package for poker functions
Requires Python: >=3.6


# Poker Bot

## Overview
Poker Bot is a Python package designed for calculating poker hand equities and managing a poker game. This package includes functionalities for deck management, hand evaluation, equity calculation, and game management.

## Features
- **Deck Management**: Initialize, shuffle, draw, and reset a deck of cards.
- **Hand Evaluation**: Evaluate poker hands to determine their ranks.
- **Equity Calculation**: Calculate the probability of winning, losing, and tying for two-player No-Limit Hold'em.
- **Game Management**: Manage player buy-ins, rebuys, and cashouts in a poker game.

## Installation
To install the package, use:
\`\`\`sh
pip install pokerFunctions
\`\`\`

## Usage

### Deck Management
\`\`\`python
from pokerFunctions.equity import Deck

# Initialize a new deck
deck = Deck()

# Shuffle the deck
deck.shuffle()

# Draw cards
cards = deck.draw(5)
print(cards)

# Reset the deck
deck.reset()
\`\`\`

### Hand Evaluation
\`\`\`python
from pokerFunctions.equity import evaluate

hand = ['6s', '7s', '8s', '9s', 'ts']  # Straight flush
rank = evaluate(hand, Deck())
print(rank)  # Output: [9, 10]
\`\`\`

### Equity Calculation
\`\`\`python
from pokerFunctions.equity import equity

hero = ['as', 'ks']
villain = ['qd', 'qh']
board = ['2s', '3s', '4s']
result = equity(hero, villain, board, runs=1000)
print(result)  # Output: [win_percentage_hero, win_percentage_villain, tie_percentage]
\`\`\`

### Game Management
\`\`\`python
from pokerFunctions.gamebank import Game

# Initialize a new game
game = Game('host_name')

# Add players
game.add_player('player1', 100)
game.add_player('player2', 150)

# Player rebuys
game.rebuy('player1', 50)

# Remove a player (cash out)
game.remove_player('player2', 100)

# Get game status
print(game.gamestatus())
\`\`\`

## Development
To contribute to the development of Poker Bot, clone the repository and run the following commands to install the dependencies and run tests:
\`\`\`sh
git clone https://github.com/yourusername/pokerFunctions.git
cd pokerFunctions
pip install -r requirements.txt
python -m unittest discover
\`\`\`

## License
This project is licensed under the MIT License.

## Contact
For more information or support, contact [Jonah Aden](mailto:me@jonahaden.org).

---

*Note: This is a basic README template. Customize it according to your project's specifics and requirements.*
json-dict-diff 1.0.5
A simple library to create a minimal diff of two json compatible dictionaries
Requires Python: >=3.9

# Json Dict Diff

Library for creating a minimal diff of two json-compatible Python dictionaries.

This library can be used to compare two json-compatible Python dictionaries (i.e. dictionaries, lists, ... containing only the following primitives: `int`, `float`, `str`, `list`, `dict`, `set`, `tuple`, `bool`) and generates a "minimal" diff.
The diff is represented as a dictionary where insertions/deletions/substitutions are represented as tuples.
For example the following two dictionaries:

```py
diff(
  { "a": [ { "b": 1, "c": True }, 1.0, "x" ], "d": 1 },
  { "a": [ { "b": 2, "c": True }, 1.0, "y", True ] }
)
```

will result in the following diff:

```py
{ "a": [ { "b": (1, 2) }, ("x", "y"), (None, True) ], "d": (1, None) }
```

Here the tuples `(1, 2), ("x", "y"), (None, True), (1, None)` represent the substitions that happened.
`None` implies that an object was either removed or added.

If there is no diff (e.g.: `diff({ "a": 1 }, { "a": 1 })`) the result will be `None`. In this sense,
the library can also be used to compare two json-compatible dictionaries.

---

If an object of any other type is used in a dict, list, ..., a `ValidationException` will be raised.

## Exports

```py
JDict = Union[int, float, str, List["Result"], Dict[str, "Result"], Tuple["Result"], Set["Result"], None]

class ValidationException

def validate(a: JDict):

def diff(a: JDict, b: JDict) -> JDict:
```

## Notes

Primitive objects such as ints, floats, ... can also be diffed which will result in a single tuple of a substition.
For example:

```py
diff("a", "b") == ("a", "b")
diff("a", "a") is None
```

---

The diff will treat lists, sets and tuples as lists, which means that the result will contain lists instead of sets or tuples.
This is due to tuples being reserved for the substitution results.

---

If it is not clear which element in a list might be substituted this library makes no guarantees on the actual substitution.
For example:

```py
diff([1, 2, 3], [1, 4, 5])
```

can result either in: `[ (2, 4), (3, 5) ]` or `[ (3, 4), (2, 5) ]`.

---

`None` elements might or might not show up as a diff.
For example:

```py
diff([ None, 1 ], [1])
```

might result in `[ (None, 1) ]` or `None` (i.e. no diff).
multi-modal-tokenizers 0.0.2
Multi-modal tokenizers for more than just text.
Requires Python: >=3.8

# Multi-Modal Tokenizers

Multi-modal tokenizers for more than just text. This package provides tools for tokenizing and decoding images and mixed-modal inputs (text and images) using encoders like [DALL-E's VAE](https://github.com/openai/DALL-E).

## Installation

To install the package, clone the repository and use pip to install it:

```sh
git clone https://github.com/anothy1/multi-modal-tokenizers
pip install ./multi-modal-tokenizers
```

Or from PyPI:

```sh
pip install multi-modal-tokenizers
```

## Usage

### Example: Using DalleTokenizer

Below is an example script demonstrating how to use the `DalleTokenizer` to encode and decode images.

```python
import requests
import PIL
import io
from multi_modal_tokenizers import DalleTokenizer, MixedModalTokenizer
from IPython.display import display

def download_image(url):
    resp = requests.get(url)
    resp.raise_for_status()
    return PIL.Image.open(io.BytesIO(resp.content))

# Download an image
img = download_image('https://assets.bwbx.io/images/users/iqjWHBFdfxIU/iKIWgaiJUtss/v2/1000x-1.jpg')

# Load the DalleTokenizer from Hugging Face repository
image_tokenizer = DalleTokenizer.from_hf("anothy1/dalle-tokenizer")

# Encode the image
tokens = image_tokenizer.encode(img)
print("Encoded tokens:", tokens)

# Decode the tokens back to an image
reconstructed = image_tokenizer.decode(tokens)

# Display the reconstructed image
display(reconstructed)
```

### Example: Using MixedModalTokenizer

The package also provides `MixedModalTokenizer` for tokenizing and decoding mixed-modal inputs (text and images).

```python
from transformers import AutoTokenizer
from multi_modal_tokenizers import MixedModalTokenizer
from PIL import Image

# Load a pretrained text tokenizer from Hugging Face
text_tokenizer = AutoTokenizer.from_pretrained("bert-base-uncased")

# Create a MixedModalTokenizer
mixed_tokenizer = MixedModalTokenizer(
    text_tokenizer=text_tokenizer,
    image_tokenizer=image_tokenizer,
    device="cpu"
)

# Example usage
text = "This is an example with <image> in the middle."
img_path = "path/to/your/image.jpg"
image = Image.open(img_path)

# Encode the text and image
encoded = mixed_tokenizer.encode(text=text, images=[image])
print("Encoded mixed-modal tokens:", encoded)

# Decode the sequence back to text and image
decoded_text, decoded_images = mixed_tokenizer.decode(encoded)
print("Decoded text:", decoded_text)
for idx, img in enumerate(decoded_images):
    img.save(f"decoded_image_{idx}.png")
```
repartee 0.1.1
A CLI tool to interface with multiple AI APIs for prompt-response handling.
Requires Python: >=3.6

# Repartee

Repartee is a command-line interface (CLI) tool designed to interface with multiple AI APIs to handle various functionalities, including sending prompts and receiving responses from AI models. It tracks spending based on token usage and offers a flexible configuration system.

## Core Functionality
- Interface with multiple AI APIs (GPT-4o, GPT-4-turbo, GPT-3.5-turbo from OpenAI, Claude 3, Gemini 1.5, Perplexity).
- Securely store API keys in environment variables.
- Configure API parameters such as max tokens and temperature.
- Support YAML configuration files for settings.
- Command-line argument parsing for API selection and prompt input.
- Output formatting options (standard output, file, REPL).
- Interactive REPL prompt.
- Input from files and shell command piping.
- Advanced features like error handling, retry mechanisms, and spending tracking.

## Project Structure
```
repartee/
│
├── repartee/
│   ├── __init__.py
│   ├── cli.py
│   ├── config.py
│   ├── api_clients/
│   │   ├── __init__.py
│   │   ├── openai_api.py
│   │   ├── claude3.py
│   │   ├── gemini15.py
│   │   └── perplexity.py
│   ├── prompt_handler.py
│   ├── output_formatter.py
│   ├── repl.py
│   ├── spending_tracker.py
│   └── utils.py
│
├── tests/
│   ├── __init__.py
│   ├── test_cli.py
│   ├── test_config.py
│   ├── test_api_clients.py
│   ├── test_prompt_handler.py
│   ├── test_output_formatter.py
│   ├── test_repl.py
│   └── test_spending_tracker.py
│
├── .gitignore
├── README.md
├── setup.py
└── requirements.txt
```

## Key Components

1. **cli.py**: Handles command-line argument parsing and routes the inputs to the appropriate API client.
2. **config.py**: Manages loading and accessing configuration settings from YAML files.
3. **api_clients/openai_api.py**: Contains functions to interact with OpenAI's GPT models, including checking API key availability and making API requests.
4. **output_formatter.py**: Formats the AI responses into markdown format suitable for Obsidian, with specific callout blocks for system and user messages.
5. **spending_tracker.py**: Tracks token usage and calculates spending based on the model's token cost.
6. **repl.py**: Provides an interactive Read-Eval-Print Loop (REPL) for live prompt-response sessions.

## Roadmap

- [x] Set up the initial project structure
- [x] Implement CLI argument parsing
- [x] Implement configuration management
- [x] Implement OpenAI API client
- [ ] Implement Claude 3 API client
- [ ] Implement Gemini 1.5 API client
- [ ] Implement Perplexity API client
- [x] Implement basic output formatting
- [ ] Implement spending tracker
- [ ] Implement REPL interface
- [ ] Write tests for CLI
- [ ] Write tests for configuration management
- [ ] Write tests for API clients
- [ ] Write tests for prompt handler
- [ ] Write tests for output formatter
- [ ] Write tests for REPL
- [ ] Write tests for spending tracker