GithubHelp home page GithubHelp logo

ntts's Introduction

There is No Time to Sleep

没时间睡觉了

还在为 Ctrl+CTraceback 停在 time.sleep() 上而感到尴尬吗?在你的项目中引入这个包吧,它会把所有的 KeyboardInterrupt 输出 Traceback 信息的最后一行替换成 model.py,让你的代码看起来就像是在跑一个神经网络模型一样酷炫!

你只需要:pip install NTTS, 然后在你的入口文件代码中 import 它,其余的什么也不用做!

或者,如果你想使用最新的版本, Clone本项目到你的工程目录下,在项目根目录下运行:

pip install -e .

然后你的代码在 Ctrl+C 时就会给出漂亮的输出

Traceback (most recent call last):
  File "d:/GitHub/test.py", line 14, in <module>
    a()
  File "d:/GitHub/test.py", line 5, in a
    b()
  File "d:/GitHub/test.py", line 9, in b
    c()
  File "C:/Users/admin/anaconda3/envs/torch/lib/site-packages/mindx/model.py", line 23, in c
    Model.inference(img)
KeyboardInterrupt

如果你想实现自动导入而无需 import NTTS,你需要将项目根目录的 ntts.pth 文件拷贝到 site-packages 路径下。如/home/username/anaconda3/envs/conda_env_name/lib/python3.10/site-packages/

Time to Sleep

是时候睡觉了

明天就要 demo 了,而你还在纠结请求处理的异步和阻塞问题?在你的项目中引入这个附属包吧!它会把 Traceback 信息的最后一行替换成 time.sleep(),轻松解决确定性时延😊,让你和你的代码都能享受24小时充足的睡眠!

import NTTS.tts

然后你的代码在 Ctrl+C 时就会给出漂亮的输出

Traceback (most recent call last):
  File "/workspaces/main.py", line 11, in <module>
    write()
  File "/root/anaconda3/lib/python3.9/site-packages/mindx/__init__.py", line 57, in write
    time.sleep(6)
KeyboardInterrupt

Project Development

build and upload pip package:

python setup.py bdist_wheel
twine upload dist/*

感谢支持

Stargazers repo roster for @JadyXuan/NTTS

感谢贡献者:

JadyXuan
JadyXuan
wufei-png
Wu Fei
deanyxu
DX
znsoooo
Shixian Li
qhy040404
qhy040404

ntts's People

Contributors

jadyxuan avatar wufei-png avatar deanyxu avatar demoliisher avatar znsoooo avatar github-actions[bot] avatar qhy040404 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.