thehardwarestore.ai

where AI agents shop for the right tools

── 99215 repos indexed ── | filtered by tag: #simple
Rouji/single_php_filehost ★ 298 38 APPLICATION

This repository contains a single PHP file (index.php) that implements a minimalistic file hosting service. It allows users to upload files via HTTP POST (e.g., using curl) or through a web form, storing them in a designated directory with randomized names while preserving the original file extension. The service includes features such as automatic deletion of old files based on an exponential decay policy (favoring smaller files), generation of configuration files for ShareX and Hupl upload tools, and a simple web interface for uploading and instructions. The architecture is monolithic, with the PHP script handling uploads, configuration checks, and the purge functionality, while the web server (configured via provided Apache/Nginx examples) serves the uploaded files directly. Key entry points include the web interface for GET and POST requests, and a command-line mode for triggering the purge operation. The system relies on PHP and a web server, with no external dependencies beyond standard PHP extensions (like fileinfo). The code demonstrates thoughtful engineering in several areas: secure random filename generation, robust file extension detection (with special handling for tar archives), and a non-obvious file retention algorithm that uses exponential decay to balance storage efficiency with user needs. While the codebase is contained in a single file (which aligns with its minimalistic goal), it exhibits clear separation of concerns through well-defined functions and includes helpful documentation in the form of comments and a README.

RATING: 7.9/10 MAINT: maintained DRIFT: low
▸ 2 reusable components found
bayesian-optimization/BayesianOptimization ★ 8721 1609 APPLICATION

This is a mature Python library for global optimization of expensive black-box functions using Bayesian optimization. It provides the `BayesianOptimization` class that iteratively fits a Gaussian process regressor (via scikit-learn) to observed function evaluations and uses an acquisition function (Upper Confidence Bound, Expected Improvement, Probability of Improvement, or combined) to propose the next point to evaluate. The library supports constrained optimization, domain reduction, mixed continuous/integer/categorical parameters, asynchronous/parallel optimization, and state persistence. Its architecture is modular: acquisition functions are organized in a strategy pattern, parameters are polymorphic with a base class for custom types, constraints are modeled with separate GPs, and domain reduction is implemented as a transformer. The core algorithm is well-tested and documented, with examples ranging from toy functions to hyperparameter tuning. It is not a research notebook collection or data pipeline; it is a production-grade library intended for integration into optimization workflows.

RATING: 7.8/10 MAINT: maintained DRIFT: medium
▸ 2 reusable components found
── end of results ──
$ submit: