semvec/pypi-packages huggingface dataset:
monai-nvflare 0.4.0
MONAI NVIDIA FLARE integration
Requires Python: <3.12,>=3.9

# MONAI Integration

## Objective
Integration with [MONAI](https://monai.io/)'s federated learning capabilities.

Add `ClientAlgoExecutor` class to allow using MONAI's `ClientAlgo` class in federated scenarios.

### Goals:

Allow the use of bundles from the MONAI [model zoo](https://github.com/Project-MONAI/model-zoo) or custom configurations with NVFlare.

## Background
MONAI allows the definition of AI models using the "[bundle](https://docs.monai.io/en/latest/bundle.html)" concept. 
It allows for easy experimentation and sharing of models that have been developed using MONAI.
Using the bundle configurations, we can use MONAI's `MonaiAlgo` (the implementation of `ClientAlgo`) to execute a bundle model in a federated scenario using NVFlare.

![Federated Learning Module in MONAI (https://docs.monai.io/en/stable/modules.html#federated-learning)](https://docs.monai.io/en/stable/_images/federated.svg)

## Description
NVFlare executes the `ClientAlgo` class using the `ClientAlgoExecutor` class provided with this package.

### Examples

For an example of using [NVIDIA FLARE](https://nvflare.readthedocs.io/en/main/index.html) to train
a medical image analysis model using federated averaging ([FedAvg](https://arxiv.org/abs/1602.05629))
and [MONAI Bundle](https://docs.monai.io/en/latest/mb_specification.html),
see the [examples](./examples/README.md).

## Requirements

We recommend following the instructions for setting up a [virtual environment](../../examples/README.md#set-up-a-virtual-environment),
and using it in [JupyterLab](../../examples/README.md#set-up-jupyterlab-for-notebooks) for running the notebooks the MONAI integration examples.

Install MONAI-NVFlare integration from [PyPI](https://pypi.org/):
```
pip install monai_nvflare
```

(Optional) Install MONAI-NVFlare integration from source:
```
pip install -e .
```
pdf-to-book 0.0.3
Lightweight Python package for converting a pdf into a print-ready book format.
Requires Python: >=3.8

## pdf-to-book

Lightweight Python package for converting a pdf into a print-ready book format. Takes in portrait orientation pdf file pages and puts two pages onto each side of paper. Handles imposition for easy ordering of pages after folding/cutting (2-up, duplex ready layout)

### Features

- Supports letter and A4 print paper sizes
- Adjustable gutter and margin to account for space taken up by binding
- Adjustable zoom level
- Optional line between pages indicating where to fold/cut

Install dependencies:

```bash
pip install PyMuPDF
```

Install pdf-to-book:

```bash
pip install pdf-to-book
```

### Quickstart

If your python Scripts folder is included in PATH, you can directly call pdf-to-book as:

```bash
pdf-to-book input.pdf output.pdf
```

Alternatively you can call it via python:

```bash
python -m pdf_to_book input.pdf output.pdf
```

General usage

```python
usage: pdf-to-book [-h] [--paper PAPER] [--gutter-mm GUTTER_MM] [--margin-mm MARGIN_MM] [--zoom ZOOM] [--line] input output

positional arguments:
  input                 input PDF
  output                output PDF (2-up, duplex-ready)

options:
  -h, --help            show this help message and exit
  --paper PAPER         paper size: 'auto' (default), 'letter', or 'a4'
  --gutter-mm GUTTER_MM
                        inner gutter in mm (default 6 mm)
  --margin-mm MARGIN_MM
                        outer/top/bottom margin in mm (default 4 mm)
  --zoom ZOOM           page zoom factor (e.g. 1.2 = 120%). Default 1.0
  --line                draw vertical fold/cut guide line at center
```

### Example

See the example folder for a conversion of the first four pages of Fyodor Dostoevsky's "Notes from the Underground"

Here are screenshots resulting from the following command:

```bash
pdf-to-book --zoom 1.25 --line input.pdf output.pdf
```

![input.pdf](example/input.png "input.pdf")

![output.pdf](example/output.png "output.pdf")
matrixmethod 0.1.3
Calculating Refelctivity
Requires Python: >=3.12

Matrix method algorithm to calculate X-ray reflectivity and transmittivity and electric fields for a stack of
homogeneous layers.


The functions in this module are:

* `reflec_and_trans`: Calculate overall reflection and transmission amplitudes.
* `reflec_and_trans_parallel`: As reflec_and_trans, but parallelized.
* `fields`: Calculate the transmission and reflection amplitudes for each layer in the stack.
* `fields_parallel`: As fields, but parallelized.
* `fields_at_positions`: Calculate the transmission and reflection amplitudes at specific positions in the stack.
* `fields_at_positions_parallel`: As fields_at_positions, but parallelized.
graphs-colinr135 0.0.2
A package for the Dijkstra algorithm
Requires Python: >=3.7

URL for your GitHub repository: https://github.com/ColinR135/graph_colinr135.git

This package contains the Dijkstra shortest path algorithm.
    The algorithm can be used with the function
    dijkstra(graph, source) # this returns the total distance and path taken

There is also another heap project added to support the use of the algorithm 
    heap = []            # creates an empty heap
    heappush(heap, item) # pushes a new item on the heap
    item = heappop(heap) # pops the smallest item from the heap
    item = heap[0]       # smallest item on the heap without popping it
    heapify(x)           # transforms list into a heap, in-place, in linear time
    item = heappushpop(heap, item) # pushes a new item and then returns
                                # the smallest item; the heap size is unchanged
    item = heapreplace(heap, item) # pops and returns smallest item, and adds
                                # new item; the heap size is unchanged
azappinsights-logger 0.0.8
A simple logging utility for sending logs to azure application insights using AzureLogHandler
Requires Python: >=3.7

# Azure App Insights Logger

A simple logging utility for python application that provides consistent logging setup across different modules using AzureLogHandler. Log will also be streamted to the console.

## Installation

```bash
pip install azappinsights-logger --upgrade (prod)
pip install --index-url https://test.pypi.org/simple/  azappinsights-logger --upgrade (non prod)
```
The `--upgrade` is only required if you are installing an upgraded version of the package

Depdencies `opentelemetry-sdk`, `azure-monitor-opentelemetry` and `python-dotenv` should be installed with the package.
## Usage

Create an environment variable with the name `APPLICATIONINSIGHTS_CONNECTION_STRING` and pass the value for app insights connections string.

```python
from azappinsights_logger.logger import setup_logger

# Create a logger with default settings
logger = setup_logger("my.module")

# Create a logger with custom level
logger = setup_logger("my.module", level=logging.DEBUG)

# Use the logger
logger.info("This is an info message")
logger.debug("This is a debug message")
logger.error("This is an error message")
```

## Features

- Consistent logging format across all modules
- Simple setup with sensible defaults
- Customizable log levels and formats
- Thread-safe logging configuration

## License

This project is licensed under the MIT License
rlviser-py 0.6.13
Python implementation that manages a UDP connection to RLViser
Requires Python: >=3.7

## rlviser-py

Python implementation that manages a UDP connection to RLViser, it launches the [RLViser binary](https://github.com/VirxEC/rlviser) from the current working directory upon first calling any render function.

The backbone of RLGym's `env.render()` functionality.

### Example usage

```python
import time

import rlviser_py as vis
import RocketSim as rs

game_mode = rs.GameMode.SOCCAR

# Create example arena
arena = rs.Arena(game_mode)

# Set boost pad locations
vis.set_boost_pad_locations([pad.get_pos().as_tuple() for pad in arena.get_boost_pads()])

# Setup example arena
car = arena.add_car(rs.Team.BLUE)
car.set_state(rs.CarState(pos=rs.Vec(z=17), vel=rs.Vec(x=50), boost=100))
arena.ball.set_state(rs.BallState(pos=rs.Vec(y=400, z=100), ang_vel=rs.Vec(x=5)))
car.set_controls(rs.CarControls(throttle=1, steer=1, boost=True))

# Run for 3 seconds
TIME = 3

steps = 0
start_time = time.time()
for i in range(round(TIME * arena.tick_rate)):
    arena.step(1)

    # Render the current game state
    pad_states = [pad.get_state().is_active for pad in arena.get_boost_pads()]
    ball = arena.ball.get_state()
    car_data = [
        (car.id, car.team, car.get_config(), car.get_state())
        for car in arena.get_cars()
    ]

    vis.render(steps, arena.tick_rate, game_mode, pad_states, ball, car_data)

    # sleep to simulate running real time (it will run a LOT after otherwise)
    time.sleep(max(0, start_time + steps / arena.tick_rate - time.time()))
    steps += 1

# Tell RLViser to exit
print("Exiting...")
vis.quit()
```