semvec/pypi-packages huggingface dataset:
CoordinationMetricsToolbox 0.1.3
A toolbox for measuring and analyzing coordination metrics.
Requires Python: >=3.6

# Coordination Metrics Toolbox

The Coordination Metrics Toolbox is a comprehensive suite of tools designed to measure and analyze coordination metrics in various projects.

## Installation
Download this repository
At the root of this repository, run 
    `pip install .`


Or 
    `pip install CoordinationMetricsToolbox`


# Informations

This work comes from the article : Dubois, O., Roby-Brami, A., Parry, R. et al. A guide to inter-joint coordination characterization for discrete movements: a comparative study. J NeuroEngineering Rehabil 20, 132 (2023). https://doi.org/10.1186/s12984-023-01252-2

Not all metrics have been implemented since some of them needs additional informations suche as joints position over time. 

2 more metrics have been added : Joints contribution variation based on Principal Component Analysis (JcvPCA) and Joint Synchronization Variation based on Continuous Relative Phase (JsvCRP). These metrics are under publication for PLOS-One

# Tutorial
An exemple with simulated data is available in test_coord_metric.py. 

Csv files containing a time column and joint angles trajectories can also be loaded to build a CoodinationMetric object form which different metrics can be computed. 


The format expected for the data is the following one : 
| time | joint_i | joint_j | joint_k | _ee_x_ | _ee_y_ | _ee_z_ |
|------|---------|---------|---------|--------|--------|--------|
|      |         |         |         |        |        |        |
|      |         |         |         |        |        |        |
|      |         |         |         |        |        |        |

Columns in italic (ee_x, ee_y, ee_z) which are the position of the end-effector are optional. However, without thoses columns, the number of metrics that can be computed is limited.

The file generate_testing_dataset.py can also be used to generate different datasets based on sinusoids. You can personalize this file to generate your own datasets. 

The full documentation of the toolbox can be found [here](https://oceanedbs.github.io/CoordinationMetricsToolbox/index.html)


# Generate local documentation 

Go to the doc file and execute __make html__ to generate documentation locally
pyrify 0.4.0
A CLI tool for database sanitization

# Pyrify

A CLI tool for database sanitization

## Installation

```bash
pip install pyrify
```

## Initialize the sanitize config

### Initialize from database
By providing the database URI, the tool will automatically generate a sanitize config file.
Currently, the tool supports PostgreSQL, MySQL (with `pymysql`), and SQLite.


```sh
# PostgreSQL
pyrify init -d "postgresql://user:pass@localhost/db_name" > config.yml

# MySQL
pyrify init -d "mysql+pymysql://user:pass@localhost/db_name" > config.yml

# SQLite
pyrify init -d "sqlite:///db-sanitize.db" > config.yml
```

### Use sanitize config template

You can use a template to generate the sanitize config file.

```sh
pyrify template -t ckan_211 > config.yml
```

To see the available templates, run:

```sh
pyrify template
```

## Configure the sanitize config

The `init` command will create a config file with the following structure:

```yaml
table_name:
  columns:
    column_name1: '~'
    column_name2: '~'
    column_name3: '~'
```

If you don't need to sanitize a table or a column, you can remove it from the config file.

There are 3 key options:

- `clean`: This will clean the table (remove all data).
- `drop`: This will drop the table.
- `columns`: This will apply a specific sanitization strategy to the column.

Example:

```yaml
activity:
  clean: true

unused_table:
  drop: true

user:
  columns:
    plugin_extras:
      strategy: json_update
      kwargs:
        columns:
          test: fake_password
    last_active: nullify
    fullname: fake_fullname
    image_url: nullify
    email: fake_email
    name: fake_username
    password: fake_password
    about: fake_text

```

### Strategies

The following strategies are available:

- `fake_username`: This will generate a fake username.
- `fake_fullname`: This will generate a fake full name.
- `fake_text`: This will generate a fake text.
- `fake_email`: This will generate a fake email.
- `fake_password`: This will generate a fake password.
- `fake_phone_number`: This will generate a fake phone number.
- `fake_address`: This will generate a fake address.
- `nullify`: This will set the column to `NULL`.
- `json_update`: This will update the JSON key with the new value.

## Sanitize the database

Below are some examples of how to sanitize the database.

The `-d` option is the database URI and the `-c` option is the path to the sanitize config file.

```sh
pyrify sanitize -d "postgresql://root:root@localhost/db_name" -c config.yml
pyrify sanitize -d "mysql+pymysql://root:root@127.0.0.1:3306/db_name" -c config.yml
```