{"id":13469351,"url":"https://github.com/drathier/stack-overflow-import","last_synced_at":"2025-05-14T18:06:08.263Z","repository":{"id":38953718,"uuid":"72152531","full_name":"drathier/stack-overflow-import","owner":"drathier","description":"Import arbitrary code from Stack Overflow as Python modules.","archived":false,"fork":false,"pushed_at":"2022-01-09T00:38:40.000Z","size":33,"stargazers_count":3703,"open_issues_count":12,"forks_count":128,"subscribers_count":61,"default_branch":"master","last_synced_at":"2025-04-13T12:47:00.846Z","etag":null,"topics":["import","stackoverflow"],"latest_commit_sha":null,"homepage":"","language":"Python","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/drathier.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}},"created_at":"2016-10-27T22:15:59.000Z","updated_at":"2025-04-11T11:34:07.000Z","dependencies_parsed_at":"2022-07-21T11:33:12.219Z","dependency_job_id":null,"html_url":"https://github.com/drathier/stack-overflow-import","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drathier%2Fstack-overflow-import","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drathier%2Fstack-overflow-import/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drathier%2Fstack-overflow-import/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drathier%2Fstack-overflow-import/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/drathier","download_url":"https://codeload.github.com/drathier/stack-overflow-import/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254198514,"owners_count":22030965,"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","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":["import","stackoverflow"],"created_at":"2024-07-31T15:01:35.457Z","updated_at":"2025-05-14T18:06:03.232Z","avatar_url":"https://github.com/drathier.png","language":"Python","funding_links":[],"categories":["Python","Libraries, Frameworks and SDKs"],"sub_categories":[],"readme":"StackOverflow Importer\n======================\n\nDo you ever feel like all you’re doing is copy/pasting from Stack\nOverflow?\n\nLet’s take it one step further.\n\n| ``from stackoverflow import quick_sort`` will go through the search\n  results\n| of ``[python] quick sort`` looking for the largest code block that\n  doesn’t\n| syntax error in the highest voted answer from the highest voted\n  question\n| and return it as a module. If that answer doesn’t have any valid\n  python\n| code, it checks the next highest voted answer for code blocks.\n\n.. code:: python\n\n    \u003e\u003e\u003e from stackoverflow import quick_sort, split_into_chunks\n\n    \u003e\u003e\u003e print(quick_sort.sort([1, 3, 2, 5, 4]))\n    [1, 2, 3, 4, 5]\n    \n    \u003e\u003e\u003e print(list(split_into_chunks.chunk(\"very good chunk func\")))\n    ['very ', 'good ', 'chunk', ' func']\n    \n    \u003e\u003e\u003e print(\"I wonder who made split_into_chunks\", split_into_chunks.__author__)\n    I wonder who made split_into_chunks https://stackoverflow.com/a/35107113\n    \n    \u003e\u003e\u003e print(\"but what's the license? Can I really use this?\", quick_sort.__license__)\n    but what's the license? Can I really use this? CC BY-SA 3.0\n    \u003e\u003e\u003e assert(\"nice, attribution!\")\n\nThis module is licensed under whatever license you want it to be as \nlong as the license is compatible with the fact that I blatantly \ncopied multiple lines of code from the Python standard library.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrathier%2Fstack-overflow-import","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdrathier%2Fstack-overflow-import","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrathier%2Fstack-overflow-import/lists"}