
Research
/Security News
Toptal’s GitHub Organization Hijacked: 10 Malicious Packages Published
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.
Sometimes you need sophisticated line-by-line profiling for optimizing your Python code. Other times, you just want a quick and basic memory profile chart.
There are plenty of tools for the former use-case, e.g. py-spy
or vprof
. But not many (or any) tools for the latter use-case.
profile-this
is a stupid simple memory profiler for people who just want a basic memory profiling plot without writing one from scratch.
Install it like this:
pip install profile-this
Do this:
from random import randint
from profile_this import ProfileThis
def func(n=10_000_000):
return sum([randint(0, i + 1) for i in range(n)])
profiler = ProfileThis()
profiler.start()
func()
profiler.stop()
profiler.plot(
title="Profile for func", path="docs/func.png"
)
Or this:
with ProfileThis() as profiler:
func()
profiler.plot(
title="Profile for func",
path="docs/func.png",
)
Or this:
from profile_this import profilethis
@profilethis(title="Profile for func", path="docs/func.png")
def func(n=10_000_000):
return sum([randint(0, i + 1) for i in range(n)])
func()
To get this:
FAQs
A stupid simple memory profiler.
We found that profile-this 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
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.
Research
/Security News
Socket researchers investigate 4 malicious npm and PyPI packages with 56,000+ downloads that install surveillance malware.
Security News
The ongoing npm phishing campaign escalates as attackers hijack the popular 'is' package, embedding malware in multiple versions.