semvec/pypi-packages huggingface dataset:
os-bedtime 0.2.1
Put your computer to sleep, etc.
Requires Python: >=3.7

# os_bedtime

os_bedtime is a python module **made for windows (for now)** to turn off the computer with simple functions.  
Currently support for Linux is unplanned but kept in mind, but for me there is no way to test OSX :'(  
So that will come much later.  

## Early access

Currently this module is yet in the major version **0.x.x** and with that in mind the interface might change at any time.  
It is kept in mind to make changes as little as possible, but it is not out of question that things might brake during early access.  

If you feel like contributing. (OSX or Linux or improvements for Windows even) Let me know in an issue.  

## How to install

`pip install os-bedtime`  

## **Issue:** Sleep issues

Your computer might be waking from sleep mode because certain peripheral devices, such as a mouse, a keyboard, or headphones are plugged into a USB port or connected via Bluetooth. It might also be caused by an app or a wake timer.

### **Windows:** Turn off wake-timers

> Wake timers are timers that may wake your computer on a set time. Disabling this make this impossible until you re-enable it.  
> *If you use wake-timers to automatically wake your computer at 7 am or something, this will not work anymore.*
> 
> 1. Right-click Windows button. Select `Energy-management`  
> 2. Scroll down and click the link for `Extra energy-settings`  
> 3. Click the `Change power-plan` to the right of the currently selected power-plan  
> 4. Click the `Change advanced energy-settings` link  
> 5. Scroll and find `Sleep` -> `Allow activation timers`  
> 6. Set it to `No` or `Disabled`  

### **Windows:** Turn off peripheral-devices access to wake your pc

> Peripheral-devices (like for example your keyboard) have access to wake your computer out of sleep-mode.
> For something like a keyboard this makes sense. You press the space-bar and the computer wakes up, but there are other devices where this might make less sense. For example a network device may wake your computer?
> 
> 1. left-click the windows button. Type `CMD` and choose `Run as administrator`  
> 2. It will prompt you if you did this and allow this... Allow  
> 3. Type in the console `powercfg -devicequery wake_armed` and press enter  
> 4. It gives you a list of all your peripheral devices that may wake up your computer out of sleep mode  
> 5. Right-click Windows button. Select `Device-management`  
> 6. Find all the devices (or the onces you want to disable), in the list and double-click them
> 7. Find the tab called: `Energy-management` and uncheck the checkbox for `This device may wake the computer out of sleepmode`  
***Note***: Some devices like mice and keyboards show up multiple times *(that is normal)*, but not all have this tab *(that is also normal)*. Find the onces that do and disable those
medseglib 1.0.0
A package to segmentation tumor on CT and MRI

# MEDSEGLIB

This package designed for segmentation of oncology by CT and MRI images.

### Models
Currently, the models DeepLabV3(bb: resnet50), DeepLabV3(bb: resnet101) are used.
During the training, these models were used, as well as UNet and TransUnet, but DeepLabV3 showed the best results (dice and iou).

### Supported types of research
* Brain
* Liver

### How to use
```python
import numpy as np
from megseglib.sdk import Model

ct = np.zeros((1, 3, 512, 512), dtype=np.single)
model = Model(model_name="deeplab_v3_resnet101", model_type="liver")

result = model.forward(ct)
# or
result = model(ct)

print(type(result), result.shape) # <class 'numpy.ndarray'> (1, 1, 512, 512) - segmentation mask 
```
moonsense 0.13.1
Moonsense Cloud API Client

# Moonsense Cloud API Client

Simple client library for the Moonsense Cloud API.

# Installation

Install the module from PyPI: 

```shell
pip install moonsense 
```

Or from source like this:

```shell
python setup.py install 
```

# Getting Started

Start by getting an API secret key by navigating to App in Console and creating a token. You will need to save the generated secret key to a secure place.

https://console.moonsense.cloud/dashboard

We recommend exporting the API secret key as an environment variable:

    export MOONSENSE_SECRET_TOKEN=...

You can then very easily list sessions and access the granular data:

```python
from moonsense.client import Client

client = Client()
for session in client.list_sessions():
    print(session)

    for bundle in client.read_session(session.session_id):
        # Each bundle is a SealedBundle. See schema below.

```

**Recommended:** For a more realistic example see [consumer_example.py](https://github.com/moonsense/python-sdk/blob/main/consumer_example.py). It shows how you can write a consumer that will process session data using an incremental approach.

# Webhooks

See [webhook_example.py](https://github.com/moonsense/python-sdk/blob/main/webhook_example.py) for an example on how to create a very simple handler that the consumer webhooks.

The request payload use the following schema:

```protobuf
 message WebhookPayload {
    string project_id = 1; // checked in the handler since not all event types can provide a projectId.
    string app_id = 2;
    string session_id = 3;
    WebhookEventTypes event_type = 4;
    v2.bundle.SealedBundle bundle = 5; // payload is optional and only a small number of events require a bundle.
    repeated string session_labels = 7;
    string journey_id = 8;
}
```

The following webhook types are supported:

```protobuf
enum WebhookEventTypes {
    UNKNOWN = 0;
    SESSION_CREATED = 1;
    BUNDLE_RECEIVED = 2;
    CHUNK_PERSISTED = 3;
    SESSION_INACTIVE = 4;
}
```

# Tests

Simply run: `pytest`

# Release

```bash
rm -rf build/ dist/
python setup.py sdist bdist_wheel
twine upload dist/*
```

Dont' forget to bump main branch to the next version.

# Code coverge

Generate coverage report with: `py.test --cov=moonsense tests/`