From 61fd18bd9ac54aeb515a7976925cde7ab69b3b70 Mon Sep 17 00:00:00 2001 From: 100gle <569590461@qq.com> Date: Tue, 19 Apr 2022 21:31:40 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20=E6=9B=B4=E6=96=B0README=E8=AF=B4?= =?UTF-8?q?=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 79 ++++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 72 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index f47549d..1ee4e0f 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,80 @@ # 《100 小时后请叫我程序员》教程源码使用说明 -TODO +本仓库为少数派平台 [《100 小时后请叫我程序员》](https://sspai.com/series/271) 教程内容的相关源码、以及素材仓库,教程内的大部分示例代码都可通过对应的目录找到。 -# 环境依赖安装 +在使用过程中如有任何问题欢迎在少数派私信我(推荐方式),或者在本仓库上面的 Issues 页面中提问。 -TODO +在使用前需要将本仓库的项目下载后再通过 IDE 打开。 -# 项目使用 +## 环境依赖安装 -TODO +参照教程内容安装好 Python 解释器、镜像配置以及设置相关的 IDE 之后,进入到该项目路径下,使用对应 Python 解释器的 `pip` 命令来进行安装 `requirements.txt` 文件中的依赖。 -# LICENSE +### 查看当前 Python 解释器路径 -TODO +Windows: + +```powershell +where.exe python3 +# or where.exe python +``` + +macOS: + +```bash +which python3 +# or which python +``` + +### 运行 pip 命令 + +方式一(推荐):通过指定 Python 解释器来运行 + +```bash +cd ./sspai-100-hours-series-python +python3 -m pip install -r ./requirement.txt +``` + +方式二: + +```bash +pip install -r ./requirement.txt +``` + +## 项目使用 + +教程内容中所涉及到的 `.ipynb` 结尾的 Notebook 文件需要通过 Jupyter Notebook 打开,即在当前目录下运行如下代码启动 Jupyter 服务,然后在当中以 REPL 方式使用: + +```bash +cd ./sspai-100-hours-series-python +python3 -m jupyter notebook . +# or jupyter notebook . +``` + +除此之外,如果是以 `.py` 结尾的 Python 代码文件,则可以直接通过 IDE 进行运行。 + +## LICENSE + +```plain +MIT License + +Copyright (c) 2022-present 100gle + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +```