semvec/pypi-packages huggingface dataset:
asinc 0.1.0
asyncio util library
License: MIT
Requires Python: >=3.10,<4.0

# Asyncio util library

## periodic_call
Allows periodically execute an awaitable incorruptible with event.

```python
import signal
import asyncio
from asinc import periodic_call


async def run():
    stop_event = asyncio.Event()
    signal.signal(signal.SIGINT, lambda: stop_event.set())
    
    await periodic_call(lambda: asyncio.sleep(1), stop_event, 10)
```
eeg-dementia-classification-MNet 1.4.1
Pretrained MNet model for classifying demetia subclasses (HV, AD, DLB, and iNPH)
License: MIT
Requires Python: >=3.0
Keywords: dementia screening,mild cognitive impairment,Alzheimer's disease,AD,dementia with Lewy bodies,DLB,idiopathic normal-pressure hydrocephalus,iNPH,multiple centres

## Installation
``` bash
$ pip install eeg-dementia-classification-MNet
```

## Pretrained Weights
Pretrained weights are available on [our Google Drive](https://drive.google.com/file/d/1QZYlEtcd4Szf5K55cNrSxalHcW6UjkaF/view?usp=sharing).
1. Download 'pretrained_weights.tar.gz'.
2. Extract the file using the following command:
``` bash
$ tar xvf pretrained_weights.tar.gz
```
3. Locate the extradcted 'pretrained_weights' directory at the working directory. As an illustration, the weight files (.pth) should be organized as follows:
```
./pretrained_weights/
├── AD_vs_DLB
│   ├── model_fold#0_epoch#045.pth
│   ├── model_fold#1_epoch#031.pth
│   ├── model_fold#2_epoch#029.pth
│   ├── model_fold#3_epoch#031.pth
│   └── model_fold#4_epoch#028.pth
├── AD_vs_DLB_vs_NPH
│   ├── model_fold#0_epoch#024.pth
│   ├── model_fold#1_epoch#035.pth
...
```

## Usage
``` python
from eeg_dementia_classification_MNet import MNet_1000
import torch

## Parameters
DISEASE_TYPES = ["HV", "AD", "DLB", "NPH"]

## MNet
model = MNet_1000(DISEASE_TYPES, is_ensemble=True)
model.load_weights(i_fold=0)

## Feeds data
bs, n_chs, seq_len = 16, 19, 1000
x = torch.rand(bs, n_chs, seq_len)
y = model(x)
```

## Contact
Please feel free to contact [the author](mailto:ywata1989@gmail.com).
puts 0.0.11
Python Utility Tools
License: MIT
Requires Python: >=3.6
Keywords: utilities,toolkit,toolbox,logger

# puts - Python Utility Tools

Python high-level helper classes and functions.

[![](https://img.shields.io/pypi/v/puts)](https://pypi.org/project/puts/)
[![](https://img.shields.io/pypi/dm/puts)](https://pypistats.org/packages/puts)
[![](https://img.shields.io/badge/license-MIT-blue)](https://github.com/MarkHershey/puts/blob/master/LICENSE)
[![](https://img.shields.io/badge/code%20style-black-black)](https://github.com/psf/black)

## Install

-   Prerequisite: Python 3.6+

```bash
pip install --upgrade puts
```

## Usage

### Logging with Colored Output

```python
from puts import get_logger

logger = get_logger()

logger.debug("Hello world!")
logger.info("Hello world!")
logger.warning("Hello world!")
logger.error("Hello world!")
logger.critical("Hello world!")
```

## Development

### Set up dev environment

-   _clone this repo_
    ```bash
    $ git clone https://github.com/MarkHershey/puts.git
    ```
-   _go to project root_
    ```bash
    $ cd puts
    ```
-   _create virtual env for this project_
    ```bash
    $ python -m venv venv
    $ source venv/bin/activate
    $ pip install --upgrade pip wheel setuptools
    ```
-   _install this package in **editable** mode_
    ```bash
    $ pip install -e ".[dev]"
    ```

### Run tests

```bash
$ pytest
```

## Disclaimer

-   This package is highly opinionated, it does not intend to cater to every use case.
-   It is only intended for personal projects usage (for now).
django-markdown-it 0.4.1
Markdown template filter for Django following CommonMark specs (markdown-it-py).
License: MIT
Requires Python: >=3.12,<4.0
Keywords: django,markdown,commonmark

# django-markdown-it

Markdown template filter for Django following [CommonMark](https://commonmark.org/) specs.

## Installation

1. Install the package:

    ```bash
    poetry add django-markdown-it
    ```
    or using pip:
    ```bash
    pip install django-markdown-it
    ```

2. Add `markdownit` to your `INSTALLED_APPS`:

    ```python
    INSTALLED_APPS = [
        # ...
        'markdownit',
    ]
    ```

## Usage

1. Load the template tag library in your template:

    ```django
    {% load markdownit %}
    ```

2. Use the `markdownit` filter on a string:

    ```django
    {{ my_string|markdownit }}
    ```


## Credits

- Inspired by [django-markdownify](https://github.com/erwinmatijsen/django-markdownify/).
- Using [markdown-it-py](https://github.com/executablebooks/markdown-it-py) for Markdown rendering.
- Using [nh3](https://github.com/messense/nh3)/[ammonia](https://github.com/rust-ammonia/ammonia) for HTML sanitization.
kipu-client 0.0.3
Python client for Kipu platform
License: MIT
Requires Python: <3.12,>=3.9
Keywords: kipu python dcqo

# Kipu Python Client

The aim of this repository is to host the Python client that will enable customers to interact without platform and the solvers it contains:

* DCQO
* DCQC (direct and variational)

Those will be indirectly used as the focus of the library will be to ease the usage by requesting the minimum amount of information required and automate all decisions made in order to achieve user goals (precision, execution time or cost among others).

## Authentication

In order to access the platform users will need to log in to it.

```
import os
from kipu import Client

client = Client(api_key=os.environ["API_KEY"])
```

This way the communication with the backend will be granted by the use of the API key.

## Ising model

the most basic function on the client is the composition of a circuit solving an Ising type of model

$$

H = \sum_i^N h_i\sigma_i^z + \sum_i^N \sum_{j>i}^N J_{ij}\sigma_i^z\sigma_j^z.

$$

By providing the $h$ and $J$ coefficients one can ask the library to compose the corresponding circuit to be executed on a gate-based quantum device.

```
h = [0.0, ...]
J = {
    "0-1" : 0.01,...
}

qasm_text = client.compose_circuit(h, J)
```

That way one would retrieve the QASM code of the circuit.

## Optimization

Basically, each enabled case translates the problem to be solved to an Ising Hamiltonian whose ground state is solved by the corresponding endpoint. For FEATURE SELECTION for example, given a dataset we will select which one is the target column and the number of assets we would like to select (maximum number).

```
target_columns = "target"
max_features = 6

client.feature_selection(df, target_columns, max_features)
```