Skip to main content

brightml: Machine-Learned Auto brightness

PyPI PyPI HitCount

The goal of this package is to automatically manage brightness on laptops, with "zero config"; using machine learning. Some do not even realise that what is "on" your screen, matters. White screens (like browser) vs coding (in black) should be accounted for.

All you have to do is to change brightness when it is not good enough yet; brightml learns.

It will learn to generalize based on your personal needs. To do this, it uses:

  • Brightness of screen
  • Ambient light sensor (if available)
  • Hour of day
  • whereami (indoor wifi positioning)
  • Battery feature (only if discharging)
  • Active application name
  • Active window title

Features

  • Cross-OS (within Linux)
  • Cross-vendor (intel, nvidia)
  • Cross-hardware (with or without ambient light sensor, linux on macbook works)
  • Seamless integration: No need to change key bindings as it monitors brightness change by user
  • Uses asyncio, event-based (change of window immediately triggers prediction; no timer)
  • Updates brightness on focusing different windows and on scrolling

Goals

  • Provide service files to enable by startup (systemd: done)
  • Add a command to show "feature importance"
  • More extensibility (plugin based)
  • Cross-platform (OSX)

Installation

pip install brightml

Bonus: set up whereami <https://github.com/kootenpv/whereami>_ to include indoor positioning in the predictions.

pip install brightml[whereami]

Usage

Eventually we need to get some service files for the different Operating Systems, so the process starts on boot.

For now, just ready for preview, run on command line:

sudo brightml

This will run brightml in the foreground.

To instead just show current feature values, run:

pascal@archbook:~$ brightml features
{
    "ambient_light": 1,
    "whereami": "bed",
    "datetime_hour": 21,
    "datetime_timezone": "UTC+02:00",
    "datetime_date": "2017-10-28",
    "datetime_full": "2017-10-28 21:52:43+02:00",
    "display_pixel_mean": 9.072666666666667,
    "display_window_name": "pascal@archbook:~",
    "display_window_class": "urxvt URxvt",
    "battery": 95.94282414091828
}

Metadata

Release files for brightml 0.2.11

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for brightml 0.2.11
File Size Uploaded Provenance Actions
brightml-0.2.11.tar.gz 13.3 kB Without provenance Details for brightml-0.2.11.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for brightml 0.2.11
File Interpreter ABI Platform Actions
brightml-0.2.11-py2.py3-none-any.whl Python 2, Python 3 none any Details for brightml-0.2.11-py2.py3-none-any.whl

Total release size: 30.7 kB

Release files / brightml-0.2.11.tar.gz

Download URL brightml-0.2.11.tar.gz
Size 13.3 kB
Tags Source
SHA-256 checksum
How to use checksums
57418bdfcdf88d46213a4305731b521049992ac9c06afa7c7300f2775d7a5b25
BLAKE2b-256 checksum
How to use checksums
3700e7aef38d38da52e93b9181d64de6a5d47dfe550fd859eaa1be7ecdad9251
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.7.0a0

Release files / brightml-0.2.11-py2.py3-none-any.whl

Download URL brightml-0.2.11-py2.py3-none-any.whl
Size 17.4 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
d08655f3803eab1ccfcdf84fd5d3feef02b5a999c3eb40e428da574d05011c59
BLAKE2b-256 checksum
How to use checksums
e03655c8a9547eb0bda4b78645bcecdeddc61ae4fe24d9ef20f67f6ef5c2dcf8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.7.0a0

Security for brightml 0.2.11

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page