Category: Tools

2 Posts

WordPress使用Markdown书写LaTex公式
WordPress使用Markdown书写LaTex公式 参考文献:https://snailwish.com/252/comment-page-1/#comment-333 环境 WordPress 插件1:WP Githuber MD (By Terry Lin) 插件2:KaTeX (By Thomas Churchman) 用法 使用markdown正常书写blog: "original.md"。 改变源文件"original.md"语法结构,把公式独立出来,使用KaTeX进行渲染。 在Python 环境下运行一下代码(使用前请删除代码中的¥)。 之前标准的公式格式 改变为 "katex"插件需要的的格式 代码: import time import re # please delete ¥ def convert(input_name, output_name): try: with open(input_name, 'r', encoding='utf8') as fr, open(output_name, 'w', encoding='utf8') as fw: data = fr.read()…
Python 代码格式化工具
项目地址:https://pypi.org/project/autopep8/ 参考文章:https://www.cnblogs.com/wuyongcong/p/9066531.html Autopep8 autopep8 自动格式化 Python 代码以符合 PEP 8 风格指南。它使用 pycodestyle 工具来确定代码的哪些部分需要被格式化。autopep8 能够修复大多数由 pycodestyle 报告的格式化问题。 安装 pip install autopep8 在命令行使用 autopep8 --in-place --aggressive --aggressive YOUR_PYTHON_FILE.py 在PyCharm 配置使用 配置 打开菜单:File ---> Settings ---> Tools ---> External Tools 窗体左上角有一个 + 号 Name: autopep8 # 或者其他名字 Program: autopep8 # 前提必须先安装 Arguments: --in-place --aggressive…