semvec/pypi-packages huggingface dataset:
py-m3u8-to-mp4 1.1
Python package to convert m3u8 playlists to mp4 videos using FFMPEG
License: MIT
Keywords: m3u8, mp4, python, m3u8 to mp4, convert m3u8, playlist

# M3U8-to-MP4
Python package to convert m3u8 playlists to mp4 videos using FFMPEG

## Install
Install using `pip install py-m3u8-to-mp4`

It also requires the user to have FFMPEG in their PATH, Download it [here](https://ffmpeg.org/download.html)

## Usage
Create an object using **`file = M3U8_Playlist('path_to_file.m3u8')`**\
For the path you can input a path to a local m3u8 file or a remote web link to it by using the prefix  "*URL:*"

Afterward, to convert the playlist to mp4, you can call **`file.to_mp4('output.mp4')`**.

*NOTE*: Using a weblink will automatically download the m3u8 file temporarily; the file will then get deleted when the mp4 is compiled.

Example:
```
m3u8 = M3U8_Playlist('playlist-1.m3u8')
m3u8.to_mp4('test-1.mp4')
```
### Special Case:
Segments without full links
```
m3u8 = M3U8_Playlist('URL:https://vz-cea98c59-23c.b-cdn.net/c309129c-27b6-4e43-8254-62a15c77c5ee/842x480/video.m3u8')
m3u8.append_to_segments('https://vz-cea98c59-23c.b-cdn.net/c309129c-27b6-4e43-8254-62a15c77c5ee/842x480/')
m3u8.to_mp4('test-2.mp4')
```
In this case, the link used as path will link to a m3u8 that has segments without full links:
```
#EXTINF:4.000000,
video0.ts
#EXTINF:4.000000,
video1.ts
#EXTINF:4.000000,
video2.ts
```
To get the .ts files of those segments and compile them together to a mp4, we need to get the full link\
You can use **append_to_segments()** to append a starting URL to each; which will result in this:
```
#EXTINF:4.000000,
https://vz-cea98c59-23c.b-cdn.net/c309129c-27b6-4e43-8254-62a15c77c5ee/842x480/video0.ts
#EXTINF:4.000000,
https://vz-cea98c59-23c.b-cdn.net/c309129c-27b6-4e43-8254-62a15c77c5ee/842x480/video1.ts
#EXTINF:4.000000,
https://vz-cea98c59-23c.b-cdn.net/c309129c-27b6-4e43-8254-62a15c77c5ee/842x480/video2.ts
```
Now we can call **to_mp4()** to compile it into a full mp4 video

## Details
`to_mp4(destination, delete_after, frame_rate, whitelist, run_async)`\
Convert the playlist to a mp4 video
- *destination* - path to the output mp4 file
- *delete_after* - will delete the m3u8 file after conversion, default for links ( URL: ) supplied as path is true
- *frame_rate* - frame/seconds of the resulting video
- *whitelist* - string of protocols allowed
- *run_async* - run conversion asynchronously

`append_to_segments(append_str)`\
Some m3u8 file may not have full URLs for each segments, use this to append a starting URL to the start of each segment in the m3u8 playlist.
This function will check if each segment starts with a valid http link. If it does, it will not append!
- *append_str* - prefix that is appended to each segment

`setHeaders(headers)`\
Set the header that will be used when making a GET request in the case of using a weblink for the m3u8 file and not local
- *headers* - header used for get request
adamz 0.1.0
An enhanced Adam optimizer with overshoot and stagnation handling.
License: MIT
Requires Python: >=3.9
Keywords: adam, deep learning, machine learning, optimizer

# AdamZ 
A PyTorch implementation of AdamZ, an enhanced variant of the widely-used Adam optimizer, that is designed to improve upon its predecessor by offering more efficient convergence and potentially better generalization capabilities across various neural network training tasks.

#### Prerequisites

- Python 3.9 or later
- PyTorch 2.5.1

### Usage
Instantiate the AdamZ optimizer similarly to other standard optimizers, ensuring you configure the hyperparameters to suit your specific task. Note that the performance of AdamZ is highly sensitive to these parameters, and default settings may not be optimal for all applications.

```python
from adamz import AdamZ
import torch

model = torch.nn.Linear(10, 1)
optimizer = AdamZ(
    model.parameters(),
    lr=learning_rate,
    overshoot_factor=0.5,
    stagnation_factor=1.2,
    stagnation_threshold=0.2,
    patience=100,
    stagnation_period=10
)
# Training loop
for input, target in dataset:
    optimizer.zero_grad()
    loss = loss_fn(model(input), target)
    loss.backward()
    optimizer.step()
```

## Citation
If you find this code helpful, please cite our paper in the following format.

```bibtex
@misc{zaznov2024adamzenhancedoptimisationmethod,
      title={AdamZ: An Enhanced Optimisation Method for Neural Network Training}, 
      author={Ilia Zaznov and Atta Badii and Alfonso Dufour and Julian Kunkel},
      year={2024},
      eprint={2411.15375},
      archivePrefix={arXiv},
      primaryClass={cs.LG},
      url={https://arxiv.org/abs/2411.15375}, 
}
```

## Contributions

Contributions are welcome! Please feel free to submit a pull request or open an issue for suggestions and improvements.

## License

This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.

## Contact

For any questions, please contact i.zaznov@pgr.reading.ac.uk or open an issue on GitHub.
cheshire-no-bleak-limit 0.5.7
API for Keepsmile, LuckyStyle, Leeleberd, and related smart lights
License: MIT
Requires Python: <3.13,>=3.10

![Cheshire Cat](https://raw.githubusercontent.com/themooer1/cheshire/master/docs/assets/img/cheshire.png)
# Cheshire

API for Keepsmile and related Bluetooth LE lights.


## Usage

The example below scans for Bluetooth LE devices and tries to control any 
which are supported.

For more detailed instructions, see the [user guide](https://github.com/themooer1/cheshire/blob/master/docs/user_guide.md).

```python
import asyncio
from bleak import BleakScanner, BleakClient
from cheshire.compiler.state import LightState
from cheshire.generic.command import *
from cheshire.hal.devices import Connection, connect_to_ble_device

async def main():
    # Discover Bluetooth LE devices
    discover = await BleakScanner.discover()
    connections: list[Connection] = []

    # Connect to supported devices
    for bleak_device in discover:
        if bleak_device.name == None:
            continue

        # Connect to this device if it's one we support
        if connection := await connect_to_ble_device(bleak_device):
            print(f"Connected to {bleak_device.name}")

            connections.append(connection)

    async def send_all(state: LightState):
        # Push light state to connected devices
        for c in connections:
            await c.apply(state)
            

    # Update desired light state
    state = LightState()
    state.update(SwitchCommand(on=True))
    state.update(BrightnessCommand(0x30))
    state.update(RGBCommand(0x0e, 0x0, 0xaa))
    # state.update(EffectCommand(Effect.JUMP_7))

    await send_all(state)


asyncio.run(main())
```

## Supported Devices
| Device | Bluetooth Name | Support |
|-|-|-|
| Keepsmile Led Strip Lights | KS03-XXXX | Yes |
| Keepsmile Led Strip Lights (New) | KS03~XXXX | Yes |
| Keepsmile Double Side Lighting Led Floor Lamp | ? | Unknown |
| luckystyle Floor Lamp | KS01-XXXX | Untested |
chiral-client 0.3.2
Python Client for Chiral Computing Cloud
License: MIT

# chiral-client-python: Python client for Chiral Computing Cloud API

## Versions
- 0.3.2 
    - (client version 0.3.1): new scripts example of gromacs
    - bug fix, windows directory seperators for upload_files & download_files
- 0.3.1: bug fix, ftp connection long idle
- 0.3.0: for chiral service V2
- 0.2.1: ReCGen for virtual molecular library; Large language model LLama2 from Meta;
- 0.1.0: gromacs

## Requirements for Running Examples
- python >= 3.12
- numpy, matplotlib, grpcio, jupyter

## Installation
- `conda install -c conda-forge grpcio protobuf` not valid any more, use `python -m pip install grpcio protobuf`
- `pip install notebook`

## Publish
```bash
# under virtual environment "chiral-dev"
python setup.py bdist_wheel
twine upload dist/*
```

## Roadmap

##  TODO