Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Title: Nyaatimer - A Simple Python Timer Decorator with Rich Output
Description:
Nyaatimer is a lightweight Python package that provides a simple timer decorator for measuring the execution time of functions. The package uses the perf_counter
function from the time
module to accurately measure the time taken, and the rich
library to display the results in a visually appealing format.
Features:
perf_counter
.rich
library integration.Example Usage:
To use Nyaatimer, simply import the nyaatimer
decorator and apply it to any function you want to measure the execution time of:
from nyaatimer import nyaatimer
@nyaatimer
def example_function(a, b):
return a + b
result = example_function(1, 2)
This will output the execution time and function details in a visually appealing format:
Function example_function took 0.00012345 seconds Args=(1, 2), Kwargs={}
Installation:
To install Nyaatimer, simply run the following command:
pip install nyaatimer
Requirements:
License:
Nyaatimer is released under the MIT License.
FAQs
A simple nyaa_timer decorator to calculate the elapsed time of a function
We found that nyaa-timer 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’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.