semvec/pypi-packages huggingface dataset:
stpreview 0.6.0
build downsampled previews of space telescope products
Requires Python: >=3.11

# Space Telescope Product Downsampling

[![Powered by STScI Badge](https://img.shields.io/badge/powered%20by-STScI-blue.svg?colorA=707170&colorB=3e8ddd&style=flat)](http://www.stsci.edu)
[![Powered by Astropy Badge](http://img.shields.io/badge/powered%20by-AstroPy-orange.svg?style=flat)](http://www.astropy.org/)
[![build](https://github.com/spacetelescope/stpreview/actions/workflows/build.yml/badge.svg)](https://github.com/spacetelescope/stpreview/actions/workflows/build.yml)
[![test](https://github.com/spacetelescope/stpreview/actions/workflows/tests.yml/badge.svg)](https://github.com/spacetelescope/stpreview/actions/workflows/tests.yml)
[![codecov](https://codecov.io/gh/spacetelescope/stpreview/graph/badge.svg?token=tSEFJ5vwgH)](https://codecov.io/gh/spacetelescope/stpreview)

```
pip install stpreview
```

### Usage

```
❯ uv run stpreview --help
usage: stpreview [-h] [--observatory {roman,jwst}] [--compass]
                 INPUT OUTPUT {to,by} ...

positional arguments:
  INPUT                 path to ASDF file with 2D image data
  OUTPUT                path to output image file
  {to,by}
    to                  downsample the given ASDF image by the given integer
                        factor
    by                  downsample the given ASDF image to the desired shape (the
                        output image may be smaller than the desired shape, if no
                        even factor exists)

options:
  -h, --help            show this help message and exit
  --observatory {roman,jwst}
                        (if omitted, will attempt to infer from file)
  --compass             draw a north arrow on the image
```

#### `stpreview by`

```
❯ uv run stpreview input.asdf output.png by --help
usage: stpreview INPUT OUTPUT by [-h] FACTOR [FACTOR ...]

positional arguments:
  FACTOR      block size by which to downsample image data

options:
  -h, --help  show this help message and exit
```

#### `stpreview to`

```
❯ uv run stpreview input.asdf output.png to --help
usage: stpreview INPUT OUTPUT to [-h] SHAPE [SHAPE ...]

positional arguments:
  SHAPE       desired pixel resolution of output image

options:
  -h, --help  show this help message and exit
```

### Examples

##### downsample a sample Roman image by a factor of 10, and add a compass rose

```shell
stpreview /grp/roman/TEST_DATA/23Q4_B11/aligntest/r0000501001001001001_01101_0001_WFI01_cal.asdf docs/images/by.png --compass by 10 10
```

![by](./docs/images/by.png)

##### downsample a sample Roman image to within 300x300 pixels

```shell
stpreview /grp/roman/TEST_DATA/23Q4_B11/aligntest/r0000501001001001001_01101_0001_WFI01_cal.asdf docs/images/to.png to 300 300
```

![to](./docs/images/to.png)
brightness-controller 1.0.0
A GUI tool to control brightness and night mode on Linux displays
Requires Python: >=3.6

# mahdi-brightness-controller

**mahdi-brightness-controller** is a simple and elegant Linux GUI tool for controlling screen brightness and reducing blue light with a powerful night mode using `xrandr`.

> 🌙 Designed for eye comfort with a sleek dark interface.

## Features

- 🔆 Adjustable screen brightness (range: 0.1 – 1.0)
- 🌙 Night Mode slider to reduce blue light (strong → soft)
- 🎨 Dark-themed GUI using `tkinter` and `ttk`
- ⚡ Real-time changes using `xrandr`
- 🖥️ Ideal for external monitors (e.g., HDMI, VGA)

## Installation

```bash
pip install mahdi-brightness-controller

Usage

mahdi-brightness-controller

This will open a simple GUI with:

A brightness slider (left = dim, right = bright)

A night mode slider (left = more warmth, right = normal color)

Requirements
Python 3.6+

Linux system with xrandr installed

GUI environment (X11/Xorg, not Wayland)
bruker-reader 0.1.3
Reader for Bruker FTICR BAF files
Requires Python: >=3.8

# bruker-reader

This is a simple python package for reading FTICR spectra from Bruker BAF files.

It's heavily based off of the R `rtms` package (https://cran.r-project.org/package=rtms), 
who did the heavy lifting of reverse engineering the file format.

## Usage

Usage is simple. Create a reader by pointing it to the `.d` directory:

```
	>>> from bruker_reader import BAFReader
	>>> rdr = BAFReader("/path/to/data/sample.d")
	>>> spec = rdr.read_spectrum()
	... # returns pandas DataFrame with 'mz' and 'intensity' columns
```

You can read partial spectra as well, which can dramatically speed up access:

```
	>>> rdr.read_spectrum(from_mass=451.0, to_mass=509)
```

BAF files also store a list of the N largest peaks (where N is configurable
when setting up a run). Note, this is not necessarily the same as the total
peaks collected after calibrating; but it may still be useful.

```
	>>> rdr.read_peaks()
	# Returns a pandas DataFrame of `mz` and `intensity` values.
```

To ease the process of reading multiple Bruker `.d` files stored in a data dir,
the `BAFCache` class can be used. It creates an easy lookup for spectra files,
as well as caches the metadata for the spectrum upon first use:

```
	>>> from bruker_reader import BAFCache
	# Assuming `/path/to/data` contains `samp1.d`, `samp2.d` ...
	>>> bcache = BAFCache('/path/to/data')

	# Access samples by key
	>>> samp1 = bcache['samp1'].read_spectrum()

	# You can also access by numeric index:
	>>> bcache[12]
	
	# BAFCache has typical iterable behavior:
	>>> if 'samp11' in bcache: ...
	>>> for rdr in bcache: ...
	
	# Getting directory info
	>>> bcache.samples  # Returns a list of sample ids
	>>> bcache.files    # Returns a dict of sample -> filepath
```
gvotp 0.1.1
A lightweight in-memory OTP generator and verifier with external record support
Requires Python: >=3.7

# GVOTP

A lightweight in-memory OTP (One-Time Password) generator and verifier with external record support.

## Installation

```bash
pip install gvotp
```

---
## 🚀 Usage
```commandline
from gvotp import GVOTP

otp_manager = GVOTP()

# Generate an OTP
result = otp_manager.generate_otp("email", "user@example.com")

# Access the raw OTP (to send via email, SMS, etc.)
otp = result["otp"]

# (Optional) Use result["otp_record"] if you prefer storing OTPs externally
otp_doc = result["otp_record"]
# Example structure:
# {
#     'kind': 'email',
#     'receiver': 'user@example.com',
#     'otp_hash': '...',
#     'attempts': 0,
#     'create_time': 1750093088,
#     'ttl': 900
# }

# ✅ In-memory OTP verification
otp_manager.verify_otp("email", "user@example.com", otp)

# ✅ External document verification (if OTP record is stored externally)
otp_manager.verify_otp("email", "user@example.com", otp, document=otp_doc)

```
📌 Note
- OTPs expire after the configured TTL (default: 15 minutes).

- Maximum 5 failed attempts are allowed per OTP.

- Once an OTP is successfully verified, it is deleted from in-memory store automatically.

- If using external storage (like a database), you must manage record deletion post-verification.
simplemail-cli 0.1.1
A simple mail client CLI
Requires Python: >=3.12

# smail

Minimal email client for iCloud. Perfect for iCloud email aliases.

## Installation

```bash
# Install with uv (recommended)
uv tool install simplemail-cli

# Or use pipx
pipx install simplemail-cli
```


## Features

- Thread visualization with tree display
- Rich formatting with unread indicators
- Thread navigation (`smail 0.1`, `smail 0.last`)
- Quick self-email (`smail "reminder" "buy milk"`)
- Secure keychain password storage
- Reply tracking with proper threading
- Archive emails to iCloud Archive folder
- [ ] Unarchive emails (move back from Archive to Inbox)
- [ ] Attachments
- [ ] Performance optimization (connection reuse, parallel fetch)
- [ ] local `smail.toml` with just alias, so one can config per project email 

## Setup

### 1. Create App-Specific Password

1. Go to [appleid.apple.com](https://appleid.apple.com)
2. Sign in and navigate to "Sign-In and Security"
3. Select "App-Specific Passwords"
4. Click the "+" button to generate a new password

### 2. Create iCloud Email Alias (optional)

1. Go to [iCloud Mail settings](https://www.icloud.com/mail/) 
2. Click Settings → Accounts → Add Alias
3. Create an alias (e.g., yourname+smail@icloud.com)
4. Use this alias in your smail config to keep CLI emails separate

### 3. Configure smail

```bash
# First run guides you through setup
smail

# Or manually create config
cat > ~/.config/smail/config.toml << EOF
email = "your@icloud.com"           # your email alias address, will send emails from here and only show emails for this account
login = "your.appleid@icloud.com"  # Apple ID if different from email
keychain = "your-keychain-service"
EOF
```

### 4. Add Password to Keychain

```bash
# Add password from command line (macOS)
security add-generic-password \
  -a "your.appleid@icloud.com" \
  -s "your-keychain-service" \
  -w "your-app-specific-password"

# Or let smail prompt you on first run
smail
```

## Usage

```bash
# List & Read
smail                          # List emails
smail 0                        # Read email/thread
smail 0.1                      # Read specific message in thread
smail 0.last                   # Read newest message in thread

# Send
smail "Subject" "Body"                      # Send to self
smail user@example.com "Subject" "Body"     # Send to recipient

# Reply, Archive & Delete
smail reply "Quick reply"      # Reply to latest
smail 0 reply "Reply text"     # Reply to specific
smail 0 archive                # Archive email/thread
smail 0 delete                 # Delete email/thread
```

## Security

- Passwords are stored in macOS Keychain, never in files
- Always use app-specific passwords, not your main Apple ID password
- The keychain service name in config.toml should match the one used in the `security` command
incantoos 1.1.0
IncantoOS Is a wrapper related to OS functions that can be put into a smaller faster function
Requires Python: >=3.8

# Overview
IncantoOS was developed to make tasks smaller.

# Usage
IncantoOS Wasnt intended for other people to use it use at your own caution

# Notes
I will try to keep up with the documentation of IncantoOS even though it wasnt meant for public use.

# Discresion
I am not the best coder so do not expect IncantoOS to work properly. If a bug is found you can report it to me via the github.

# Documentation

An assortment of different colors
```
    class color
```

Prints the current system time.
```py
    incantoos.nowtime()
```


```py
    class ids

    ids.fourdashfour(capital : bool)
        Gives you a 8 character ID Ex. ("944b-fq8d")

    ids.ranid(amount : int, capital : bool)
        Gives you a randomized id of the specified amount
        
```

```py
    class times

    times.nowtime()
        Prints the current system time
    times.utcnowtime()
        Prints the current system time in UTC
    times.nowtimemdyhms
        Prints now time orgainzed by Month/Day/Year | Hour/Minute/Second
            Ex. [M/D/Y H:D:Y]
    times.utcnowtimemdyhms
        same thing as non utc
```