agent-security-hardening
AFaffaan-m/ECC314k4,125 new stars in the last 7 days
Evaluate mathematical expressions and unit conversions. Handles arithmetic, percentages, exponents, and common unit conversions (temperature, distance, weight). No external dependencies.
Evaluate math expressions and perform unit conversions from the command line.
Provide a safe, sandboxed calculator for arithmetic expressions and common
unit conversions without relying on eval() or external services.
scripts/calc.py with the user's expression or conversion.# Arithmetic expressions
python scripts/calc.py "2 + 3 * 4"
python scripts/calc.py "(100 - 25) / 3"
python scripts/calc.py "2 ** 10"
# Percentage calculations
python scripts/calc.py "15% of 200"
# Unit conversions
python scripts/calc.py "100 celsius to fahrenheit"
python scripts/calc.py "5 miles to km"
python scripts/calc.py "10 kg to lbs"
A single line with the result, e.g.:
Result: 14
For conversions:
100 celsius = 212.0 fahrenheit
+, -, *, /, **, %, parentheses.10**1000 - 10**1000 returns Error: result is too large because each power has 1001 digits.| Problem | Fix |
|---|---|
Invalid expression | Check for unsupported operators or variables |
Unknown conversion | Use supported units: celsius, fahrenheit, miles, km, kg, lbs, meters, feet |
AFaffaan-m/ECC314k4,125 new stars in the last 7 days
Audit the whole repo: find bugs, security holes and performance bottlenecks. Get a ranked report in plain English.
DIDietrichGebert/ponytail202k4,780 new stars in the last 7 days
GAgarrytan/gstack143k636 new stars in the last 7 days
Harden code against the OWASP Top 10: input handling, authentication, sessions and dependencies.
ADaddyosmani/agent-skills122k1,627 new stars in the last 7 days
ADaddyosmani/agent-skills122k1,627 new stars in the last 7 days
RUruvnet/RuView106k693 new stars in the last 7 days