semvec/pypi-packages huggingface dataset:
juice-segmentation 0.6.10
Python package for merging/cutting segments according given rules
Keywords: esa, science, planetary, space, planning, merging, cutting, rules

# juice_segmentation Package

## 1. Getting Started

This Python package provide libs and tools to pre-process (merging/cutting according given rules) wg segment needed for the science planning

The input providing a segmentation proposal with some overlaps between science and operational segments being removed, 
prior to the start of the harmonisation with the WGs.

The tool will allow to produce automatically a set of non-overlapping segments from a set of opportunity segments
by applying a set of simple rules of for merging/cutting segments.

The output will be imported/loaded in Timeline Tool


```
.
├── README.md
├── CHANGELOG.md
├── TDS
├── juice_segmentation
├── packages_distribution
├── quick_install_from_git_clone.sh
├── scripts
├── setup.py
├── test
└── test_files

```
where
- juice_segmentation: Python package for merging/cutting segments according given rules;
- script: sample script to run juice_segmentation;
- test_file/config: configuration file (json) samples
- test: unit tests and module tests.
- TDS: test dataset 

### 1.1 Installation

#### 1.1.1 Prerequisites
 
If needed, install Python 3.7+
(For window and MAC OS, the best is to install anaconda ("https://www.anaconda.com/distribution/"))


#### 1.1.2 Setup

##### 1.1.2.1 Package installation 

From command line install the following packages using pip:

    pip install esac_juice_pyutils

    pip install juice_segmentation
progress-basic 0.5
A Python library for displaying progress indicators and progress bars in the console with customizable messages and colors.
Requires Python: >=3.6

# Progress Indicator Library

A Python library providing two classes for displaying progress indicators in the console: `ProgressIndicator` and `ProgressBar`. These classes help visualize ongoing tasks by displaying an animated spinner or a progress bar, respectively.

