<!--- Template
👑
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| # -*- coding: utf-8 -*- | |
| """PDF Conversor powered by Qt5.""" | |
| from uuid import uuid4 | |
| from PyQt5.QtCore import QUrl |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from json import dumps | |
| def json_pretty(json_dict: dict) -> str: | |
| """Pretty-Printing JSON data from dictionary to string.""" | |
| _json = dumps(json_dict, sort_keys=1, indent=4, separators=(",\n", ": ")) | |
| posible_ends = tuple('true false , " ] 0 1 2 3 4 5 6 7 8 9 \n'.split(" ")) | |
| max_indent, justified_json = 1, "" | |
| for json_line in _json.splitlines(): | |
| if len(json_line.split(":")) >= 2 and json_line.endswith(posible_ends): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| # -*- coding: utf-8 -*- | |
| """Templar is a tiny Template Engine that Render and Runs native Python.""" | |
| import re | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| # -*- coding: utf-8 -*- | |
| """HTTP Serve with LiveReload.""" | |
| import os | |
| from webbrowser import open_new_tab |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| # -*- coding: utf-8 -*- | |
| """Stealth Strings, hidden and dangerous.""" | |
| import base64 | |
| import binascii | |
| import codecs # importing codecs is optional, it will work ok if no codecs. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| # -*- coding: utf-8 -*- | |
| """HTML2eBook a tiny function that converts HTML5 to eBook,Mobile Friendly.""" | |
| import os | |
| import zipfile | |
| from getpass import getuser |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| # -*- coding: utf-8 -*- | |
| """Tinyslations, smallest possible Translations from Internet with fallback.""" | |
| from urllib import parse, request | |
| from locale import getdefaultlocale | |
| from json import loads |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def pdb_on_exception(debugger="pdb", limit=100): | |
| """Install handler attach post-mortem pdb console on an exception.""" | |
| pass | |
| def pdb_excepthook(exc_type, exc_val, exc_tb): | |
| traceback.print_tb(exc_tb, limit=limit) | |
| __import__(str(debugger).strip().lower()).post_mortem(exc_tb) | |
| sys.excepthook = pdb_excepthook |