semvec/pypi-packages huggingface dataset:
ai-traffic-light-simulator 1.0.1
Traffic simulation for traffic light A.I. training
Requires Python: >=3.8
Keywords: artifical intelligence,traffic,traffic simulator,simulation,cellular automata

# TrafficLightAI
A python traffic simulation serving as a playground to create traffic light A.I. systems. The traffic simulation uses a cellular automata approach to simulate large traffic grids. The simulation is optimized with Numba.

![image](https://user-images.githubusercontent.com/21147581/231293375-88a54f54-2462-4189-8153-8945c1621249.png)


## Installation

```sh
pip install ai-traffic-light-simulator
```

## Example

```py
from traffic_simulation_numba import TrafficSimulation
# OR from traffic_simulation import TrafficSimulation
import random

NORTH_SOUTH_GREEN = 0
EAST_WEST_GREEN = 1

# A basic A.I. which randomly determines light timings
# Inputs: [North waiting, East waiting, South waiting, West Waiting, Previous Light Direction]
def my_ai(inputs):
    if inputs[-1] == NORTH_SOUTH_GREEN:
        return EAST_WEST_GREEN, random.randint(1,30)
    if inputs[-1] == EAST_WEST_GREEN:
        return NORTH_SOUTH_GREEN, random.randint(1,30)

# Make traffic simulation object with our naive A.I.
sim = TrafficSimulation(
    my_ai, 
    grid_size_x=8,
    grid_size_y=8, 
    lane_length=10,
    max_speed=5, 
    in_rate=0.2, 
    initial_density=0.1, 
    seed=42
)

results = sim.run_simulation(1000) # Runs the simulation for 1000 ticks
print(results)
# Returns { 'cars_stopped': 131680, 'carbon_emissions': 672824 }

# Render a frame of the simulation after 1000 ticks
sim.render_frame("Small.png")
```
prompt-wrangler 0.5.0
A Python wrapper for the Prompt Wrangler REST API.
Requires Python: >=3.6

# Prompt Wrangler

A Python wrapper for the [Prompt Wrangler](https://prompt-wrangler.com/) REST API.

Easily integrate large language models (LLMs) into your app with Prompt Wrangler! Prompt Wrangler makes it simple to incorporate LLMs into your application and enhance your prompts without updating your code. Best of all, it's 100% free!

## Installation

Install the package using pip:

```bash
pip install prompt-wrangler
```

## Environment Variables

Before you need to set environment variables.

If you want to use private prompts from your workspace you should set:

```txt
PROMPT_WRANGLER_API_KEY=<your_api_key>
```

If you want to use public prompts from the community you should set:

```txt
OPENAI_API_KEY=<open_ai_api_key>
```

> Note that if you set your `PROMPT_WRANGLER_API_KEY` you don't need to set `OPENAI_API_KEY` as it will be used as a fallback.

## Usage

```python
from prompt_wrangler import PromptWrangler

# Create a PromptWrangler instance
pw = PromptWrangler()

# Get a prompt
prompt_path = "my-workspace/my-prompt-slug"
prompt = prompt_wrangler.prompt(prompt_path)

# Run the prompt
args = {'input_text': 'some input'}
result = prompt.run(args=args)
prediction = result.prediction
```

## License

This project is licensed under the MIT License.

## Local Development

### Publish

Run. Username is exit38

```
./publish.sh
```