semvec/pypi-packages huggingface dataset:
dhybridrpy-test 1.2
A Python package to easily read input + output data from dHybridR.
Requires Python: >=3.8

# dhybridrpy

![PyPI version](https://img.shields.io/pypi/v/dhybridrpy?label=PyPI&color=blue)

`dhybridrpy` allows you to easily load and plot data from `dHybridR` simulations. It provides programmatic access to simulation input and output data and the ability to quickly visualize that data.

## Features

- Efficiently access simulation input data and output data like timesteps, fields (e.g. magnetic field), phases (e.g. distribution functions), and unprocessed ("raw") hdf5 files.
- Quickly plot 1D, 2D, and 3D output data.
- Lazily load large datasets using `dask`.

## Installation

The latest package version can be installed via pip:

```bash
pip install dhybridrpy
```

## Usage

Basic usage of the package:

```python
from dhybridrpy import DHybridrpy

# Enter your input file and output folder paths here
input_file = "examples/data/inputs/input"
output_folder = "examples/data/Output"

dpy = DHybridrpy(input_file=input_file, output_folder=output_folder)

# Print simulation timesteps
print(dpy.timesteps())

# Access an input variable
print(f"Timestep = {dpy.inputs['time']['dt']}")

# Access data at a specific timestep
ts = 1
Bx = dpy.timestep(ts).fields.Bx()
print(Bx.data)

# Plot data
import matplotlib.pyplot as plt
Bx.plot()
plt.show()
```

Further examples can be found in the `examples` folder.

## License

Project licensed under the GNU Affero General Public License v3.0. See the [LICENSE](LICENSE) file for details.

## Authors

- Bricker Ostler
- Miha Cernetic
sbai 0.1.2
Simplified AI API wrapper for ChatGPT and Google Gemini, enabling easy integration of language models with configurable parameters
Requires Python: >=3.8

# sbai (Simple Broader AI)

A Python package to simplify interactions with OpenAI and Google Gemini APIs.

## Installation

```bash
pip install sbai
```

## Features

- Easy-to-use interfaces for ChatGPT and Gemini
- Configurable model parameters
- Optional conversation memory
- Support for system instructions

## Usage

### ChatGPT Integration

```python
from sbai import ChatGPT

# Initialize with OpenAI API key
client = ChatGPT(
    api_key="your_openai_api_key", 
    model="gpt-4o-mini", 
    memory=True
)

# Send a prompt
response = client.prompt("Write a haiku about AI")
print(response)

# Clear conversation history
client.clear_history()
```

### Gemini Integration

```python
from sbai import Gemini

# Initialize with Google API key
client = Gemini(
    api_key="your_google_api_key", 
    model="gemini-2.0-flash-exp", 
    instructions="Be concise and helpful"
)

# Send a prompt
response = client.prompt("Explain quantum computing")
print(response)

# Clear conversation history
client.clear_history()
```

## Configuration Options

### ChatGPT
- `api_key`: Your OpenAI API key (required)
- `model`: OpenAI model to use (default: "gpt-4o-mini")
- `temperature`: Sampling temperature (0-1, default: 0)
- `top_p`: Nucleus sampling parameter (0-1, default: 0)
- `instructions`: System-level instructions
- `max_token`: Maximum tokens in response (default: 200)
- `memory`: Enable conversation memory (default: False)
- `memory_limit`: Maximum messages in memory (default: 5)

### Gemini
- `api_key`: Your Google API key (required)
- `model`: Gemini model to use (default: "gemini-2.0-flash-exp")
- `temperature`: Sampling temperature (0-1, default: 0)
- `top_p`: Nucleus sampling parameter (0-1, default: 0)
- `max_token`: Maximum tokens in response (default: 200)
- `memory`: Enable conversation memory (default: False)
- `instructions`: System-level instructions

## Requirements

- Python 3.8+
- `openai` library
- `google-generativeai` library

## License

MIT License