semvec/pypi-packages huggingface dataset:
kubios 0.1
Python package to support KUBIOS file management.

# KUBIOS Import & Export for Python

This Python package enables easy exportation of NN/RR interval series or signals to KUBIOS HRV friendly files and structured formats and to import HRV analysis results from KUBIOS HRV report files in .txt format.

The exported signals are stored in the Type 1 format as presented on page 14 and 15 of the [KUBIOS User Guide](https://www.kubios.com/downloads/Kubios_HRV_Users_Guide.pdf).

## How to Use this Package

#### export_nni()
Use the `export_nni()` function to export a series of NN/RR interval or ECG signal data to a KUBIOS readable file format.

```python
import numpy as np
from kubios import export_nni

# Load NNI series
nni = np.load('SampleSeries.npy')

# Export NNI series
export_nni(nni)
```

Use the `output_path` variable to specify the file path where to store the exported file and `output_file` to specify the file name. Use only the `output_file` if you want to set the absolute file path in a single string. If no value for the `output_file` is provided, a file name (incl. time stamp) will automatically be generated.

```python
import numpy as np
from kubios import export_nni

# Load NNI series
nni = np.load('SampleSeries.npy')

# Export NNI series with specific file name
export_nni(nni, output_file='export.txt)

# Export NNI series to specific path & specific file name
export_nni(nni, output_path='/my/favorite/path/', output_file='export.txt')

# Export NNI series to specific path with automatic file name generation
export_nni(nni, output_path='/my/favorite/path/')
```

#### import_report()
Use the ```import_report()``` function to read a KUBIOS HRV report files in .txt format. The results will be returned in a Python dictionary.

```python
from kubios import import_report

# Import HRV results from KUBIOS report
results = import_report('SampleReport.txt')

# Get SDNN value
results['sdnn']
```

## Context of this Work
This package is under development within the scope of my master thesis _"Development of an Open-Source Python Toolbox for Heart Rate Variability (HRV)"_ at the [University of Applied Sciences Hamburg, Germany (Faculty Life Sciences, Department of Biomedical Engineering)](https://www.haw-hamburg.de/fakultaeten-und-departments/ls/studium-und-lehre/master-studiengaenge/mbme.html) and [PLUX wireless biosignals, S.A.](http://www.plux.info), Lisbon, Portugal.

## Disclaimer
This package is not part of the official KUBIOS software.

This program is distributed in the hope it will be useful and provided to you "as is", but WITHOUT ANY WARRANTY, without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. This program is NOT intended for medical diagnosis. We expressly disclaim any liability whatsoever for any direct, indirect, consequential, incidental or special damages, including, without limitation, lost revenues, lost profits, losses resulting from business interruption or loss of data, regardless of the form of action or legal theory under which the liability may be asserted, even if advised of the possibility of such damages.
jdb 0.2.1
Simple json based database

# JDB

A Simple json based database with context manager support.

## But why ?
While writing my userbot I didnt want to setup a full DB server so I decided to just write my own module.

## Where are the docs ?
They are still a Todo but here's a small example:
```
import jdb
with jdb.Database('test') as db:
    db.set('example', 'value')
    print(db['example'])

````

## Installation
`pip install jdb`
jmxquery-jcruz 0.5.3
A JMX Interface for Python to Query runtime metrics in a JVM
Keywords: java,jmx,metrics,monitoring

# JMXQuery Python Module

Provides a Python module to easily run queries and collect metrics from a Java Virtual Machine via JMX.

In order to use this module, provide a list of queries, and the module will return all of the values it 
finds matching the query. Please note that the interfact to the JMX uses a small jar file contained in 
this module, so you will need to have java installed on the machine you're running this module on.

## Usage

This example query for a Kafka server will get all cluster partition metrics:

```
jmxConnection = JMXConnection("service:jmx:rmi:///jndi/rmi://localhost:9999/jmxrmi")
jmxQuery = [JMXQuery("kafka.cluster:type=*,name=*,topic=*,partition=*",
                         metric_name="kafka_cluster_{type}_{name}",
                         metric_labels={"topic" : "{topic}", "partition" : "{partition}"})]
metrics = jmxConnection.query(jmxQuery)
for metric in metrics:
    print(f"{metric.metric_name}<{metric.metric_labels}> == {metric.value}")
```

This will return the following:

```
kafka_cluster_Partition_UnderReplicated<{'partition': '0', 'topic': 'test'}> == 0
kafka_cluster_Partition_UnderMinIsr<{'partition': '0', 'topic': 'test'}> == 0
kafka_cluster_Partition_InSyncReplicasCount<{'partition': '0', 'topic': 'test'}> == 1
kafka_cluster_Partition_ReplicasCount<{'partition': '0', 'topic': 'test'}> == 1
kafka_cluster_Partition_LastStableOffsetLag<{'partition': '0', 'topic': 'test'}> == 0
```

As you will notice you can optionally send a metric_name and metric_labels with {} tokens in them. These
tokens are replaced at runtime by the jar so you can easily build metric names with associated labels using
the MBean properties of the values your query pulls back. 

You can also use the module to pull back a list of all the MBean values available in the JVM too:

```
jmxConnection = JMXConnection("service:jmx:rmi:///jndi/rmi://localhost:9999/jmxrmi")
jmxQuery = [JMXQuery("*:*")]
metrics = jmxConnection.query(jmxQuery)
for metric in metrics:
    print(f"{metric.to_query_string()} ({metric.value_type}) = {metric.value}")
```

## Installation

Just use pip to install the module in your Python environment:

```
pip install jmxquery
```