semvec/pypi-packages huggingface dataset:
frm-miner 0.0.8
Mine Frequent Representative Motifs
License: MIT
Requires Python: >=3.9

# FRM-Miner #

Frequent Representative Motif Miner (FRM-Miner): Efficiently Mining Frequent Representative Motifs in Large Collections of Time Series.

![Pipeline of FRM-Miner: A time series database is discretised into a sequence database using SAX. Non-overlapping frequent sequential patterns without gaps are mined, after which their occurrences are mapped back to the time series. The occurrences are then used to construct frequent representative motifs.](pipeline.png)

This repository contains the implementation of FRM-Miner as a Python package. By default, the C++ version is built and installed, but a pure Python implementation is provided as well.

# Installation

It is easiest to install FRM-Miner via pip:

```bash
pip install frm-miner
```

This installs the pure Python version, which can be imported with `from frm import Miner`.


Alternatively, if you want to install the C++ version, clone this directory and change to it.
Rename the file `_setup.py` to `setup.py`, then run
```bash
pip install .
```
A C++ compiler is needed for this, as well as a Python installation that includes the Python.h header files.
After installation, the C++ implementation can be imported with `from frm import Miner` and the pure Python version can be imported with `from frm._frm_py import Miner`.

# Example
You will probably get more meaningful results than this if you use your own data (collection of univariate time series, time series do not have to be equal length).
```
import numpy as np
import matplotlib.pyplot as plt  # Not in requirements

from frm import Miner

# Set hyperparameters
MINSUP = 0.3
SEGLEN = 5
ALPHABET = 5
K = 4

# Generate 10 random time series with 100 observations each
rng = np.random.default_rng()
data = [rng.standard_normal(100) for _ in range(10)]

# Mine frequent representative motifs
miner = Miner(MINSUP, SEGLEN, ALPHABET, k=K)
motifs = miner.mine(data)

# Plot frequent representative motifs
fig, axs = plt.subplots(ncols=K, sharey='all', layout='compressed')
for motif, ax in zip(motifs, axs):
    ax.plot(motif.representative)
plt.show()
```
apykuma 1.2.0
Small library to notify Uptime Kuma that the service is up
License: MIT
Requires Python: >=3.8.1,<4

# apykuma

[![Support Ukraine](https://badgen.net/badge/support/UKRAINE/?color=0057B8&labelColor=FFD700)](https://www.gov.uk/government/news/ukraine-what-you-can-do-to-help)

[![Build Status](https://github.com/PerchunPak/apykuma/actions/workflows/test.yml/badge.svg?branch=master)](https://github.com/PerchunPak/apykuma/actions?query=workflow%3Atest)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![Python support versions badge (from pypi)](https://img.shields.io/pypi/pyversions/apykuma)](https://www.python.org/downloads/)

Small library to notify Uptime Kuma that the service is up.
Only async applications are supported.

## Usage

Firstly, install the library:

```bash
pip install apykuma
```

Then include it in your code:

```python
import logging
import apykuma

await apykuma.start(
    # Required; Push URL from Kuma GUI
    url="https://my-service.com",
    # Optional; default is 60 seconds
    interval=60,
    # Optional; sleeps for N seconds before pinging Kuma, in case if you run `apykuma` right before starting your service
    #           (if service fails, `apykuma` won't start as well). The recommended value is 10 seconds
    delay=0,
    # Optional; function that is called when during ping we encourage an error
    #           it is done to notify you about (e.g.) network errors, and to not
    #           stop the process of pinging kuma on such errors
    #
    #           by default, it logs an error using `logging` library (default value is shown below),
    #           also supports async functions
    handle_exception=lambda e: logging.getLogger("apykuma").exception(e),
)
```

It is important to start `apykuma` after your service starts.

## Differences from `pykuma`

https://github.com/oliverstech/pykuma

That library is great, but it has some problems:

- It uses globals, which I personally don't like
- It blocks the loop every time it sends a request, because it uses `requests` library instead of `aiohttp`. See also https://github.com/oliverstech/pykuma/issues/2.

## Installing for local developing

```bash
git clone https://github.com/PerchunPak/apykuma.git
cd apykuma
```

### Installing `poetry`

Next we need install `poetry` with [recommended way](https://python-poetry.org/docs/master/#installation).

If you use Linux, use command:

```bash
curl -sSL https://install.python-poetry.org | python -
```

If you use Windows, open PowerShell with admin privileges and use:

```powershell
(Invoke-WebRequest -Uri https://install.python-poetry.org -UseBasicParsing).Content | python -
```

### Installing dependencies

```bash
poetry install --no-dev
```

### Configuration

All configuration happens in `config.yml`, or with enviroment variables.

### If something is not clear

You can always write me!

## Thanks

This project was generated with [python-template](https://github.com/PerchunPak/python-template).