Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
This package provides the PERT (also known as beta-PERT) distribution.
Both the PERT distribution and its generalization, the modified PERT distribution, are provided.
The distributions work exactly like SciPy continuous probability distributions. They are subclasses of rv_continuous
.
# or `poetry add betapert`
pip install betapert
from betapert import pert, mpert
# Define the distribution:
dist = pert(10, 30, 90)
# Or, using keyword arguments:
dist = pert(mini=10, mode=30, maxi=90)
# Call standard SciPy methods:
dist.pdf(50)
dist.cdf(50)
dist.mean()
dist.rvs(size=10)
# Or, you can directly use the methods on this object:
pert.pdf(50, mini=10, mode=30, maxi=90)
pert.cdf(50, mini=10, mode=30, maxi=90)
pert.mean(mini=10, mode=30, maxi=90)
pert.rvs(mini=10, mode=30, maxi=90, size=10)
# The modified PERT distribution is also available.
# A PERT distribution corresponds to `lambd=4`.
# Note that you cannot call `mpert` without specifying `lambd`
# (`pert` and `mpert` must have different signatures since SciPy does
# not support optional shape parameters).
mdist = mpert(10, 30, 90, lambd=2)
# Values of `lambd<4` have the effect of flattening the density curve
# 6% > 1.5%
assert (1 - mdist.cdf(80)) > (1 - dist.cdf(80))
A thorough test suite is included.
❯ pytest
=============== 250 passed in 3.52s ===============
tests/test_frozen.py
tests/test_generalization.py
tests/test_mpert_parametrized.py
tests/test_special_cases.py
FAQs
Top-level package for beta-PERT distribution.
We found that betapert 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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.