{"id":13615125,"url":"https://github.com/JadyXuan/NTTS","last_synced_at":"2025-04-13T20:33:07.065Z","repository":{"id":239759157,"uuid":"800485650","full_name":"JadyXuan/NTTS","owner":"JadyXuan","description":"NO TIME TO SLEEP ","archived":false,"fork":false,"pushed_at":"2024-05-26T03:20:43.000Z","size":30,"stargazers_count":639,"open_issues_count":17,"forks_count":24,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-10-02T10:15:30.060Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/JadyXuan.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-14T12:28:13.000Z","updated_at":"2024-10-01T15:16:04.000Z","dependencies_parsed_at":"2024-06-11T12:14:51.057Z","dependency_job_id":"a59c1855-5bd4-4219-aac4-1aae91253ac6","html_url":"https://github.com/JadyXuan/NTTS","commit_stats":null,"previous_names":["jadyxuan/ntts"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JadyXuan%2FNTTS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JadyXuan%2FNTTS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JadyXuan%2FNTTS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JadyXuan%2FNTTS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JadyXuan","download_url":"https://codeload.github.com/JadyXuan/NTTS/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223605576,"owners_count":17172505,"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":[],"created_at":"2024-08-01T20:01:09.664Z","updated_at":"2024-11-07T23:30:47.135Z","avatar_url":"https://github.com/JadyXuan.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# There is No Time to Sleep\n\n### 没时间睡觉了\n\n还在为ctrl+C时Traceback停在time.sleep()上而感到尴尬吗？在你的项目中引入这个包吧，它会把所有的KeyboardInterrupt输出traceback信息的最后一行替换成model.py，让你的代码看起来就像是在跑一个神经网络模型一样酷炫！\n\n你只需要：`pip install NTTS`, 然后在你的入口文件代码中import它，其余的什么也不用做！\n\n或者，如果你想使用最新的版本, Clone本项目到你的工程目录下，在项目根目录下运行：\n\n```\npip install -e .\n```\n\n然后你的代码在ctrl+C时就会给出漂亮的输出\n\n```\nTraceback (most recent call last):\nFile \"d:/GitHub/test.py\", line 14, in \u003cmodule\u003e\na()\nFile \"d:/GitHub/test.py\", line 5, in a\nb()\nFile \"d:/GitHub/test.py\", line 9, in b\nc()\nFile \"C:/Users/admin/anaconda3/envs/torch/lib/site-packages/mindx/model.py\", line 23, in c\nModel.inference(img)\nKeyboardInterrupt\n```\n\n如果你想实现自动导入而无需 `import NTTS`，你需要将项目根目录的ntts.pth文件拷贝到site-packages路径下。如`/home/username/anaconda3/envs/conda_env_name/lib/python3.10/site-packages/`\n\n\n\n# Time to Sleep\n\n### 是时候睡觉了\n\n明天就要demo了，而你还在纠结请求处理的异步和阻塞问题？在你的项目中引入这个附属包吧！它会把traceback信息的最后一行替换成`time.sleep()`，轻松解决`确定性时延😊`，让你和你的代码都能享受24小时充足的睡眠！\n```python\nimport NTTS.tts\n```\n\n然后你的代码在ctrl+C时就会给出漂亮的输出\n\n```\nTraceback (most recent call last):\n  File \"/workspaces/main.py\", line 11, in \u003cmodule\u003e\n    write()\n  File \"/root/anaconda3/lib/python3.9/site-packages/mindx/__init__.py\", line 57, in write\n    time.sleep(6)\nKeyboardInterrupt\n```\n\n## Project Development\n\n### build and upload pip package:\n```\npython setup.py bdist_wheel\ntwine upload dist/*\n```\n## 感谢支持\n[![Stargazers repo roster for @JadyXuan/NTTS](https://reporoster.com/stars/JadyXuan/NTTS)](https://github.com/JadyXuan/NTTS/stargazers)\n\n## 感谢贡献者：\n\u003c!-- readme: collaborators,contributors -start --\u003e\n\u003ctable\u003e\n\t\u003ctbody\u003e\n\t\t\u003ctr\u003e\n            \u003ctd align=\"center\"\u003e\n                \u003ca href=\"https://github.com/JadyXuan\"\u003e\n                    \u003cimg src=\"https://avatars.githubusercontent.com/u/35390572?v=4\" width=\"100;\" alt=\"JadyXuan\"/\u003e\n                    \u003cbr /\u003e\n                    \u003csub\u003e\u003cb\u003eJadyXuan\u003c/b\u003e\u003c/sub\u003e\n                \u003c/a\u003e\n            \u003c/td\u003e\n            \u003ctd align=\"center\"\u003e\n                \u003ca href=\"https://github.com/wufei-png\"\u003e\n                    \u003cimg src=\"https://avatars.githubusercontent.com/u/63766429?v=4\" width=\"100;\" alt=\"wufei-png\"/\u003e\n                    \u003cbr /\u003e\n                    \u003csub\u003e\u003cb\u003eWu Fei\u003c/b\u003e\u003c/sub\u003e\n                \u003c/a\u003e\n            \u003c/td\u003e\n            \u003ctd align=\"center\"\u003e\n                \u003ca href=\"https://github.com/deanyxu\"\u003e\n                    \u003cimg src=\"https://avatars.githubusercontent.com/u/12771139?v=4\" width=\"100;\" alt=\"deanyxu\"/\u003e\n                    \u003cbr /\u003e\n                    \u003csub\u003e\u003cb\u003eDX\u003c/b\u003e\u003c/sub\u003e\n                \u003c/a\u003e\n            \u003c/td\u003e\n            \u003ctd align=\"center\"\u003e\n                \u003ca href=\"https://github.com/znsoooo\"\u003e\n                    \u003cimg src=\"https://avatars.githubusercontent.com/u/34830785?v=4\" width=\"100;\" alt=\"znsoooo\"/\u003e\n                    \u003cbr /\u003e\n                    \u003csub\u003e\u003cb\u003eShixian Li\u003c/b\u003e\u003c/sub\u003e\n                \u003c/a\u003e\n            \u003c/td\u003e\n            \u003ctd align=\"center\"\u003e\n                \u003ca href=\"https://github.com/qhy040404\"\u003e\n                    \u003cimg src=\"https://avatars.githubusercontent.com/u/45379733?v=4\" width=\"100;\" alt=\"qhy040404\"/\u003e\n                    \u003cbr /\u003e\n                    \u003csub\u003e\u003cb\u003eqhy040404\u003c/b\u003e\u003c/sub\u003e\n                \u003c/a\u003e\n            \u003c/td\u003e\n\t\t\u003c/tr\u003e\n\t\u003ctbody\u003e\n\u003c/table\u003e\n\u003c!-- readme: collaborators,contributors -end --\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJadyXuan%2FNTTS","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FJadyXuan%2FNTTS","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJadyXuan%2FNTTS/lists"}