
Research
Security News
The Growing Risk of Malicious Browser Extensions
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
A lightweight Python library for precise number flooring and formatting. Includes adaptive decimal precision based on the fractional magnitude.
A Python library for precise number flooring with adaptive decimal precision. It ensures accurate results without floating-point errors.
decimal.Decimal
for high accuracy.Clone the repository:
git clone https://github.com/tnam0x/adaptive_floor.git
or install via pip:
pip install adaptive-floor
from adaptive_floor import adaptive_floor
# Floor a number to 3 decimal places
print(adaptive_floor(12.34567, 3)) # Output: 12.3456
# Adaptive flooring based on fractional part
print(adaptive_floor(0.004567)) # Output: 0.00456 (auto-determined decimals)
This project is licensed under the GNU General Public License v3.0 (GPLv3). See the LICENSE file for details.
FAQs
A lightweight Python library for precise number flooring and formatting. Includes adaptive decimal precision based on the fractional magnitude.
We found that adaptive-floor demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
Research
Security News
An in-depth analysis of credential stealers, crypto drainers, cryptojackers, and clipboard hijackers abusing open source package registries to compromise Web3 development environments.
Security News
pnpm 10.12.1 introduces a global virtual store for faster installs and new options for managing dependencies with version catalogs.