
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
This project features a set of tools for outlier detection, marking or filtering away samples as they come to your Python analysis code.
Most of the tools rely on double tailed Dixon's Q-test (https://en.wikipedia.org/wiki/Dixon%27s_Q_test).
pip install outlier-detector
sample
, and a know data distribution
: is the sample an outlier?sample = -14.5
distribution = [0.1, 1.1, 4.78, 2.0, 7.2, 5.3]
from outlier_detector.functions import is_outlier
print(is_outlier(distribution, sample))
distribution
and I iterate over it: is the n-th sample
an outlier?distribution = [0.1, 1.1, 4.78, 2.0, 7.2, 5.3, 8.1, -14.1, 5.4]
from outlier_detector.detectors import OutlierDetector
od = OutlierDetector(buffer_samples=5)
for sample in distribution:
print(od.is_outlier(sample))
pop
samples; and I want only valid samples:
how can I reject outliers?distribution = [0.1, 1.1, 4.78, 2.0, 7.2, 5.3, 8.1, -14.1, 5.4]
from outlier_detector.filters import filter_outlier
class MyGen:
def __init__(self):
self.cursor = -1
@filter_outlier()
def pop(self):
self.cursor += 1
return distribution[self.cursor]
g = MyGen()
while True:
try:
r = g.pop()
print(r)
except IndexError:
print('No more data')
break
pop
samples; and I want to iterate only on valid samples:
how can I reject outliers and get an iterator?distribution = [0.1, 1.1, 4.78, 2.0, 7.2, 5.3, 8.1, -14.1, 5.4]
from outlier_detector.filters import OutlierFilter
class MyGen:
def __init__(self):
self.cursor = -1
def pop(self):
self.cursor += 1
return distribution[self.cursor]
g = MyGen()
of = OutlierFilter()
try:
for sample in of.filter(g.pop):
print(sample)
except IndexError:
print('No more data')
The toolkit is organized so you can exploit one of the following pattern in the easiest way possible:
functions
for static analysis, detectors
for objects with internal buffers, and filters
for decorators.
For documentation see doc file
FAQs
Minimal tool for outliers detection on small samples set
We found that outlier-detector 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
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.