
Security News
Django Joins curl in Pushing Back on AI Slop Security Reports
Django has updated its security policies to reject AI-generated vulnerability reports that include fabricated or unverifiable content.
A programmatic approach to function runtime estimation.
This package first came about as a way to serve my needs during an Algorithms class in college.
It started as a function that stored time elapsed results in a global dictionary, where the key was a tuple of the functions name and return value.
Now it's just a bit different.
PYPI:
pip install functimer
Manual:
poetry install --no-dev
poetry build
pip install dist/*.whl
How to install Poetry.
examples/
Python
@timed(unit=Unit.SECOND, number=1)
def timed_sleep(seconds):
sleep(seconds)
runtime = timed_sleep(1)
"1.00 s"
Command Line
$ python -m functimer "sum([1, 2, 3])"
Average runtime of 10,000 executions: 0.15 µs
$ python -m functimer "sum([1, 2, 3])" --return
Average runtime of 10,000 executions: 0.15 µs
sum([1, 2, 3]) -> 6
$ python -m functimer "(lambda x: x+x)(10)" --return
Average runtime of 10,000 executions: 0.14 µs
(lambda x: x+x)(10) -> 20
$ python -m functimer "functimer.util.get_unit('1.00 s')" --return
Average runtime of 10,000 executions: 0.50 µs
functimer.util.get_unit('1.00 s') -> Unit.SECOND
$ python -m functimer "functimer.classes.Unit.from_str('s')" --return
Average runtime of 10,000 executions: 0.25 µs
functimer.classes.Unit.from_str('s') -> Unit.SECOND
Run tox
in the root directory of the repo.
MIT
FAQs
A programmatic approach to function runtime estimation.
We found that functimer 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.
Security News
Django has updated its security policies to reject AI-generated vulnerability reports that include fabricated or unverifiable content.
Security News
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
Security News
A new Node.js homepage button linking to paid support for EOL versions has sparked a heated discussion among contributors and the wider community.