semvec/pypi-packages huggingface dataset:
syncprio 0.1.1
Monothread Priority Kernel for Monitored Concurrency (SyncPrio).
Requires Python: >=3.8
Keywords: monothread, kernel, scheduling, priority, task-execution, windows-compat

# 🚀 SyncPrio: Priority-Based Synchronous Execution Kernel

SyncPrio is an infrastructure library designed for **single-threaded execution**, but with a strict **priority** and *scheduling* system.

It arose from the need to manage concurrency in environments where native Python threads are unstable or incompatible (such as in certain Windows configurations or Python 3.8), offering deterministic and ordered execution control.

### 🌟 Main Features

* **Synchronous Execution:** Ensures that tasks are executed sequentially, eliminating the *race conditions* of multithreading.

* **Weighted Priority:** Tasks are ranked by a **Global Tier** (SYSTEM, ENGINE, RUNNER, LPT) and a **Local Tier**, ensuring that critical tasks are always executed first.

* **Optional Integration (`routless`):** Support for "Darkness Mode," which allows tasks to be loaded using logical names (tokens) without exposing their physical path.

### 📦 Installation

```bash
pip install syncprio
ShellUtilities 2.1.15
A library for executing shell commands in either a blocking or non-blocking way.

# Overview
This library provides a utility to make executing shell commands much simpler than would be posisble using standard modules. It is built on top of the `subprocess` module and uses it's `subprocess.Popen()` function to execute a shell commands. The library allows shell commands to be executed synchronously (blocking) or asynchronously (non-blocking). It also has utility functions to collect information about the execution such as the ExitCode, the Stdout, and the Stderr.

# How It Works

The `Shell` module provides the `execute_shell_command()` function as the main entry point. This fucntion accepts a number of parameters and allows the user to:
- specify environment variables
- specify the working directory
- specify the shell being used
- specify the number of retries to attempt in the event of a failure
- specify the delay between reties
- specify whether the execution should be blocking or non blocking

In the event of a success (zero exit code) the function will return a [ShellCommandResults object](src/ShellUtilities/ShellCommandResults.py). This object contains pointers to the command, the exit code, the Stdout, and the stderr.

**Note**: The Stdout and Stderr are strings which are decoded from the original byte stream. They will contain all the newlines that were written out to the shell.

In the event of a failure, the function will raise a [ShellCommandException](src/ShellUtilities/ShellCommandException.py) which extends the Exception base class. Like the ShellCommandResults object, this exception contains pointers to the command, the exit code, the Stdout, and the stderr.

# Getting Started

Here is an example of the simple use case for this utility:

```
from ShellUtilities import Shell

shell_command_results = Shell.execute_shell_command("echo $MYVAR", env={"MYVAR": "Hello, World!"})
shell_command_results.ExitCode == 0
print(shell_command_results.StdOut) # Hello, World!
print(shell_command_results.Stderr)
```

And here is a more complex example of this utility running a long command asynchronously while piping the output to stdout in real time:

```
from ShellUtilities import Shell

# Define an async function to use when we execute the shell command
def stdout_func(stdout_line):
    print(stdout_line)
    
# Run the command and also output while the command is running
shell_command_string = r"echo 'a'; sleep 2; echo 'b'; sleep 2; echo 'c'; sleep 2; echo 'd';"
shell_command_results = Shell.execute_shell_command(shell_command_string, blocking=False, async_buffer_funcs={"stdout": [stdout_func]})
time.sleep(1)
print("hello")
shell_command_results.wait()

# The output of this main thread will be:
# a
# hello
# b
# c
# d
```

# Change Log

### 2.1.15
- Fixing bug to allow parallel execution of multiple shell commands via multiprocessing.pool.ThreadPool.
- Adding Changelog to README.md.
ramanlib 0.0.2
A python package for grouped spectral visualisation and analysis. Implements many capabilities outlined in the Raman SOP by Guo et al: Guo, S., Popp, J. & Bocklitz, T. Chemometric analysis in Raman spectroscopy from experimental design to machine learning–based modeling. Nat Protoc 16, 5426–5459 (2021). https://doi.org/10.1038/s41596-021-00620-3
Requires Python: >=3.9

# RamanSPy README

A python package for grouped spectral visualisation and analysis. Implements many capabilities commonly needed for preprocessing, quality control and visualisation of Raman spectral data.

Find documentation for the package here: https://ramanlib.readthedocs.io/en/latest/index.html

Inspired by the Raman SOP by Guo et al: Guo, S., Popp, J. & Bocklitz, T. Chemometric analysis in Raman spectroscopy from experimental design to machine learning–based modeling. Nat Protoc 16, 5426–5459 (2021). https://doi.org/10.1038/s41596-021-00620-3