![New axobject-query Maintainer Faces Backlash Over Controversial Decision to Support Legacy Node.js Versions](https://cdn.sanity.io/images/cgdhsj6q/production/86e6ebdea652d20da070ebbda20134b839972db7-1024x1024.webp?w=800&fit=max&auto=format)
Security News
New axobject-query Maintainer Faces Backlash Over Controversial Decision to Support Legacy Node.js Versions
A JavaScript library maintainer is under fire after merging a controversial PR to support legacy versions of Node.js.
streaming-percentiles
Advanced tools
Changelog
2.2.0 - 2018-04-20
Readme
This is a library with implementations of various percentile algorithms on streams of data, with support for the following languages:
For more on streaming percentiles, see Calculating Percentiles on Streaming Data.
You can download pre-built versions of the library from the streaming-percentiles-cpp releases page. Otherwise see CONTRIBUTING.md for instructions on how to compile the library from source.
Here's a simple example on how to use the Greenwald-Khanna streaming percentile algorithm from C++:
#include <stmpct/gk.hpp>
using namespace stmpct;
double epsilon = 0.1;
gk g(epsilon);
for (int i = 0; i < 1000; ++i)
g.insert(rand());
double p50 = g.quantile(0.5); // Approx. median
double p95 = g.quantile(0.95); // Approx. 95th percentile
Here's how to use the library from Node.JS:
var sp = require('streaming-percentiles');
var epsilon = 0.1;
var g = new sp.GK(epsilon);
for (var i = 0; i < 1000; ++i)
g.insert(Math.random());
var p50 = g.quantile(0.5); // Approx. median
var p95 = g.quantile(0.95); // Approx. 95th percentile
Here's how to use the library from a browser. Note that the default module name is streamingPercentiles:
<script src="streamingPercentiles.v1.min.js"></script>
<script>
var epsilon = 0.1;
var gk = new streamingPercentiles.GK(epsilon);
for (var i = 0; i < 1000; ++i)
g.insert(Math.random());
var p50 = g.quantile(0.5);
</script>
Coming soon!
If you are interested in contributing to the library, please see CONTRIBUTING.md.
FAQs
Implementations of various streaming percentile algorithms
The npm package streaming-percentiles receives a total of 144 weekly downloads. As such, streaming-percentiles popularity was classified as not popular.
We found that streaming-percentiles demonstrated a not healthy version release cadence and project activity because the last version was released 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
A JavaScript library maintainer is under fire after merging a controversial PR to support legacy versions of Node.js.
Security News
Results from the 2023 State of JavaScript Survey highlight key trends, including Vite's dominance, rising TypeScript adoption, and the enduring popularity of React. Discover more insights on developer preferences and technology usage.
Security News
The US Justice Department has penalized two consulting firms $11.3 million for failing to meet cybersecurity requirements on federally funded projects, emphasizing strict enforcement to protect sensitive government data.