From e2c515acb97ed0812caac2bc915216b8566673e8 Mon Sep 17 00:00:00 2001 From: Chuanyu Xue Date: Thu, 22 Jul 2021 12:03:19 +0800 Subject: [PATCH 1/6] Update README.md --- README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a7212e4..fb05504 100644 --- a/README.md +++ b/README.md @@ -36,4 +36,10 @@ ## 联系方式 知乎 @小雨姑娘 -Email: cs_xcy@126.com \ No newline at end of file +Email: cs_xcy@126.com + +## 关注我们 +
Datawhale是一个专注AI领域的开源组织,以“for the learner,和学习者一起成长”为愿景,构建对学习者最有价值的开源学习社区。关注我们,一起学习成长。
+ +## LICENSE +知识共享许可协议
本作品采用知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议进行许可。 From 2e437f359e118c8bab5f9458ad4c8dfc559076e8 Mon Sep 17 00:00:00 2001 From: mba1398 <26516464+mba1398@users.noreply.github.com> Date: Sun, 5 Sep 2021 12:48:14 +0800 Subject: [PATCH 2/6] =?UTF-8?q?Update=201.=20Python=20=E5=AE=89=E8=A3=85?= =?UTF-8?q?=E5=8F=8A=E5=9F=BA=E6=9C=AC=E8=AF=AD=E6=B3=95.ipynb?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 1. Python 安装及基本语法.ipynb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/1. Python 安装及基本语法.ipynb b/1. Python 安装及基本语法.ipynb index 72e4da8..b1b78fb 100644 --- a/1. Python 安装及基本语法.ipynb +++ b/1. Python 安装及基本语法.ipynb @@ -188,7 +188,7 @@ "常量是编程语言中固定的量,它的值不能改变。例如 2 就表示数字二,不能被修改表示其他值。Python 中的常量包括数字,字符串,逻辑值三种。\n", "\n", "- 数字:整数(例如2),浮点数(例如2.333 或 1e-9 = $1 * 10^{-9}$)\n", - "- 字符串:用单/双/三引号括起来的内容,例如(\\'Hi\\' 或 \\\"Hi\\\" 或 \\'\\'\\'Hi\\'\\'\\')\n", + "- 字符串:用单/双/三引号括起来的内容,例如('Hi' 或 "Hi" 或 '''Hi''')\n", "- 逻辑值:True 代表真, False 代表假\n", "\n", "使用 type( \\* ) 可以查看 \\* 的类型,例如 type(2) 返回 int 表示 2 为 整数。" @@ -1216,4 +1216,4 @@ }, "nbformat": 4, "nbformat_minor": 5 -} \ No newline at end of file +} From 561cc3274619c0c8a3ed4c5426ecf523d5cdadc1 Mon Sep 17 00:00:00 2001 From: mba1398 <26516464+mba1398@users.noreply.github.com> Date: Sun, 5 Sep 2021 13:15:37 +0800 Subject: [PATCH 3/6] =?UTF-8?q?Update=201.=20Python=20=E5=AE=89=E8=A3=85?= =?UTF-8?q?=E5=8F=8A=E5=9F=BA=E6=9C=AC=E8=AF=AD=E6=B3=95.ipynb?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 1. Python 安装及基本语法.ipynb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/1. Python 安装及基本语法.ipynb b/1. Python 安装及基本语法.ipynb index 72e4da8..a420f6b 100644 --- a/1. Python 安装及基本语法.ipynb +++ b/1. Python 安装及基本语法.ipynb @@ -422,7 +422,7 @@ " - \\+ 表示加法,1 \\+ 2 的结果是 3\n", " - \\- 表示减法,1 \\- 2 的结果是 -1\n", " - \\* 表示乘法,1 \\* 2 的结果是 2\n", - " - \\** 表示乘方,1 \\*\\* 2 的结果是 1\n", + " - ** 表示乘方,1 ** 2 的结果是 1\n", " - \\/ 表示除法,1 \\/ 2 的结果是 0.5 \n", " - \\/\\/ 表示整除,1 \\/\\/ 2 的结果是 0 (相当于除法结果向下取整)\n", " - \\% 表示取余 1 \\% 2 的结果是 1\n", @@ -1216,4 +1216,4 @@ }, "nbformat": 4, "nbformat_minor": 5 -} \ No newline at end of file +} From 76b1a23355266662eda4607167544b0dd74324d9 Mon Sep 17 00:00:00 2001 From: Chuanyu Xue Date: Sun, 17 Oct 2021 14:37:24 -0400 Subject: [PATCH 4/6] Revised the materials during video recording. --- 3. Python 面向对象编程.ipynb | 86 ++++++++++++++++++------------------ 4. Python 文件与模块.ipynb | 4 +- 2 files changed, 46 insertions(+), 44 deletions(-) diff --git a/3. Python 面向对象编程.ipynb b/3. Python 面向对象编程.ipynb index f06e8a8..0628e12 100644 --- a/3. Python 面向对象编程.ipynb +++ b/3. Python 面向对象编程.ipynb @@ -87,7 +87,7 @@ " 对象2.变量5 = 对象2.函数2(对象1.函数1())\n", " \n", " \n", - "面向对象编程的出现,使得变量和函数可以根据功能进行整理分类,大大减轻了复杂程序的设计与维护负担。" + "面向对象编程的出现,使得变量和函数可以根据功能进行整理分类,通过面向对象的模块化编程,大大减轻了复杂程序的设计与维护负担。" ] }, { @@ -132,7 +132,7 @@ "类是用来定义对象的 “模板”。\n", "\n", "- 在现实中:类是一组具有相同属性和行为的对象的抽象。例如张三、李四虽然每个人有不同的性格与职业,但他们的基本特征是相似的,都有鼻子有眼能吃饭,因此我们统称他们为“人”类,而每一个人就是一个对象。\n", - "- 在 Python 中:类是一组具有相同数据和操作的对象的对象的集合。例如“学生”类可以由学号、姓名、性别、成绩等表示其属性的数据项和对这些数据的录入、修改和显示等操作组成,而每一个特定的学生例如 XiaoHu 就是一个对象。" + "- 在 Python 中:类是一组具有相同数据和操作的对象的模板集合。例如“学生”类可以由学号、姓名、性别、成绩等表示其属性的数据项和对这些数据的录入、修改和显示等操作组成,而每一个特定的学生例如 XiaoHu 就是一个对象。" ] }, { @@ -198,7 +198,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 1, "id": "whole-translation", "metadata": {}, "outputs": [], @@ -218,7 +218,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 2, "id": "marked-hello", "metadata": {}, "outputs": [ @@ -258,7 +258,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 3, "id": "severe-reset", "metadata": {}, "outputs": [], @@ -281,7 +281,7 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 4, "id": "manual-montreal", "metadata": {}, "outputs": [ @@ -314,7 +314,7 @@ }, { "cell_type": "code", - "execution_count": 42, + "execution_count": 5, "id": "black-pakistan", "metadata": {}, "outputs": [ @@ -352,7 +352,7 @@ }, { "cell_type": "code", - "execution_count": 43, + "execution_count": 6, "id": "south-tongue", "metadata": {}, "outputs": [ @@ -376,7 +376,7 @@ }, { "cell_type": "code", - "execution_count": 44, + "execution_count": 7, "id": "loose-albuquerque", "metadata": {}, "outputs": [ @@ -420,7 +420,7 @@ }, { "cell_type": "code", - "execution_count": 12, + "execution_count": 8, "id": "heavy-jewel", "metadata": {}, "outputs": [], @@ -437,7 +437,7 @@ }, { "cell_type": "code", - "execution_count": 13, + "execution_count": 9, "id": "occasional-paint", "metadata": {}, "outputs": [ @@ -462,7 +462,7 @@ "source": [ "self 函数用于在类的内部指向对象本身,它是用于连接 类 与 对象 的工具,也是 Python 面向对象编程“多态”特性的一种体现。\n", "\n", - "例如在上述代码,我们使用 student 类产生对象 xiaohu,那么 self 就代指 xiaohu;如果我们产生对象 xiaoming,那么 self 就会自动代指 xiaohu。因此 self 参数可以根据不同对象产生不同操作,这体现了面向对象编程的“多态性”。" + "例如在上述代码,我们使用 student 类产生对象 xiaohu,那么 self 就代指 xiaohu;如果我们产生对象 xiaoming,那么 self 就会自动代指 xiaoming。因此 self 参数可以根据不同对象产生不同操作,这体现了面向对象编程的“多态性”。" ] }, { @@ -470,12 +470,12 @@ "id": "daily-impact", "metadata": {}, "source": [ - "我们还可以给 student 创建一个用于更改成绩的函数,这样我们后续就不需要通过赋值符号更改对象内的数据:" + "我们还可以给 student 创建一个用于更改成绩的方法,这样我们后续就不需要通过赋值符号更改对象内的数据:" ] }, { "cell_type": "code", - "execution_count": 46, + "execution_count": 10, "id": "colonial-craps", "metadata": {}, "outputs": [], @@ -500,7 +500,7 @@ }, { "cell_type": "code", - "execution_count": 47, + "execution_count": 11, "id": "split-burner", "metadata": {}, "outputs": [ @@ -553,7 +553,7 @@ }, { "cell_type": "code", - "execution_count": 97, + "execution_count": 12, "id": "standard-american", "metadata": {}, "outputs": [], @@ -592,7 +592,7 @@ }, { "cell_type": "code", - "execution_count": 17, + "execution_count": 13, "id": "level-status", "metadata": {}, "outputs": [ @@ -644,7 +644,7 @@ }, { "cell_type": "code", - "execution_count": 58, + "execution_count": 14, "id": "reasonable-caribbean", "metadata": {}, "outputs": [ @@ -654,7 +654,7 @@ "int" ] }, - "execution_count": 58, + "execution_count": 14, "metadata": {}, "output_type": "execute_result" } @@ -669,12 +669,12 @@ "id": "above-convention", "metadata": {}, "source": [ - "to_byte 将 int 变量转化成 byte 对象 b'\\x00x\\01' 因为整数 1 的二进制编码是 0001。" + "to_byte 将 int 对象转化成 byte 对象 b'\\x00x\\01' 因为整数 1 的二进制编码是 0001。" ] }, { "cell_type": "code", - "execution_count": 63, + "execution_count": 15, "id": "freelance-briefing", "metadata": {}, "outputs": [ @@ -718,7 +718,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 16, "id": "c94eed80", "metadata": {}, "outputs": [ @@ -739,7 +739,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 17, "id": "ac2c2093", "metadata": {}, "outputs": [ @@ -758,7 +758,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 18, "id": "a05cff81", "metadata": {}, "outputs": [ @@ -777,7 +777,7 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 19, "id": "3f916203", "metadata": {}, "outputs": [ @@ -814,7 +814,7 @@ }, { "cell_type": "code", - "execution_count": 64, + "execution_count": 20, "id": "killing-modern", "metadata": {}, "outputs": [], @@ -831,12 +831,12 @@ "id": "tight-generation", "metadata": {}, "source": [ - "通过 \\.\\_\\_name\\_\\_ 方法可以获得函数的名字:" + "通过 \\.\\_\\_name\\_\\_ 成员变量可以获得函数的名字:" ] }, { "cell_type": "code", - "execution_count": 74, + "execution_count": 21, "id": "extensive-firmware", "metadata": {}, "outputs": [ @@ -846,7 +846,7 @@ "'check_sum'" ] }, - "execution_count": 74, + "execution_count": 21, "metadata": {}, "output_type": "execute_result" } @@ -873,7 +873,7 @@ }, { "cell_type": "code", - "execution_count": 80, + "execution_count": 22, "id": "soviet-determination", "metadata": {}, "outputs": [], @@ -883,7 +883,7 @@ }, { "cell_type": "code", - "execution_count": 81, + "execution_count": 23, "id": "weighted-ordinance", "metadata": {}, "outputs": [ @@ -910,7 +910,7 @@ }, { "cell_type": "code", - "execution_count": 82, + "execution_count": 24, "id": "american-continent", "metadata": {}, "outputs": [ @@ -918,7 +918,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "[2, 3, 4, 5]\n" + "[1, 3, 4, 5]\n" ] } ], @@ -937,7 +937,7 @@ }, { "cell_type": "code", - "execution_count": 83, + "execution_count": 25, "id": "metropolitan-conference", "metadata": {}, "outputs": [ @@ -945,7 +945,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "[1, 2, 3, 4, 5]\n" + "[1, 1, 3, 4, 5]\n" ] } ], @@ -1020,7 +1020,7 @@ }, { "cell_type": "code", - "execution_count": 89, + "execution_count": 26, "id": "regulated-speed", "metadata": {}, "outputs": [ @@ -1030,13 +1030,13 @@ "'__main__'" ] }, - "execution_count": 89, + "execution_count": 26, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "__name__" + "__name__\n" ] }, { @@ -1072,7 +1072,7 @@ }, { "cell_type": "code", - "execution_count": 107, + "execution_count": 27, "id": "direct-stick", "metadata": {}, "outputs": [], @@ -1113,7 +1113,7 @@ }, { "cell_type": "code", - "execution_count": 108, + "execution_count": 28, "id": "available-exhibition", "metadata": {}, "outputs": [ @@ -1157,9 +1157,11 @@ } ], "metadata": { + "interpreter": { + "hash": "6e6b1a68f12b475eafe78cfc17c6f5d94c7a04c458bc4083bc2db350380231c7" + }, "kernelspec": { - "display_name": "Python 3", - "language": "python", + "display_name": "Python 3.9.2 64-bit ('base': conda)", "name": "python3" }, "language_info": { diff --git a/4. Python 文件与模块.ipynb b/4. Python 文件与模块.ipynb index 110d2e9..08638c4 100644 --- a/4. Python 文件与模块.ipynb +++ b/4. Python 文件与模块.ipynb @@ -430,7 +430,7 @@ "\n", "纵观历史,你会看到苹果创始人史蒂夫·乔布斯对 Less is More 的追求,看到无印良品“删繁就简,去其浮华”的核心设计理念,看到山下英子在《断舍离》中对生活做减法的观点,甚至看到苏东坡“一蓑烟雨任平生”的人生态度。你会发现极简主义不只存在于 Python 编程中,它本就是这个世界优雅的一条运行法则。\n", " \n", - "本练习让我们导入 this 模块,用心体会一下 Python 的指导原则。\n", + "本练习让我们导入 this 模块,用心体会一下 Python 的设计原则。\n", " \n", "" ] @@ -503,4 +503,4 @@ }, "nbformat": 4, "nbformat_minor": 5 -} \ No newline at end of file +} From 2e4adfe498e559c0973c0cfd7c11d37621d7717d Mon Sep 17 00:00:00 2001 From: Chuanyu Xue Date: Tue, 19 Oct 2021 10:58:13 -0400 Subject: [PATCH 5/6] Update README.md --- README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index fb05504..adfacf1 100644 --- a/README.md +++ b/README.md @@ -30,9 +30,10 @@ 柏拉图曾经说过:“良好的开端等于成功的一半”。大家选择本教程作为建起万丈高楼的地基,对于我而言便是莫大的荣幸。衷心希望大家在本教程陪伴下迈向未来的同时,也能享受学习过程中带来的乐趣。 ## 如何使用这套教程? -1. 本地下载安装 jupyter notebook 打开 ipynb 文件,安装使用方法参考:https://www.jianshu.com/p/91365f343585/ -2. 在和鲸社区 https://www.heywhale.com 创建项目,上传 .ipynb 文件可在线打开 -3. 在 Colab 上传 .ipynb 在线打开 (需要科学上网) +1. 在 Github 网页版直接打开 ipynb 文件查看 +2. 本地下载安装 jupyter notebook 运行 ipynb 文件,安装使用方法参考:https://www.jianshu.com/p/91365f343585/ +3. 在和鲸社区 https://www.heywhale.com 创建项目,上传 .ipynb 文件可在线运行 +4. 在 Google Colab 上传 .ipynb 在线运行 (需要科学上网) ## 联系方式 知乎 @小雨姑娘 From bc6aae5b1ce8ae7c1f7ddac8d4902fb7ebf3ae53 Mon Sep 17 00:00:00 2001 From: Chuanyu Xue Date: Tue, 19 Oct 2021 10:58:27 -0400 Subject: [PATCH 6/6] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index adfacf1..a33a0d2 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ ## 联系方式 知乎 @小雨姑娘 -Email: cs_xcy@126.com +Email: chuanyu.xue@uconn.edu ## 关注我们
Datawhale是一个专注AI领域的开源组织,以“for the learner,和学习者一起成长”为愿景,构建对学习者最有价值的开源学习社区。关注我们,一起学习成长。