npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

pythoness

v0.3.1

Published

Check how pythonic a Github user is.

Downloads

15

Readme

pythoness

npm npm GitHub last commit GitHub code size in bytes license

Check how pythonic a Github user is.

:heavy_exclamation_mark: :heavy_exclamation_mark: DO NOT judge any one based on how pythonic/a-pythonic they are/it is. :heavy_exclamation_mark: :heavy_exclamation_mark:

TL;DR

npm i -g pythoness
# Generate a token at https://github.com/settings/tokens
echo the-token > ~/.pythoness
pythoness             # Check your daily Pythoness, public & private
pythoness --public    # Check your daily Pythoness, public repo only
pythoness b1f6c1c4    # How Pythonic another user is? (public only)

Installation

$ npm install --global pythoness

Usage

pythoness [<who>]

Check pythoness of a Github user

Commands:
  pythoness.js show-limit     Show GitHub API usage and limit
  pythoness.js check [<who>]  Check pythoness of a Github user         [default]

Positionals:
  who  Github username                                                  [string]

Options:
  --version        Show version number                                 [boolean]
  --token-file     Github token file for full control of private repos, see
                   https://github.com/settings/tokens
                                              [string] [default: "~/.pythoness"]
  -t, --token      Github token for full control of private repos, see
                   https://github.com/settings/tokens                   [string]
  --public         Ignore all private repos                            [boolean]
  --help           Show help                                           [boolean]
  -s, --self       Check their own repos               [boolean] [default: true]
  -S, --star       Include starred repos               [boolean] [default: true]
  -f, --following  Check following's repos (depth=1)   [boolean] [default: true]
  -F, --followers  Check followers' repos (depth=1)    [boolean] [default: true]

FAQ

Why this program is written in JavaScript, not Python?

Because of neutrality of accounting.

How Pythoness calculated?

Pythoness of a single repo

where is the ratio of Python bytes among all code bytes (the proportion of Python blue in the Github webpage).

Self-Pythoness of an user

Self-Pythoness of an user is defined to be the "congress" average of their repos' Pythoness. First, a repo is assigned senate and the house seats, separatedly, based on the following rules:

| type | Senate seats | The House seats | | --- | --- | --- | | owner, empty, source | 100 | 0 | | owner, empty, fork | 1 | 0 | | owner, non-empty, source | 1000 | Number of total code bytes | | owner, non-empty, fork | 50 | 0 | | non-owner, starred | 10 | 0 |

Then, senate and the house will "vote", or calculate weighted arithmetic average. Finally, the "congress" average is defined as

Following-Pythoness of an user

First, all users followed by the targeted user will be enumerated and have their self-pythoness calculated. Next, each one is assigned senate and the house seats, separatedly, based on the following rules:

| type | Senate seats | The House seats | | --- | --- | --- | | has written at least one byte code | 1000 | Number of total code bytes | | has not writeen any code | 10 | 0 |

Then follow the same procedure as above.

Followers-Pythoness of an user

All users following the targeted user will be enumerated and have their self-pythoness calculated. The same procedure as above applies.

Final Pythoness of an user

It's defined as the RMS (root-mean-square) of their self-, following-, followers- Pythoness (whichever enabled in the command line).

Legal

This repo is licensed with GNU AGPLv3 or later.

Again, the output of this program has absolutely no relationship with the Github user's personality, morality, and/or technical skills. Do NOT judge any person, organization, or entity based on how pythonic they are(aren't)/it is(isn't). The author(s) hold(s) absolutely no liability for anything caused by any interpretation of pythonic information, including but not limited to the output of this program.