https://github.com/zeittresor/py_uncomment
Remove the comment entries of a LLM in the py code
https://github.com/zeittresor/py_uncomment
Last synced: 10 months ago
JSON representation
Remove the comment entries of a LLM in the py code
- Host: GitHub
- URL: https://github.com/zeittresor/py_uncomment
- Owner: zeittresor
- Created: 2025-01-09T18:00:54.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2025-01-09T18:17:39.000Z (12 months ago)
- Last Synced: 2025-01-09T19:25:38.031Z (12 months ago)
- Language: Python
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# py_uncomment
Remove the comment entries of a LLM in the py code
this simple script is removing all the comments a LLM might add to document the python code.
the idea to remove it is to save some tokens.. IMHO each LLM (so far) is somehow limited to a specifyed number of input tokens.
by removing the documentary comments it might be possible to save some of them for ex. if you would like to copy/paste your code to a LLM chat dialog.
usage:
py_uncomment.py [filename]
-> Should create a backup of the original code as [filename].backup.py and a new version with the same name like the sourcecode but without the "#" comments inside.
Its doing the same if you start it without a filename, but in that case a filedialog box should be viewed to select the file you want to be uncommented.
If you past the new sourcecode to a LLM it IMHO needs some less tokens to work with it.
Script Source: https://github.com/zeittresor/py_uncomment