> For the complete documentation index, see [llms.txt](https://lwang010.gitbook.io/longw/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://lwang010.gitbook.io/longw/mlops/chap-4.-build-toolkit-for-team-or-yourself/tips/code-style.md).

# pylint: code style

* Use the pylint plugin as an external tool to improve the code style.&#x20;
* remove the dead code

```
# check the lint
grep '.\{80\}' csim.c 
wc -L csim.c 

# check the leak
valgrind --leak-check=full --show-reachable=yes ./csim -s 14 -E 1024 -b 3 -t traces/trans.trace

# check the magic number

# check the vim
:set tabstop=4
:retab
:set shiftwidth=4
```

Tensorflow code style guide: <https://www.tensorflow.org/community/contribute/code_style>

Reference:

{% embed url="<https://realpython.com/python-code-quality/>" %}

{% embed url="<https://www.thoughtworks.com/insights/blog/coding-habits-data-scientists>" %}

{% embed url="<https://pbpython.com/best-practices.html>" %}

{% embed url="<https://news.ycombinator.com/item?id=9896369>" %}
