{"id":16532051,"url":"https://github.com/ei-grad/bincount","last_synced_at":"2026-01-26T09:34:11.605Z","repository":{"id":57415105,"uuid":"158247305","full_name":"ei-grad/bincount","owner":"ei-grad","description":"No-copy parallelized bincount returning dict","archived":false,"fork":false,"pushed_at":"2024-04-09T06:11:12.000Z","size":4,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-09-30T05:20:59.016Z","etag":null,"topics":["bincount","cython","numpy","python","statistics"],"latest_commit_sha":null,"homepage":"","language":"Cython","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ei-grad.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-11-19T15:30:14.000Z","updated_at":"2024-04-09T06:11:16.000Z","dependencies_parsed_at":"2025-03-28T14:33:58.437Z","dependency_job_id":null,"html_url":"https://github.com/ei-grad/bincount","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ei-grad/bincount","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ei-grad%2Fbincount","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ei-grad%2Fbincount/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ei-grad%2Fbincount/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ei-grad%2Fbincount/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ei-grad","download_url":"https://codeload.github.com/ei-grad/bincount/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ei-grad%2Fbincount/sbom","scorecard":{"id":369734,"data":{"date":"2025-08-11","repo":{"name":"github.com/ei-grad/bincount","commit":"fff09bd66d7a3858ec958eb6dcff12e946dea0e6"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/8 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-18T12:41:34.238Z","repository_id":57415105,"created_at":"2025-08-18T12:41:34.238Z","updated_at":"2025-08-18T12:41:34.238Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28772913,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-26T08:38:24.014Z","status":"ssl_error","status_checked_at":"2026-01-26T08:38:22.080Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bincount","cython","numpy","python","statistics"],"created_at":"2024-10-11T18:11:33.224Z","updated_at":"2026-01-26T09:34:11.552Z","avatar_url":"https://github.com/ei-grad.png","language":"Cython","funding_links":[],"categories":[],"sub_categories":[],"readme":"bincount\n========\n\nNo-copy parallelized bincount returning dict.\n\nInstall\n-------\n\nPrequirements: C-compiler with OpenMP support.\n\nInstall with pip:\n\n.. code-block::\n\n   pip install bincount\n\nUsage\n-----\n\nThere is a ``bincount`` (a parallel version) and a ``bincount_single`` (which don't\nparallelize the calculation) functions, both returning the dict containing the\nnumber of occurrences of each byte value in the passed bytes-like object:\n\n.. code-block::\n\n   \u003e\u003e\u003e from bincount import bincount\n   \u003e\u003e\u003e bincount(open('a-tiny-file.txt', 'rb').read())\n   {59: 2, 65: 5, 66: 1, 67: 3, 68: 2, 69: 3, 73: 4, 76: 7, 84: 3, 86: 1, 95: 4}\n\nMotivation\n----------\n\nAs of Nov 2018, ``np.bincount`` is unusable with large memmaps:\n\n.. code-block::\n\n   \u003e\u003e\u003e import numpy as np\n   \u003e\u003e\u003e np.bincount(np.memmap('some-5gb-file.txt', mode='r'))\n   Traceback (most recent call last):\n     File \"\u003cstdin\u003e\", line 1, in \u003cmodule\u003e\n   MemoryError\n\nThe most effective pure-python solution for ``wc -l`` is a bit slow:\n\n.. code-block::\n\n   In [6]: %%time\n      ...: sum(1 for i in open('some-5gb-file.txt', mode='rb'))\n      ...:\n   CPU times: user 3.5 s, sys: 878 ms, total: 4.38 s\n   Wall time: 4.38 s\n   Out[6]: 58941384\n\nIt is 3x times slower than ``wc -l``:\n\n.. code-block::\n\n   In [1]: %%time\n      ...: !wc -l some-5gb-file.txt\n      ...:\n   58941384 some-5gb-file.txt\n   CPU times: user 1.48 ms, sys: 3.48 ms, total: 4.96 ms\n   Wall time: 1.24 s\n\nWhile it should be faster on modern multicore SMP systems:\n\n.. code-block::\n\n   In [1]: import numpy as np\n\n   In [2]: from bincount import bincount\n\n   In [3]: %%time\n      ...: bincount(np.memmap('some-5gb-file.txt', mode='r'))[10]\n      ...:\n   CPU times: user 6.83 s, sys: 354 ms, total: 7.19 s\n   Wall time: 705 ms\n   Out[4]: 58941384\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fei-grad%2Fbincount","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fei-grad%2Fbincount","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fei-grad%2Fbincount/lists"}