semvec/pypi-packages huggingface dataset:
battery-yunruse 1.0.0
Cross-platform battery status
Requires Python: >=3.7
Keywords: battery,cross-platform

# `battery` v1.0: Cross-platform battery status

The following functions are available:

- `is_discharging`:        Check if battery is discharging (i.e. in use).
- `is_charging`:           Check if battery is charging.
- `percent`:               Return percentage charge of battery in [0, 100].
- `minutes_to_empty`:      Minutes of battery life left (may be empty if not known yet).
- `minutes_to_full`:       Minutes until the battery is charged (may be 0 if full, or empty if not on charge or not known).
- `capacity`:              Battery's current capacity in mWh (mAh on macOS).
- `design_capacity`:       Battery's original capacity in mWh (mAh on macOS).

The following OS versions are supported:

- macOS 10.2 and later
- Linux 2.6.24 and later
- Windows Vista and later

A `NotImplementedError` is raised for unsupported OSes.

Pull requests and issues are always welcome for better compatibility!

# Usage example

Obtain with `pip install battery-yunruse` and use like;

```py
import battery
source = 'battery' if battery.is_discharging() else 'AC power'
print(f'On {source} at {battery.percent()}%')
print(f'Battery is at {battery.capacity() / battery.design_capacity()*100:4.1f}% health.')
```

The CLI always returns a JSON value:

```
$ python -m battery
{"is_discharging": true, "percent": 92, "minutes_to_empty": 215, "minutes_to_full": null, "capacity": 2388, "design_capacity": 4381}
$ python -m battery percent
92
```

# Other notes

In the unix philosophy: do a small thing well. 

Also check out [`psutil`](https://github.com/giampaolo/psutil/)!

As the whole package is **public domain**, please hack this code into whatever purpose needed.

Note that the Python is just a wrapper around the annotated `.toml` of commands that give standardised output.
(For compatibility this is converted to `.json` for use.)
audig 0.2.0
Reprodutor de áudio para estudo de inglês.
Requires Python: >=3.8.1,<3.11

# AudIng Reprodutor de Áudio


<br>

## Estrutura do Projeto

```
.
├── audig
│   ├── __init__.py
│   ├── main.py
│   ├── mixer.py
│   └── paths.py
├── poetry.lock
├── pyproject.toml
├── README.md
├── tests
│   └── __init__.py
└── utils
    └── demo.png

```

---

<br>

## Dependências

```
❯ poetry show --tree
```

```

audioread 3.0.0 multi-library, cross-platform audio decoding
autopep8 2.0.2 A tool that automatically formats Python code to conform to the PEP 8 style guide
├── pycodestyle >=2.10.0
└── tomli *
flake8 6.0.0 the modular source code checker: pep8 pyflakes and co
├── mccabe >=0.7.0,<0.8.0
├── pycodestyle >=2.10.0,<2.11.0
└── pyflakes >=3.0.0,<3.1.0
mypy 1.1.1 Optional static typing for Python
├── mypy-extensions >=1.0.0
├── tomli >=1.1.0
└── typing-extensions >=3.10
pygame 2.2.0 Python Game Development

```


## Código Exemplo

```{.py3 hl_lines="" linenums="" title="codigo_exemplo.py"}
from audig import Caminhos
from audig import TocarAudios
from typing import List


def run(path: str, sub_dirs: List[str]) -> None:
    """
    Método executa o reprodutor de áudio.
    Args:
        path: Caminho absoluto do diretório raiz.
        sub_dirs: subdiretórios do diretório raiz.
    Returns:
        Não retorna nada.
    """
    # Instanciando um objeto Caminhos
    caminhos = Caminhos(path=path, subdirs=sub_dirs)
    # obtendo os caminhos absolutos dos arquivos de áudios.
    paths_abs = caminhos.get_paths()
    toca_audios = TocarAudios(paths_abs=paths_abs)
    toca_audios.ouvir_lista()


if __name__ == "__main__":
    # Diretório raiz do curso.
    path = "home/usuario1/seu_diretorio_raiz"
    # Subdiretórios a serem listado os áudios
    sub_dirs = ["nome_subpasta1", "nome_subpasta2",
                "nome_subpasta3", "nome_subpastax"]
    run(path=path, sub_dirs=sub_dirs)
```

---

<br>

## Demostração Código

![demo](https://github.com/Oseiasdfarias/auding/blob/main/utils/demo.png?raw=true)