{"id":20374758,"url":"https://github.com/kmedian/grouplabelencode","last_synced_at":"2025-08-21T16:24:01.617Z","repository":{"id":57436147,"uuid":"151234351","full_name":"kmedian/grouplabelencode","owner":"kmedian","description":"Encode grouped/mapped labels","archived":false,"fork":false,"pushed_at":"2019-12-01T11:38:18.000Z","size":22,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-02T00:55:50.060Z","etag":null,"topics":["pypi"],"latest_commit_sha":null,"homepage":null,"language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kmedian.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-10-02T09:59:30.000Z","updated_at":"2019-12-01T11:38:20.000Z","dependencies_parsed_at":"2022-09-09T20:00:37.881Z","dependency_job_id":null,"html_url":"https://github.com/kmedian/grouplabelencode","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kmedian/grouplabelencode","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kmedian%2Fgrouplabelencode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kmedian%2Fgrouplabelencode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kmedian%2Fgrouplabelencode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kmedian%2Fgrouplabelencode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kmedian","download_url":"https://codeload.github.com/kmedian/grouplabelencode/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kmedian%2Fgrouplabelencode/sbom","scorecard":{"id":563962,"data":{"date":"2025-08-11","repo":{"name":"github.com/kmedian/grouplabelencode","commit":"6e2d3e364b780924b1b4b632fe1623d1b64e4ead"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/16 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":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","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":"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":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pythonapp.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/kmedian/grouplabelencode/pythonapp.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pythonapp.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/kmedian/grouplabelencode/pythonapp.yml/master?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/pythonapp.yml:18","Warn: pipCommand not pinned by hash: .github/workflows/pythonapp.yml:19","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   2 pipCommand dependencies pinned"],"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":"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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/pythonapp.yml:1","Info: no jobLevel write permissions found"],"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":"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":"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":"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":"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":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"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"}},{"name":"Vulnerabilities","score":5,"reason":"5 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2021-856 / GHSA-5545-2q6w-2gh6","Warn: Project is vulnerable to: GHSA-6p56-wp2h-9hxr","Warn: Project is vulnerable to: PYSEC-2019-108 / GHSA-9fq2-x9r6-wfmf","Warn: Project is vulnerable to: PYSEC-2021-857 / GHSA-f7c7-j99h-c22f","Warn: Project is vulnerable to: GHSA-fpfv-jqm9-f5jm"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-20T14:26:11.597Z","repository_id":57436147,"created_at":"2025-08-20T14:26:11.597Z","updated_at":"2025-08-20T14:26:11.597Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271506955,"owners_count":24771822,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-21T02:00:08.990Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["pypi"],"created_at":"2024-11-15T01:26:47.331Z","updated_at":"2025-08-21T16:24:01.557Z","avatar_url":"https://github.com/kmedian.png","language":"Jupyter Notebook","readme":"[![Build Status](https://travis-ci.org/kmedian/grouplabelencode.svg?branch=master)](https://travis-ci.org/kmedian/grouplabelencode)\n[![Binder](https://mybinder.org/badge.svg)](https://mybinder.org/v2/gh/kmedian/grouplabelencode/master?urlpath=lab)\n[![Gitpod - Code Now](https://img.shields.io/badge/Gitpod-code%20now-blue.svg?longCache=true)](https://gitpod.io#https://github.com/kmedian/grouplabelencode)\n\n# grouplabelencode\n\n\n## Table of Contents\n* [Installation](#installation)\n* [Usage](#usage)\n* [Commands](#commands)\n* [Support](#support)\n* [Contributing](#contributing)\n\n\n## Installation\nThe `grouplabelencode` [git repo](http://github.com/kmedian/grouplabelencode) is available as [PyPi package](https://pypi.org/project/grouplabelencode)\n\n```\npip install grouplabelencode\n```\n\n\n## Usage\n\n```\nfrom grouplabelencode import grouplabelencode\ndata = ['a', 'b', 3, 3, 'b', 'b', 'e', 'z', 'd', 'a', 'unknown']  # raw data\ngroups = [['a', 'b', 3], ['d', 'e']]  # mapping for 2 groups\nencoded = grouplabelencode(data, groups, nastate=True)\nprint(encoded)\n# [0, 0, 0, 0, 0, 0, 1, 2, 1, 0, 2]  # 2: NA state\n```\n\nCheck the [examples](http://github.com/kmedian/grouplabelencode/examples) folder for notebooks.\n\n\n## Commands\nInstall a virtual environment\n\n```\npython3 -m venv .venv  # see note below\nsource .venv/bin/activate\npip3 install --upgrade pip\npip3 install -r requirements.txt\npip3 install jupyterlab  # and other packages required for demo\n```\n\n(If your git repo is stored in a folder with whitespaces, then don't use the subfolder `.venv`. Use an absolute path without whitespaces.)\n\nPython commands\n\n* Jupyter for the examples: `jupyter lab`\n* Check syntax: `flake8 --ignore=F401 --exclude=$(grep -v '^#' .gitignore | xargs | sed -e 's/ /,/g')`\n* Run Unit Tests: `python -W ignore -m unittest discover`\n* Upload to PyPi with twine: `python setup.py sdist \u0026\u0026 twine upload -r pypi dist/*`\n\nClean up \n\n```\nfind . -type f -name \"*.pyc\" | xargs rm\nfind . -type d -name \"__pycache__\" | xargs rm -r\nrm -r .pytest_cache\nrm -r .venv\n```\n\n\n## Debugging\n* Notebooks to profile python code are in the [profile](profile) folder\n\n\n## Support\nPlease [open an issue](https://github.com/kmedian/grouplabelencode/issues/new) for support.\n\n\n## Contributing\nPlease contribute using [Github Flow](https://guides.github.com/introduction/flow/). Create a branch, add commits, and [open a pull request](https://github.com/kmedian/grouplabelencode/compare/).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkmedian%2Fgrouplabelencode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkmedian%2Fgrouplabelencode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkmedian%2Fgrouplabelencode/lists"}