[![Publish](https://github.com/leonardogonzalolaura/workspace_progress_basic/actions/workflows/publish.yml/badge.svg)](https://github.com/leonardogonzalolaura/workspace_progress_basic/actions/workflows/publish.yml)
![PyPI version](https://img.shields.io/pypi/v/progress_basic.svg)

![Python Versions](https://img.shields.io/pypi/pyversions/progress_basic.svg)


## Installation

To install the library, you can use pip:

```bash
pip install progress_basic
```

# Usage
## ProgressIndicator
The ProgressIndicator class displays an animated spinner with a customizable message and color.

Example

```python
from progress_basic.format.color_text import AnsiColors
from progress_basic.progress_basic import ProgressIndicator

with ProgressIndicator("Processing", color=AnsiColors.OKBLUE) as pi:
    # Simulate a long-running task
    time.sleep(5)
```

## ProgressBar
The ProgressBar class displays a progress bar that updates as tasks progress, with customizable total steps, message, interval, bar length, and color.

Example
```python
from progress_basic.format.color_text import AnsiColors
from progress_basic.progress_bar import ProgressBar

total_steps = 100

with ProgressBar(total_steps, message="Loading", color=AnsiColors.OKBLUE) as pb:
    for i in range(total_steps):
        pb.update(i + 1)
        time.sleep(0.1)  # Simulate work
```


# Classes
### `ProgressIndicator`
A class for displaying an animated spinner with a customizable message and color.

### `ProgressBar`
A class for displaying a progress bar that updates as tasks progress, with customizable total steps, message, interval, bar length, and color.
miade 1.0.7
A set of tools for extracting formattable data from clinical notes stored in electronic health record systems.
Requires Python: >=3.8
Keywords: nlp, natural-language-processing, ml, ehr, electronic-health-records, ai, health, healthcare

# <img src="https://uclh-criu.github.io/miade/assets/miade-logo.png" width="40%">

[![Build Status](https://github.com/uclh-criu/miade/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/uclh-criu/miade/actions/workflows/ci.yml?query=Tests)
![License: Elastic License 2.0](https://img.shields.io/badge/License-Elastic%202.0-blue.svg)

A set of tools for extracting formattable data from clinical notes stored in electronic health record systems. Powered by [MedCAT](https://github.com/CogStack/MedCAT) models.


## Installing

### Install MiADE

To install the stable release:
```bash
pip install miade
```

To install the latest development version of MiADE, clone this repository and run:
```bash
pip install .
```

### Downloading models
You may also need to download these additional models to run MiADE:

[spaCy](https://spacy.io/models/en) - required for MedCAT
```bash
python -m spacy download en_core_web_md
```
[med7](https://huggingface.co/kormilitzin/en_core_med7_lg) - required for medication dosage extraction
```bash
pip install https://huggingface.co/kormilitzin/en_core_med7_lg/resolve/main/en_core_med7_lg-any-py3-none-any.whl
```

## Quickstart

Initialise MiADE with the path that you have saved your trained MedCAT models:

```python
miade = NoteProcessor(Path("path/to/model/dir"))
```
Add annotators:

```python
miade.add_annotator("problems")
miade.add_annotator("meds/allergies")
```

Create a note:

```python
text = "Patient has penicillin allergy with rash"
note = Note(text)
```

Extract concepts:

```python
concepts = miade.process(note)

for concept in concepts:
    print(concept)
    
# {name: breaking out - eruption, id: 271807003, category: Category.REACTION, start: 204, end: 208, dosage: None, negex: False, meta: None} 
# {name: penicillin, id: 764146007, category: Category.ALLERGY, start: 191, end: 201, dosage: None, negex: False, meta: None} 
```

## Contributing
See [contributing](CONTRIBUTING.md)

### Maintainers

| Name            | Email                       |
|-----------------|-----------------------------|
| James Brandreth | j.brandreth@ucl.ac.uk       |
| Jennifer Jiang  | jennifer.jiang.13@ucl.ac.uk |


## Acknowledgement

This project wouldn't be possible without the work at [Cogstack](https://cogstack.org/), [spaCy](https://spacy.io/), and [med7](https://huggingface.co/kormilitzin/en_core_med7_lg)!


## Licence

This project is licensed under the Elastic License 2.0. See [LICENSE](https://github.com/uclh-criu/miade/blob/documentation/LICENCE.md) for the full license text.
windflow-leo 0.2.2
Optical Flow derived winds from overlapping LEO granules
Requires Python: >=3.8

# windflow_leo
A package for deriving atmospheric winds from overlapping granules of satellites in a LEO (low earth orbit)
train formation, using dense feature tracking of CrIS retrievals of specific humidity (JPSS) or AVHRR imagery (MetOp).

This package runs inference on a pre-trained model based on WindFlow: Dense feature tracking of atmospheric winds with deep optical flow:

Vandal, T., Duffy, K., McCarty, W., Sewnath, A., & Nemani, R. (2022). Dense feature tracking of atmospheric winds with deep optical flow, Proceedings of the 28th ACM SIGKDD Conference on Knowledge Discovery and Data Mining.
dockerizeasml 0.2.8
A tool to dockerize machine learning projects
Requires Python: >=3.6

# DockerizeAsML

DockerizeAsML is a Python library that allows users to effortlessly dockerize an entire machine learning (ML) project with a single command-line instruction. It automatically recognizes ML model files in the project directory, generates an appropriate Dockerfile, and provides flexibility in configuration.

## Installation

You can install DockerizeAsML using pip:
```
pip install dockerizeasml
```
## Features

- Automatic detection of common ML model file formats (pkl, h5, joblib, pt, pth, onnx, pickle)
- Generation of a Dockerfile tailored to your ML project
- Customizable entry point for your dockerized application
- Flexible port configuration
- Customizable Python version selection
- Support for additional Python package installations
- Easy-to-use command-line interface

## Usage

To dockerize your ML project, navigate to your project's root directory and run:
```
dockerizeasml /path/to/your/ml/project
```
### Advanced Usage

You can customize various aspects of the dockerization process:
```
dockerizeasml /path/to/your/ml/project --entry-point app.py --port 8080 --python-version 3.9 --extra-installs "nltk.downloader -d /usr/local/nltk_data wordnet omw" "pip install some-extra-package"
```

- `--entry-point`: Specify the main Python script (default is app.py)
- `--port`: Set the port to expose (default is 5000)
- `--python-version`: Choose the Python version for the base image (default is 3.9)
- `--extra-installs`: Add additional installation commands (default includes NLTK data download)

## How it works

1. DockerizeAsML scans your project directory for ML model files.
2. It analyzes Python scripts to detect potential model variable names.
3. It generates a Dockerfile that:
   - Uses a Python slim base image
   - Copies and installs the requirements from `requirements.txt`
   - Copies the identified model files
   - Sets environment variables for detected model variables
   - Copies the rest of the project files
   - Configures additional installations (e.g., NLTK data)
   - Exposes the specified port
   - Sets the default command to run your specified entry point

4. You can then use standard Docker commands to build and run your containerized ML project.

## Requirements

- Python 3.6+
- Docker (for building and running the generated Docker image)

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
accumulate 2.0.2
Inheritance for iterable attributes.
Requires Python: <4,>=3.12

accumulate
----------

[![PyPI version](https://badge.fury.io/py/accumulate.svg)](https://badge.fury.io/py/accumulate)

Inheritance for iterable attributes.

`accumulate` eases inheritance of iterable class attributes by accumulating values along the MRO, for example:

```python
from accumulate import accumulate

class Base:
    fields = ["id"]
    metadata = {"read_only_field": ("id",)}

class User(Base):
    fields = accumulate(["name", "password"])
    metadata = accumulate(
        {
            "filter_fields": ("name",),
            "hidden_fields": ("password",),
        }
    )

assert User.fields == ["id", "name", "password"]
assert User.metadata == {
    "filter_fields": ("name",),
    "hidden_fields": ("password",),
    "read_only_field": ("id",),
}
```

# Installation

Install using `pip install -U accumulate`.
preprocessmzML 0.1.0
A package for preprocessing mzML files for ZooMS analysis
Requires Python: >=3.6

# preprocessmzML

A simple python package for preprocessing mzML spectra using various filters and normalization techniques derived from the fantastic `pyopenms` package. This package supports baseline correction, smoothing, centroiding, and normalization of spectra from MALDI-TOF mass spectrometers.

## Features
- **Baseline Correction**: Remove baseline using MorphologicalFilter
- **Smoothing**: Smooth the spectrum using Savitzky-Golay filter
- **Centroiding**: Pick peaks with PeakPickerHiRes
- **Normalization**: Normalize spectra with different methods (TIC, To the most intense peak)

## Installation

### Prerequisites
- Python 3.6 or higher
- `pip` (Python package installer)

### macOS or Linux systems
1. Create and activate a virtual environment:

```bash
python3 -m venv preprocess_mzml
source venv/bin/activate
```

2. Install the package:

```bash
pip install preprocessmzML
``` 

### Windows
1. Create and activate a virtual environment:

```bash
python -m venv venv
venv\Scripts\activate
```
2. Install the package:

```bash
pip install preprocessmzML
```

To install the package, use the following command:

```bash
pip install preprocessmzML
```

## Usage

After installing the package, you can preprocess your mzML files from the command line (in a virtual environment as described above). I highly recommend running this workflow within a virtual environment to tackle version conflicts of modules used in this package.

### Command-Line Interface (CLI)
```bash
preprocess_mzml --data_dir /path/to/mzML/files --output_base_dir /path/to/output/directory
```

## Troubleshooting
If you encounter issues, please check the following:
- Ensure that the mzML files are correctly formatted and accessible.
- Verify that the output directory is writable.
- Check the parameter combinations for any invalid values.

## Contributing
Contributions are always welcome. Feel free to submit a pull request or open an issue on Github.

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

## Author
Bharath Nair
bharath@palaeome.org; bn317@cam.ac.uk

## Acknowledgements
- `pyopenms`
- `pandas`
- `numpy`
- `matplotlib`


This `README.md` includes:

- A brief introduction to the package and its features.
- Installation instructions.
- Usage examples.
- Detailed function documentation.
- Contribution guidelines.
- License information.
- Author information.
- Acknowledgements for dependencies.
SRT2LRC 1.0
Converts from SRT to LRC and vice versa.
Requires Python: >=3.6

This library is used to convert SRT files to LRC files and vice versa.

How to import:
from SRT2LRC import Converter

####
Available Functions:
`Converter.srt_to_lrc(srt_file_path, lrc_file_path)`

This function converts srt files to lrc.
input file/path is srt_file. output path/file is lrc_file.
SRT files use 3 digits for milliseconds while LRC files use 2 digits.
Therefore, all the timings will be the off by 0.001 to 0.005 seconds. 
(Normally it'd be 0.001 to 0.009, But there's a rounding function that helped with making it more accurate.)
This timing inaccurance should not be significant nor cause problems in captions/subtitles.


`Converter.lrc_to_srt(lrc_file_path, srt_file_path)`

This function converts lrc files to srt.
input file/path is lrc_file. output path/file is srt_file.
LRC files use 2 digits for milliseconds while SRT files use 3 digits. 
Therefore, all the timings will be the off by 0.001 to 0.009 seconds.
This timing inaccurance should not be significant nor cause problems in captions/subtitles.
Also, LRC files use minutes, seconds, and milliseconds only. Unlike SRT files that use hours, minutes, seconds, and milliseconds.
command-queue 0.2.0
A Command Queue for Python
Requires Python: >=3.11

# A Command Queue for Python

Run commands (which can be regular functions) in a FIFO queue. Can be run in a background thread.

## Usage examples

Simple filling and running of the queue

```python
from command_queue import CommandQueue
from command_queue.commands import FunctionCommand
import functools


example_queue = CommandQueue()

# Add example commands
for i in range(100):
    example_queue.add_command(
        FunctionCommand(functools.partial(print, f"Running loop iteration {i}"))
    )

# Attempt to run command queue at 60 commands per second
# Stop running once queue empties
example_queue.spin(60, until_empty=True)
```

Example of ParallelCommandGroups

```python
from command_queue import CommandQueue
from command_queue.commands import FunctionCommand, ParallelCommandGroup
import functools
import time


def do_something():
    print(f"Something happended on {time.time()}")
    time.sleep(0.05)


def do_something_2():
    print(f"Something_2 happended on {time.time()}")
    time.sleep(0.05)


example_queue = CommandQueue()

# Add example non-parallel commands
# These commands will run sequentially
for i in range(2):
    example_queue.add_command(FunctionCommand(functools.partial(do_something)))

# These commands will run at the same time using threads

# Add example parallel command
# These commands will run at the same time
example_queue.add_command(
    ParallelCommandGroup(
        FunctionCommand(functools.partial(do_something_2)),
        FunctionCommand(functools.partial(do_something_2)),
        FunctionCommand(functools.partial(do_something_2)),
        FunctionCommand(functools.partial(do_something_2)),
        FunctionCommand(functools.partial(do_something_2)),
        FunctionCommand(functools.partial(do_something_2)),
    )
)

# Attempt to run command queue at 10 commands per second
# Stop running once queue empties
example_queue.spin(10, until_empty=True)
```
dbus-networkdevices 2024.7.0
Connected network devices using DBus
Requires Python: >=3.7.0
Keywords: dbus, ip, network

# DBus Network Devices

[![PyPI](https://img.shields.io/pypi/v/dbus-networkdevices.svg)](https://pypi.python.org/pypi/dbus-networkdevices)
![Python versions](https://img.shields.io/pypi/pyversions/dbus-networkdevices.svg)
![License](https://img.shields.io/pypi/l/dbus-networkdevices.svg)

The `dbus-networkdevices` library empowers Python applications to get the active network devices that are connected to your network.

## Key Features

* **IP Access:** Retrieve interface name, ip addresses, wifi ssid, etc...
* **Real-time Updates:** Utilizes callback functions to provide instant updates of network changes.

## Requirements

* Python 3.7 or later
* `dasdbus` library

## Installation

Install the library using pip:

```bash
pip install dbus-networkdevices
```

## Usage

This library offers two primary usage approaches:

### Command-Line Interaction

If you prefer a quick way to view information or control playback, you can potentially execute the dbus-networkdevices script directly. For more extensive programmatic control, I would recommend using the library within your Python code.

### Programmatic Control

Import the DBUSNetworkDevices class from your Python code:

```python
import json
from dbus_networkdevices import DBUSNetworkDevices

def callback(devices):
    # Handle the list of network devices here
    print(json.dumps(devices, indent=2))

# Create an instance of the class
DBUSNetworkDevices(callback)

# Keep the app running
while True:
    time.sleep(1)
```

## Inspiration

Most python applications use `iwgetid` and information from `/proc/net/wireless` to get the WiFi status, so I created this library to get the information directly from DBus and also include other interfaces.
Sqlite3-EasyCtrl 0.0.1
一个可以更方便的操作SQLite数据的Python库
Requires Python: >=3.6

## PythonSqliteEasyCtrl

PythonSqliteEasyCtrl是一个将数据库操作语句封装成操作类的库，它可以使操作Sqlite3数据库更加方便。

PythonSqliteEasyCtrl还支持数据库信息加密功能

该库目前为[`ToolDelta`](https://github.com/ToolDelta/ToolDelta)服务
Python-Sqlite3-EasyCtrl 0.0.1
一个可以更方便的操作SQLite数据的Python库
Requires Python: >=3.6

## PythonSqliteEasyCtrl

PythonSqliteEasyCtrl是一个将数据库操作语句封装成操作类的库，它可以使操作Sqlite3数据库更加方便。

PythonSqliteEasyCtrl还支持数据库信息加密功能

该库目前为[`ToolDelta`](https://github.com/ToolDelta/ToolDelta)服务
MultimodalGraphRetrieval 0.0.1b0
Multimodal Graph retrieval


# Example Usage

```python
from multimodal_rag import MultimodalRAG

# Initialize MultimodalRAG instance
mm_rag = MultimodalRAG(pdf_directory="/path/to/pdf_directory", output_directory="/path/to/output_directory")

# Preprocess documents
mm_rag.preprocess(directory="/path/to/pdf_directory", use_multiprocessing=True)

# Perform a multimodal query
query = "example query text"
search_results, result_paths = mm_rag.multimodal_query(query, k=5)

# Display results
print("Search Results:", search_results)
print("Result Paths:", result_paths)
```
# Multimodal Retrieval (with captioning and image and graph linkage)

```python
from multimodal_rag import MultimodalRetrieval
from langchain_core.documents.base import Document

# Prepare text documents
text_documents = [
    Document(page_content="That car was on fire.", metadata={"source": "doc1.pdf", "page": 1}),
    Document(page_content="That vehicle is called lava", metadata={"source": "doc2.pdf", "page": 1})
]

# Prepare image paths
image_paths = [
    "/content/car.jpg",
    "/content/fire.jpg",
]

# Initialize and preprocess
rag = MultimodalRetrieval()
rag.preprocess(text_documents, image_paths, similarity_threshold=0.2)

# Perform a query
query = "that car is fire"
results = rag.query(query, k=3, use_multi_hop=True)

results = rag.query_balanced(query, k_text=3, k_image=3, use_multi_hop=True)

# Print the results
print("Text Results:")
for doc, score in results["text_results"]:
    print(f"Content: {doc.page_content}")
    print(f"Metadata: {doc.metadata}")
    print(f"Score: {score}")
    print()

print("Image Results:")
for metadata, score in results["image_results"]:
    print(f"Image Path: {metadata['path']}")
    print(f"Caption: {metadata['caption']}")
    print(f"Score: {score}")
    print()
```