{"id":32649705,"url":"https://github.com/seperman/bad-ideas","last_synced_at":"2025-10-31T06:57:17.163Z","repository":{"id":57413748,"uuid":"87226047","full_name":"seperman/bad-ideas","owner":"seperman","description":"Python: Bad Ideas","archived":false,"fork":false,"pushed_at":"2017-05-29T04:56:47.000Z","size":11,"stargazers_count":12,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-09-27T07:15:12.368Z","etag":null,"topics":["bad","bad-idea","filter","garbage-collector","grep","ideas","memory-leak","python","resurrect"],"latest_commit_sha":null,"homepage":"http://zepworks.com","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/seperman.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}},"created_at":"2017-04-04T19:20:39.000Z","updated_at":"2025-02-03T11:28:57.000Z","dependencies_parsed_at":"2022-09-05T03:51:42.486Z","dependency_job_id":null,"html_url":"https://github.com/seperman/bad-ideas","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/seperman/bad-ideas","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seperman%2Fbad-ideas","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seperman%2Fbad-ideas/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seperman%2Fbad-ideas/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seperman%2Fbad-ideas/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/seperman","download_url":"https://codeload.github.com/seperman/bad-ideas/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seperman%2Fbad-ideas/sbom","scorecard":{"id":811626,"data":{"date":"2025-08-11","repo":{"name":"github.com/seperman/bad-ideas","commit":"0fde67c1aac462f88e88a33342d0f1a54d78827c"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"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":"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":"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":"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":"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":-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":"Code-Review","score":0,"reason":"Found 0/9 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":"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":"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":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"}}]},"last_synced_at":"2025-08-23T13:20:34.322Z","repository_id":57413748,"created_at":"2025-08-23T13:20:34.322Z","updated_at":"2025-08-23T13:20:34.322Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281818134,"owners_count":26566878,"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-10-30T02:00:06.501Z","response_time":61,"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":["bad","bad-idea","filter","garbage-collector","grep","ideas","memory-leak","python","resurrect"],"created_at":"2025-10-31T06:56:55.321Z","updated_at":"2025-10-31T06:57:17.145Z","avatar_url":"https://github.com/seperman.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bad Ideas\n\n![License](https://img.shields.io/pypi/l/bad-ideas.svg?version=latest)\n[![Build Status](https://travis-ci.org/seperman/bad-ideas.svg?branch=master)](https://travis-ci.org/seperman/bad-ideas)\n\n### *It is a good idea to install bad ideas!*\n\nBad ideas include a collection of bad Python 3 ideas. This package is not compatible with Python 2.\n\nBad Ideas are prepared for PyCon 2017 talk: [Magic Method, on the wall, who, now, is the `__fairest__` one of all?](https://us.pycon.org/2017/schedule/presentation/486/). You can read the proposal for this talk on the [Zepworks blog](http://zepworks.com/blog/magic-method-on-the-wall/)\n\nIf you have any bad ideas that you want to be added here, let me know!\n\n# Disclaimer\n\nThis code is for educational purposes ONLY. Use it at your own risk.\n\n# Install\n\n`pip install bad-ideas`\n\n# Usage\n\n## Type less by in-place editing of numbers\nAvoid the carpal tunnels, use mutable integers!\n\n```py\n\u003e\u003e\u003e from bad import number\n\u003e\u003e\u003e num = number(10)\n\u003e\u003e\u003e num + 3\n13\n\u003e\u003e\u003e num\n13\n\u003e\u003e\u003e 3 - num\n-10\n\u003e\u003e\u003e num\n-10\n\u003e\u003e\u003e 2 / num\n-0.2\n\u003e\u003e\u003e num\n-0.2\n```\n\n## Filter that returns list instead of generator when printed\n\n```py\n\u003e\u003e\u003e from bad import filtered\n\u003e\u003e\u003e foo = [1, 2, 3, 5, 6, 7]\n\u003e\u003e\u003e filtered(lambda x: x % 3 == 0, foo)\n[3, 6]\n```\n\n## Pipe and grep\n\n```py\n\u003e\u003e\u003e from bad import grep\n\u003e\u003e\u003e LINES = \"\"\"\n... Whether you're new to programming or\n... an experienced developer, it's easy\n... to learn and use Python.\n... Checkout jobs.python.org\n... for Python jobs.\n... \"\"\"\n\u003e\u003e\u003e LINES | grep('Python')\n['to learn and use python.', 'checkout jobs.python.org', 'for python jobs.']\n\u003e\u003e\u003e LINES | grep('Python') | grep('jobs')\n['checkout jobs.python.org', 'for python jobs.']\n```\n\n## Undeletable\nNeed some memory leaking? Subclass the Undeletable to introduce \"persistent\" objects that won't go away!\n\n```py\n\u003e\u003e\u003e from bad import Undeletable\n\u003e\u003e\u003e obj = Undeletable()\n\u003e\u003e\u003e del obj\nYou can't delete me!\n\u003e\u003e\u003e obj\n\u003cundeletable:4127530384\u003e\n```\n\nNote that you can have many references to the same object. You can still delete all the references except the last one:\n\n```py\n\u003e\u003e\u003e obj2 = obj\n\u003e\u003e\u003e del obj2\n\u003e\u003e\u003e obj2\nTraceback (most recent call last):\n  File \"\u003cstdin\u003e\", line 1, in \u003cmodule\u003e\nNameError: name 'obj2' is not defined\n\u003e\u003e\u003e obj\n\u003cundeletable:4127530384\u003e\n```\n\n# Contribute\n\n## Have a bad idea? Let me know!\n\nMake a PR or open a ticket!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseperman%2Fbad-ideas","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fseperman%2Fbad-ideas","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseperman%2Fbad-ideas/lists"}