{"id":34055194,"url":"https://github.com/hansalemaos/duplicateindexer","last_synced_at":"2026-04-09T00:33:00.559Z","repository":{"id":194427080,"uuid":"690850801","full_name":"hansalemaos/duplicateindexer","owner":"hansalemaos","description":"Find duplicates in multiple lists and return their indices and values.","archived":false,"fork":false,"pushed_at":"2023-09-13T02:30:02.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-03T06:12:42.814Z","etag":null,"topics":["duplicates","fast","find","hash","index","list","list-of-lists","locate","nested","python","set"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/duplicateindexer/","language":"Python","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/hansalemaos.png","metadata":{"files":{"readme":"README.MD","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-09-13T02:29:01.000Z","updated_at":"2023-09-13T02:31:03.000Z","dependencies_parsed_at":"2023-11-15T06:33:12.242Z","dependency_job_id":null,"html_url":"https://github.com/hansalemaos/duplicateindexer","commit_stats":{"total_commits":2,"total_committers":1,"mean_commits":2.0,"dds":0.0,"last_synced_commit":"b27ca67a4d4f4b4405c4c1f32903d1628d4059b4"},"previous_names":["hansalemaos/duplicateindexer"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hansalemaos/duplicateindexer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hansalemaos%2Fduplicateindexer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hansalemaos%2Fduplicateindexer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hansalemaos%2Fduplicateindexer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hansalemaos%2Fduplicateindexer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hansalemaos","download_url":"https://codeload.github.com/hansalemaos/duplicateindexer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hansalemaos%2Fduplicateindexer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31580025,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"ssl_error","status_checked_at":"2026-04-08T14:31:17.202Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["duplicates","fast","find","hash","index","list","list-of-lists","locate","nested","python","set"],"created_at":"2025-12-14T02:47:17.404Z","updated_at":"2026-04-09T00:33:00.545Z","avatar_url":"https://github.com/hansalemaos.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Find duplicates in multiple lists and return their indices and values.\r\n\r\n## Tested against Windows 10 / Python 3.10 / Anaconda\r\n\r\n### pip install duplicateindexer\r\n\r\n\r\nFind duplicates in multiple lists and return their indices and values.\r\n\r\nThis function takes multiple lists as input and finds the common elements among them.\r\nIt then returns a list of dictionaries, where each dictionary corresponds to a common element.\r\nEach dictionary contains keys for the input lists (0, 1, 2, ...), and the values are nested dictionaries.\r\nThese nested dictionaries have keys 'indices' and 'value', which represent the indices of the common\r\nelement in the input lists and the values of that common element in the input lists, respectively.\r\n\r\n\r\n\r\n```python\r\n\r\nArgs:\r\n\t*args: Multiple lists containing elements to be compared.\r\n\r\nReturns:\r\n\tList of dictionaries, where each dictionary represents a common element and its indices and values\r\n\tin the input lists.\r\n\r\nExamples:\r\n\t\u003e\u003e\u003e aa = [[1, 2, 3], [4, 5, 6], [7, 8, 9], [10, 11, 12]]\r\n\t\u003e\u003e\u003e bb = [\r\n\t...     [1, 2, 3],\r\n\t...     [4, 5, 6],\r\n\t...     [7, 8, 9],\r\n\t...     [10, 11, 12],\r\n\t...     [13, 14, 15],\r\n\t...     [1, 2, 3],\r\n\t...     [4, 5, 6],\r\n\t...     [7, 8, 9],\r\n\t...     [10, 11, 12],\r\n\t...     [13, 14, 15],\r\n\t... ]\r\n\t\u003e\u003e\u003e l = find_duplicates_in_multiple_lists(aa, bb)\r\n\t\u003e\u003e\u003e print(l)\r\n\t[\r\n\t\t{\r\n\t\t\t0: {\r\n\t\t\t\t0: {'indices': [1], 'value': [4, 5, 6]},\r\n\t\t\t\t1: {'indices': [1, 6], 'value': [4, 5, 6]}\r\n\t\t\t}\r\n\t\t},\r\n\t\t{\r\n\t\t\t1: {\r\n\t\t\t\t0: {'indices': [0], 'value': [1, 2, 3]},\r\n\t\t\t\t1: {'indices': [0, 5], 'value': [1, 2, 3]}\r\n\t\t\t}\r\n\t\t},\r\n\t\t{\r\n\t\t\t2: {\r\n\t\t\t\t0: {'indices': [2], 'value': [7, 8, 9]},\r\n\t\t\t\t1: {'indices': [2, 7], 'value': [7, 8, 9]}\r\n\t\t\t}\r\n\t\t},\r\n\t\t{\r\n\t\t\t3: {\r\n\t\t\t\t0: {'indices': [3], 'value': [10, 11, 12]},\r\n\t\t\t\t1: {'indices': [3, 8], 'value': [10, 11, 12]}\r\n\t\t\t}\r\n\t\t}\r\n\t]\r\n\r\n\t\u003e\u003e\u003e cc = list(range(1, 20))\r\n\t\u003e\u003e\u003e dd = list(range(11, 30))\r\n\t\u003e\u003e\u003e l1 = find_duplicates_in_multiple_lists(cc, dd)\r\n\t\u003e\u003e\u003e print(l1)\r\n\t[\r\n\t\t{0: {0: {'indices': [10], 'value': 11}, 1: {'indices': [0], 'value': 11}}},\r\n\t\t{1: {0: {'indices': [11], 'value': 12}, 1: {'indices': [1], 'value': 12}}},\r\n\t\t{2: {0: {'indices': [12], 'value': 13}, 1: {'indices': [2], 'value': 13}}},\r\n\t\t{3: {0: {'indices': [13], 'value': 14}, 1: {'indices': [3], 'value': 14}}},\r\n\t\t{4: {0: {'indices': [14], 'value': 15}, 1: {'indices': [4], 'value': 15}}},\r\n\t\t{5: {0: {'indices': [15], 'value': 16}, 1: {'indices': [5], 'value': 16}}},\r\n\t\t{6: {0: {'indices': [16], 'value': 17}, 1: {'indices': [6], 'value': 17}}},\r\n\t\t{7: {0: {'indices': [17], 'value': 18}, 1: {'indices': [7], 'value': 18}}},\r\n\t\t{8: {0: {'indices': [18], 'value': 19}, 1: {'indices': [8], 'value': 19}}}\r\n\t]\r\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhansalemaos%2Fduplicateindexer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhansalemaos%2Fduplicateindexer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhansalemaos%2Fduplicateindexer/lists"}