Socket
Socket
Sign inDemoInstall

streaming-statistics

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

streaming-statistics

A streaming statistics library


Maintainers
1

Python package

Streaming statistics

This is module for streaming statistics. It can efficiently calculate statistics on a stream of numbers in a minimum amount of memory.

It provides the following statistics:

StatisticDescription
nNumber of values
minMinimum value
maxMaximum value
sumSum of values
meanMean value
stddevStandard deviation
varianceVariance

In addition to the above statistics, it also provides the following percentiles: 1st, 5th, 25th, 50th, 75th, 95th, and 99th.

Here is an example result:

{
  "n": 177966,
  "mean": 237.02426306148718,
  "variance": 184870.5448188569,
  "stddev": 429.9657484252169,
  "min": 0,
  "max": 33408,
  "sum": 42182260,
  "1st": 5.002829575110743,
  "5th": 17.994143369901202,
  "10th": 25.791844500743554,
  "25th": 49.90296094906744,
  "50th": 100.4945677085671,
  "75th": 242.2894312639693,
  "90th": 607.9931874110874,
  "95th": 925.3552129773512,
  "99th": 1826.5794537820188
}

A script, script/stats will read numbers from standard input and print the statistics to standard output.

Installation

This code uses the poetry system to install Python dependencies. To install, clone this repository, and then:

$ poetry install
$ poetry shell

It is also available as a Python package on PyPI.

$ pip install streaming_statistics

FAQs


Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc