國立**大學吳維漢教授一著「簡明 Python 學習講義」的習題解答集、暨 MCL 工讀生合著紀念集。
Make sure you already have a XeLaTeX complier (to write documents), and a proper Python interpreter (to write codes).
Then, clone the project first (with submodules):
git clone --recurse-submodules https://github.com/OpenMCL/ziyou-python-write-ups
Enter the project, and run the following command to build the document:
xelatex docs/main.tex
xelatex docs/main.tex
or simply run make docs
if you have make
.
This would output a pdf file called main.pdf
at the project root folder.
We suggest using Python 3.8 or higher versions.
To install all requirements, run the following command:
poetry install --with dev
If you do not have poetry, you can also install all requirements with the following command:
pip install numpy matplotlib black flake8 flake8-black flake8-bugbear
After the above installation, you can run flake8
to check code format:
flake8 src
or simply run make lint
if you have make
.
We would love to accept your patches to this project. There are some guidelines you need to follow:
- Please follow PEP8. We recommend you check your patch with Flake8.
- In addition, please format your code with Black.
We recommend you use VS Code to write code
with ease. You can put the following settings to
${workspaceFolder}/.vscode/settings.json
:
{
"[python]": {
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": true
}
},
"python.formatting.provider": "black",
"python.linting.enabled": true,
"python.linting.flake8Enabled": true
}
All submissions require review. We use GitHub (or GitLab) pull requests and review systems to meet these requirements. See help here for more information on using GitHub pull requests.
- All Python implementations are released under the BSD-3-Clause License.
- The LaTeX template ElegantBook used in this project is released under the LaTeX Project Public License, v1.3c or later.
- Both fonts 源流明體 and 源樣黑體 used in this project are released under the SIP Open Font License Version 1.1.