semvec/pypi-packages huggingface dataset:
manic-xai 1.0.83
Genetic Algorithm for Generating Metacounterfactual Explanations
Keywords: manic,metacounterfactual,counterfactual,xai,explanation,aggregation,disagreement,agreement

\n# Manic: A Genetic Algorithm-based Metaheuristic Approach for Nature-Inspired Aggregation of Counterfactuals

## Table of Contents
- [Introduction](#introduction)
- [Installation](#installation)
- [Usage](#usage)
- [Docker Instructions](#docker-instructions)
- [Citation](#citation)
- [Author](#author)
- [Contact](#contact)
- [License](#license)

## Introduction

Manic is a Python package that provides a genetic algorithm-based metaheuristic approach for aggregating counterfactual explanations. It implements a nature-inspired optimization technique to generate counterfactuals that explain the disagreement between different explainers. The goal is to find counterfactual instances that are both diverse and informative to enhance the interpretability of machine learning models.

## Installation

To install Manic, use the following pip3 command:

```bash
pip3 install manic-xai
```

## Usage

You can use Manic in your Python code as follows:

```python
from manic import Manic

# Define your data_instance, base_counterfactuals, categorical_features, immutable_features, feature_ranges, data, and predict_fn

manic_instance = Manic(data_instance, base_counterfactuals, categorical_features, immutable_features, feature_ranges, data, predict_fn)

# Generate counterfactuals
counterfactuals = manic_instance.generate_counterfactuals()
```

## Docker Instructions

To run Manic using Docker, follow these steps:

1. Build the Docker image:

```bash
docker build -t manic .
```

2. Run the Docker container

```bash
docker run -v /path/to/your/data:/data -it manic python3 your_script.py
```

## Citation
If you use the Manic package in your research or work and find it helpful, we kindly request that you cite it using the following BibTeX entry:

```bibtex
@software{manic,
  author       = {Craig Pirie},
  title        = {Manic: A Genetic Algorithm-based Metaheuristic Approach for Nature-Inspired Aggregation of Counterfactuals},
  year         = {2023},
  publisher    = {GitHub},
  journal      = {GitHub repository},
  howpublished = {\url{https://github.com/your-username/manic}},
}
```

We appreciate your support and acknowledgment of our work.

## Contact
For any inquiries or collaborations, please contact Craig Pirie at c.pirie11@rgu.ac.uk.

## License
This project is licensed under the MIT License. See the LICENSE file for details.

## Contributions
Contributions to the Manic package are always welcome. If you find any issues or have ideas for improvements, please feel free to open an issue or submit a pull request on the GitHub repository. Together, we can make Manic better for everyone.

## Changelog
For updates and a history of changes to the Manic package, please refer to the Changelog.
psycopg2-utility-functions 0.0.13
Utility functions/wrapper for psycopg2 python package
Keywords: python,database,postgresql,psql

# Psycopg2 Utility Functions

"Psycopg2 Utility Functions" is a Python package that provides utility functions for basic PostgreSQL database operations using the psycopg2 library.

## Installation

You can install this package using pip:

```bash
pip install psycopg2_utility_functions
```

# Usage
## Connecting to the Database

To establish a connection to a PostgreSQL database:

```commandline
from psycopg2_utility_functions import connect_to_database

connection = connect_to_database(database='your_db_name', user='your_db_user', password='your_db_password', host='your_db_host', port='your_db_port')
```

## Executing Queries

To execute a SQL query on the connected database:

```commandline
from psycopg2_utility_functions import execute_query

query = "CREATE TABLE users (id serial PRIMARY KEY, name varchar, age int);"
execute_query(connection, query)
```

## Fetching Data

To fetch data from the database and create objects using a custom class:

```commandline
from psycopg2_utility_functions import fetch_data

class User:
    def __init__(self, name, age):
        self.name = name
        self.age = age

query = "SELECT name, age FROM users WHERE age > %s;"
users = fetch_data(connection, query, User, values=(25,))
```

## Inserting Data

To insert a single row of data into a table:

```commandline
from psycopg2_utility_functions import insert_data

data = {'name': 'Alice', 'age': 30}
insert_data(connection, 'users', data)
```

## Updating Data

To update rows in a table based on a condition:

```commandline
from psycopg2_utility_functions import update_data

condition = "age > %s"
data = {'age': 31}
update_data(connection, 'users', condition, data)
```

## Deleting Data

To delete rows from a table based on a condition:

```commandline
from psycopg2_utility_functions import delete_data

condition = "age < %s"
delete_data(connection, 'users', condition)
```


## Contributing

Feel free to contribute to this project by opening issues or pull requests on the GitHub repository.

## License

This project is licensed under the MIT License.
yaqc-bluesky 2023.8.0
A bluesky interface to the yaq instrument control framework.
Requires Python: >3.7

# yaqc-bluesky

[![CI](https://img.shields.io/github/actions/workflow/status/bluesky/yaqc-bluesky/.github/workflows/python-test.yml)](https://github.com/bluesky/yaqc-bluesky/actions?query=workflow%3Apython-test)
[![PyPI](https://img.shields.io/pypi/v/yaqc-bluesky)](https://pypi.org/project/yaqc-bluesky)
[![Conda](https://img.shields.io/conda/vn/conda-forge/yaqc-bluesky)](https://anaconda.org/conda-forge/yaqc-bluesky)
[![yaq](https://img.shields.io/badge/framework-yaq-orange)](https://yaq.fyi/)
[![black](https://img.shields.io/badge/code--style-black-black)](https://black.readthedocs.io/)
[![ver](https://img.shields.io/badge/calver-YYYY.M.MICRO-blue)](https://calver.org/)
[![log](https://img.shields.io/badge/change-log-informational)](https://github.com/bluesky/yaqc-bluesky/blob/master/CHANGELOG.md)

A bluesky interface to the [yaq instrument control framework](https://yaq.fyi/).

To communicate with a yaq daemon, simply create a device::

```python
import yaqc_bluesky
device = yaqc_bluesky.Device(port=39000)
```

`yaqc_bluesky` will read the traits from the daemon and return an appropriate device instance based on what it finds.
Of course, you may also provide `host` as an argument (default localhost).
You may also optionally provide `name`, if you wish the bluesky device to have a different name than the yaq daemon.

`yaqc_bluesky` only exposes a subset of the functionality of yaq daemons.
Python users wishing to communicate with yaq may also be interested in [yaqc](https://python.yaq.fyi/yaqc/).

You can play with yaq on bluesky using our binder:

[![binder]( https://mybinder.org/badge.svg)]( https://mybinder.org/v2/gh/bluesky/yaqc-bluesky/master?urlpath=lab)

## happi support

`yaqc_bluesky` provides support for [Happi](https://github.com/pcdshub/happi).
Read more about yaq and Happi at [yaq.fyi/blog/happi/](https://yaq.fyi/blog/happi/).