Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
datasette-statistics
Advanced tools
SQL statistics functions for Datasette
Install this plugin in the same environment as Datasette.
datasette install datasette-statistics
This plugin adds new SQL aggregate functions for use within Datasette:
statistics_mean()
for calculating the meanstatistics_geometric_mean()
for calculating the geometric mean (requires Python 3.8+)statistics_median()
for calculating the medianstatistics_median_low()
for calculating the low medianstatistics_median_high()
for calculating the high medianstatistics_mode()
for calculating the modestatistics_stdev()
for calculating the sample standard deviationstatistics_pstdev()
for calculating the population standard deviationstatistics_variance()
for calculating the sample variancestatistics_pvariance()
for calculating the population varianceThese all use the implementations from the Python statistics library.
Use them like this:
select statistics_mean(numeric_column) from mytable
To set up this plugin locally, first checkout the code. Then create a new virtual environment:
cd datasette-statistics
python3 -mvenv venv
source venv/bin/activate
Or if you are using pipenv
:
pipenv shell
Now install the dependencies and test dependencies:
pip install -e '.[test]'
To run the tests:
pytest
FAQs
SQL statistics functions for Datasette
We found that datasette-statistics 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
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.