Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed Traceback output indention errors and applied 『盘古之白』 for whole content. #34

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 18 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,45 +2,46 @@

### 没时间睡觉了

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

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

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

```
pip install -e .
```

然后你的代码在ctrl+C时就会给出漂亮的输出
然后你的代码在 `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)
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/`
如果你想实现自动导入而无需 `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小时充足的睡眠!
明天就要 demo 了,而你还在纠结请求处理的异步和阻塞问题?在你的项目中引入这个附属包吧!它会把 Traceback 信息的最后一行替换成 `time.sleep()`,轻松解决`确定性时延😊`,让你和你的代码都能享受24小时充足的睡眠!

```python
import NTTS.tts
```

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

```
Traceback (most recent call last):
Expand All @@ -54,10 +55,12 @@ KeyboardInterrupt
## Project Development

### build and upload pip package:

```
python setup.py bdist_wheel
twine upload dist/*
```

## 感谢支持
[![Stargazers repo roster for @JadyXuan/NTTS](https://reporoster.com/stars/JadyXuan/NTTS)](https://github.com/JadyXuan/NTTS/stargazers)

Expand Down Expand Up @@ -104,4 +107,4 @@ twine upload dist/*
</tr>
<tbody>
</table>
<!-- readme: collaborators,contributors -end -->
<!-- readme: collaborators,contributors -end -->