semvec/pypi-packages huggingface dataset:
cocotb-amba 0.1.2
Collection of AMBA Masters and Slaves for cocotb
Requires Python: <4.0,>=3.10.0

[![PyPI Version](https://badge.fury.io/py/cocotb-amba.svg)](https://badge.fury.io/py/cocotb-amba)
[![Python Build](https://github.com/nbiotcloud/cocotb-amba/actions/workflows/main.yml/badge.svg)](https://github.com/nbiotcloud/cocotb-amba/actions/workflows/main.yml)
[![Documentation](https://readthedocs.org/projects/cocotb-amba/badge/?version=stable)](https://cocotb-amba.readthedocs.io/en/stable/?badge=stable)
[![Coverage Status](https://coveralls.io/repos/github/nbiotcloud/cocotb-amba/badge.svg?branch=main)](https://coveralls.io/github/nbiotcloud/cocotb-amba?branch=main)
[![python-versions](https://img.shields.io/pypi/pyversions/cocotb-amba.svg)](https://pypi.python.org/pypi/cocotb-amba)

# Collection of AMBA Masters and Slaves for cocotb

* [Documentation](https://cocotb-amba.readthedocs.io/en/stable/)
* [PyPI](https://pypi.org/project/cocotb-amba/)
* [Sources](https://github.com/nbiotcloud/cocotb-amba)
* [Issues](https://github.com/nbiotcloud/cocotb-amba/issues)

## Installation

Installing it is pretty easy:

```bash
pip install cocotb-amba
```
ligraph 0.1.0
A Python package for graph data structures and algorithms.
Requires Python: >=3.6

# ligraph Package

ligraph is a Python package designed to provide a simple and efficient way to work with graph data structures. It includes functionalities to create graphs, add edges, and perform various graph operations and algorithms.

## Installation

To install the ligraph package, you can use pip:

```
pip install ligraph
```

## Usage

Here is a basic example of how to use the ligraph package:

```python
from ligraph.graph import Graph

# Create a new graph with 7 vertices
g = Graph(7)

# Add edges
g.addEdge(0, 1)
g.addEdge(0, 2)
g.addEdge(1, 3)
g.addEdge(1, 4)
g.addEdge(2, 5)
g.addEdge(2, 6)

# Check if a path exists using Iterative Deepening DFS
target = 6
maxDepth = 3
src = 0

if g.IDDFS(src, target, maxDepth):
    print("Target is reachable from source within max depth.")
else:
    print("Target is NOT reachable from source within max depth.")

# Visualize the graph as a tree
g.printTree(0)
```

## Features

- Create and manage graphs
- Add edges between nodes
- Easy-to-use interface

## Contributing

Contributions are welcome! Please feel free to submit a pull request or open an issue for any suggestions or improvements.

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
ragdict 0.2.1
A dictionary with fuzzy key matching using RAG and LLM
Requires Python: >=3.8

# RagDict

RagDict is an enhanced Python dictionary with fuzzy key matching support using RAG (Retrieval-Augmented Generation) and LLM.

## Features

- Works like a regular Python dictionary for exact key matches
- Automatically finds similar keys when an exact match is not found
- Uses OpenAI embeddings to find semantically similar keys
- Applies LLM to select the most appropriate key from candidates
- Fully customizable similarity parameters and models

## Installation

```bash
pip install ragdict
```

Or using uv:

```bash
uv pip install ragdict
```

## Usage

### Basic Example

```python
from ragdict import RagDict
import os

# Set your OpenAI API key
os.environ["OPENAI_API_KEY"] = "your-api-key"

# Create a dictionary with car prices
car_prices = RagDict({
    "Toyota Camry": 25000,
    "Honda Accord": 27000,
    "Tesla Model 3": 40000,
    "Ford Mustang": 35000,
    "Chevrolet Corvette": 60000
})

# Exact match works like a normal dictionary
price = car_prices["Toyota Camry"]  # 25000

# Fuzzy matching when the key is not exact
price = car_prices["Toyot Camri"]  # Will find "Toyota Camry" and return 25000
price = car_prices["Tesla Model Three"]  # Will find "Tesla Model 3" and return 40000
price = car_prices["Chevy Corvette"]  # Will find "Chevrolet Corvette" and return 60000
```

### Parameter Customization

```python
# Creating a dictionary with customizable parameters
products = RagDict(
    {
        "iPhone 14 Pro": 999,
        "Samsung Galaxy S23": 799,
        "Google Pixel 7": 599
    },
    embedding_model="text-embedding-3-large",  # Embedding model
    llm_model="gpt-4o",  # LLM model for key selection
    similarity_threshold=0.6,  # Minimum similarity threshold (0-1)
    top_k=5,  # Number of top candidates to consider
    api_key="your-openai-api-key"  # You can pass the API key directly
)

# Fuzzy search
price = products["iPhone 14"]  # Will find "iPhone 14 Pro"
price = products["Samsung S23"]  # Will find "Samsung Galaxy S23"
```

## How It Works

1. When you request a key, RagDict first tries to find an exact match
2. If an exact match is not found, RagDict:
   - Creates an embedding for the requested key
   - Finds semantically similar keys based on cosine similarity
   - Filters keys below the similarity threshold
   - Uses LLM to select the most appropriate key from candidates
   - Returns the value associated with the selected key

## Requirements

- Python 3.8+
- OpenAI API key
- Packages: openai, numpy

## License

MIT