intersection-grouper


Nameintersection-grouper JSON
Version 0.11 PyPI version JSON
download
home_pagehttps://github.com/hansalemaos/intersection_grouper
SummaryGroups lists by common intersections
upload_time2022-12-31 09:03:18
maintainer
docs_urlNone
authorJohannes Fischer
requires_python
licenseMIT
keywords group intersections lists
VCS
bugtrack_url
requirements flatten_everything
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
# Groups lists by common intersections



```python

pip install intersection-grouper

```





```python



from intersection_grouper import group_lists_with_intersections



listgroup = [

    [5, 3, 4, 5],

    [5, 11, 12, 3],

    [52, 34],

    [34, 111, 112],

    [1000, 300],

    [300, 5000],

]



x = group_lists_with_intersections(listgroup, keep_duplicates=True)

print(x)

[(34, 34, 52, 111, 112), (300, 300, 1000, 5000), (3, 3, 4, 5, 5, 5, 11, 12)]



x2 = group_lists_with_intersections(listgroup, keep_duplicates=False)

print(x2)

[(34, 52, 111, 112), (300, 1000, 5000), (3, 4, 5, 11, 12)]



```


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/hansalemaos/intersection_grouper",
    "name": "intersection-grouper",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "group,intersections,lists",
    "author": "Johannes Fischer",
    "author_email": "<aulasparticularesdealemaosp@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/b8/22/b536d2f982d52c0e46fd2f8642034e41b94f31006c337fd14c1ba83ac400/intersection_grouper-0.11.tar.gz",
    "platform": null,
    "description": "\n# Groups lists by common intersections\n\n\n\n```python\n\npip install intersection-grouper\n\n```\n\n\n\n\n\n```python\n\n\n\nfrom intersection_grouper import group_lists_with_intersections\n\n\n\nlistgroup = [\n\n    [5, 3, 4, 5],\n\n    [5, 11, 12, 3],\n\n    [52, 34],\n\n    [34, 111, 112],\n\n    [1000, 300],\n\n    [300, 5000],\n\n]\n\n\n\nx = group_lists_with_intersections(listgroup, keep_duplicates=True)\n\nprint(x)\n\n[(34, 34, 52, 111, 112), (300, 300, 1000, 5000), (3, 3, 4, 5, 5, 5, 11, 12)]\n\n\n\nx2 = group_lists_with_intersections(listgroup, keep_duplicates=False)\n\nprint(x2)\n\n[(34, 52, 111, 112), (300, 1000, 5000), (3, 4, 5, 11, 12)]\n\n\n\n```\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Groups lists by common intersections",
    "version": "0.11",
    "project_urls": {
        "Homepage": "https://github.com/hansalemaos/intersection_grouper"
    },
    "split_keywords": [
        "group",
        "intersections",
        "lists"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d1bd9ae8f756dbf90356a23685febffe71f5b14495fa9bdca2a1cdeaaeeaf639",
                "md5": "9780003743a0f31b2431dc21f84bd11d",
                "sha256": "dd40a217babc2e97ec06920d29416602d66e85bc6cbf43c26a7ee9983b404c7b"
            },
            "downloads": -1,
            "filename": "intersection_grouper-0.11-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "9780003743a0f31b2431dc21f84bd11d",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 4718,
            "upload_time": "2022-12-31T09:03:16",
            "upload_time_iso_8601": "2022-12-31T09:03:16.932580Z",
            "url": "https://files.pythonhosted.org/packages/d1/bd/9ae8f756dbf90356a23685febffe71f5b14495fa9bdca2a1cdeaaeeaf639/intersection_grouper-0.11-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b822b536d2f982d52c0e46fd2f8642034e41b94f31006c337fd14c1ba83ac400",
                "md5": "ab6fae829cbd9fa59839d69b2c35d82b",
                "sha256": "a8eb76770ef50f9129e740e6b93df5d3f6dbfbff67e69a1e54389b33be54748e"
            },
            "downloads": -1,
            "filename": "intersection_grouper-0.11.tar.gz",
            "has_sig": false,
            "md5_digest": "ab6fae829cbd9fa59839d69b2c35d82b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 3365,
            "upload_time": "2022-12-31T09:03:18",
            "upload_time_iso_8601": "2022-12-31T09:03:18.262622Z",
            "url": "https://files.pythonhosted.org/packages/b8/22/b536d2f982d52c0e46fd2f8642034e41b94f31006c337fd14c1ba83ac400/intersection_grouper-0.11.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-12-31 09:03:18",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "hansalemaos",
    "github_project": "intersection_grouper",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "flatten_everything",
            "specs": []
        }
    ],
    "lcname": "intersection-grouper"
}
        
Elapsed time: 0.25680s