diff --git "a/Day01-15/Day01/\345\210\235\350\257\206Python.md" "b/Day01-15/01.\345\210\235\350\257\206Python.md" similarity index 100% rename from "Day01-15/Day01/\345\210\235\350\257\206Python.md" rename to "Day01-15/01.\345\210\235\350\257\206Python.md" diff --git "a/Day01-15/Day02/\350\257\255\350\250\200\345\205\203\347\264\240.md" "b/Day01-15/02.\350\257\255\350\250\200\345\205\203\347\264\240.md" similarity index 100% rename from "Day01-15/Day02/\350\257\255\350\250\200\345\205\203\347\264\240.md" rename to "Day01-15/02.\350\257\255\350\250\200\345\205\203\347\264\240.md" diff --git "a/Day01-15/Day03/\345\210\206\346\224\257\347\273\223\346\236\204.md" "b/Day01-15/03.\345\210\206\346\224\257\347\273\223\346\236\204.md" similarity index 100% rename from "Day01-15/Day03/\345\210\206\346\224\257\347\273\223\346\236\204.md" rename to "Day01-15/03.\345\210\206\346\224\257\347\273\223\346\236\204.md" diff --git "a/Day01-15/Day04/\345\276\252\347\216\257\347\273\223\346\236\204.md" "b/Day01-15/04.\345\276\252\347\216\257\347\273\223\346\236\204.md" similarity index 99% rename from "Day01-15/Day04/\345\276\252\347\216\257\347\273\223\346\236\204.md" rename to "Day01-15/04.\345\276\252\347\216\257\347\273\223\346\236\204.md" index ff0fd2601..34ec15553 100644 --- "a/Day01-15/Day04/\345\276\252\347\216\257\347\273\223\346\236\204.md" +++ "b/Day01-15/04.\345\276\252\347\216\257\347\273\223\346\236\204.md" @@ -6,7 +6,7 @@ ### for-in循环 -如果明确的知道循环执行的次数或者是要对一个容器进行迭代(后面会讲到),那么我们推荐使用`for-in`循环,例如下面代码中计算![$\sum_{n=1}^{100}n$](./res/formula_1.png)。 +如果明确的知道循环执行的次数或者是要对一个容器进行迭代(后面会讲到),那么我们推荐使用`for-in`循环,例如下面代码中计算![$\sum_{n=1}^{100}n$](./res/formula_2.png)。 ```Python """ diff --git "a/Day01-15/Day05/\346\200\273\347\273\223\345\222\214\347\273\203\344\271\240.md" "b/Day01-15/05.\346\200\273\347\273\223\345\222\214\347\273\203\344\271\240.md" similarity index 100% rename from "Day01-15/Day05/\346\200\273\347\273\223\345\222\214\347\273\203\344\271\240.md" rename to "Day01-15/05.\346\200\273\347\273\223\345\222\214\347\273\203\344\271\240.md" diff --git "a/Day01-15/Day06/\345\207\275\346\225\260\345\222\214\346\250\241\345\235\227\347\232\204\344\275\277\347\224\250.md" "b/Day01-15/06.\345\207\275\346\225\260\345\222\214\346\250\241\345\235\227\347\232\204\344\275\277\347\224\250.md" similarity index 99% rename from "Day01-15/Day06/\345\207\275\346\225\260\345\222\214\346\250\241\345\235\227\347\232\204\344\275\277\347\224\250.md" rename to "Day01-15/06.\345\207\275\346\225\260\345\222\214\346\250\241\345\235\227\347\232\204\344\275\277\347\224\250.md" index 217b80032..5d65caba5 100644 --- "a/Day01-15/Day06/\345\207\275\346\225\260\345\222\214\346\250\241\345\235\227\347\232\204\344\275\277\347\224\250.md" +++ "b/Day01-15/06.\345\207\275\346\225\260\345\222\214\346\250\241\345\235\227\347\232\204\344\275\277\347\224\250.md" @@ -2,11 +2,11 @@ 在讲解本章节的内容之前,我们先来研究一道数学题,请说出下面的方程有多少组正整数解。 -![$$x_1 + x_2 + x_3 + x_4 = 8$$](./res/formula_1.png) +![$$x_1 + x_2 + x_3 + x_4 = 8$$](./res/formula_3.png) 事实上,上面的问题等同于将8个苹果分成四组每组至少一个苹果有多少种方案。想到这一点问题的答案就呼之欲出了。 -![$$C_M^N =\frac{M!}{N!(M-N)!}, \text{(M=7, N=3)} $$](./res/formula_2.png) +![$$C_M^N =\frac{M!}{N!(M-N)!}, \text{(M=7, N=3)} $$](./res/formula_4.png) 可以用Python的程序来计算出这个值,代码如下所示。 diff --git "a/Day01-15/Day07/\345\255\227\347\254\246\344\270\262\345\222\214\345\270\270\347\224\250\346\225\260\346\215\256\347\273\223\346\236\204.md" "b/Day01-15/07.\345\255\227\347\254\246\344\270\262\345\222\214\345\270\270\347\224\250\346\225\260\346\215\256\347\273\223\346\236\204.md" similarity index 99% rename from "Day01-15/Day07/\345\255\227\347\254\246\344\270\262\345\222\214\345\270\270\347\224\250\346\225\260\346\215\256\347\273\223\346\236\204.md" rename to "Day01-15/07.\345\255\227\347\254\246\344\270\262\345\222\214\345\270\270\347\224\250\346\225\260\346\215\256\347\273\223\346\236\204.md" index 22723109f..9aa603090 100644 --- "a/Day01-15/Day07/\345\255\227\347\254\246\344\270\262\345\222\214\345\270\270\347\224\250\346\225\260\346\215\256\347\273\223\346\236\204.md" +++ "b/Day01-15/07.\345\255\227\347\254\246\344\270\262\345\222\214\345\270\270\347\224\250\346\225\260\346\215\256\347\273\223\346\236\204.md" @@ -2,7 +2,7 @@ ### 使用字符串 -第二次世界大战促使了现代电子计算机的诞生,当初的想法很简单,就是用计算机来计算导弹的弹道,因此在计算机刚刚诞生的那个年代,计算机处理的信息主要是数值,而世界上的第一台电子计算机ENIAC每秒钟能够完成约5000次浮点运算。随着时间的推移,虽然对数值运算仍然是计算机日常工作中最为重要的事情之一,但是今天的计算机处理得更多的数据都是以文本信息的方式存在的,而Python表示文本信息的方式我们在很早以前就说过了,那就是字符串类型。所谓**字符串**,就是由零个或多个字符组成的有限序列,一般记为![$${\displaystyle s=a_{1}a_{2}\dots a_{n}(0\leq n \leq \infty)}$$](./res/formula_1.png)。 +第二次世界大战促使了现代电子计算机的诞生,当初的想法很简单,就是用计算机来计算导弹的弹道,因此在计算机刚刚诞生的那个年代,计算机处理的信息主要是数值,而世界上的第一台电子计算机ENIAC每秒钟能够完成约5000次浮点运算。随着时间的推移,虽然对数值运算仍然是计算机日常工作中最为重要的事情之一,但是今天的计算机处理得更多的数据都是以文本信息的方式存在的,而Python表示文本信息的方式我们在很早以前就说过了,那就是字符串类型。所谓**字符串**,就是由零个或多个字符组成的有限序列,一般记为![$${\displaystyle s=a_{1}a_{2}\dots a_{n}(0\leq n \leq \infty)}$$](./res/formula_5.png)。 我们可以通过下面的代码来了解字符串的使用。 @@ -183,11 +183,11 @@ if __name__ == '__main__': 除了上面提到的生成器语法,Python中还有另外一种定义生成器的方式,就是通过`yield`关键字将一个普通函数改造成生成器函数。下面的代码演示了如何实现一个生成[斐波拉切数列](https://zh.wikipedia.org/wiki/%E6%96%90%E6%B3%A2%E9%82%A3%E5%A5%91%E6%95%B0%E5%88%97)的生成器。所谓斐波拉切数列可以通过下面[递归](https://zh.wikipedia.org/wiki/%E9%80%92%E5%BD%92)的方法来进行定义: -![$${\displaystyle F_{0}=0}$$](./res/formula_2.png) +![$${\displaystyle F_{0}=0}$$](./res/formula_6.png) -![$${\displaystyle F_{1}=1}$$](./res/formula_3.png) +![$${\displaystyle F_{1}=1}$$](./res/formula_7.png) -![$${\displaystyle F_{n}=F_{n-1}+F_{n-2}}({n}\geq{2})$$](./res/formula_4.png) +![$${\displaystyle F_{n}=F_{n-1}+F_{n-2}}({n}\geq{2})$$](./res/formula_8.png) ![](./res/fibonacci-blocks.png) diff --git "a/Day01-15/Day08/\351\235\242\345\220\221\345\257\271\350\261\241\347\274\226\347\250\213\345\237\272\347\241\200.md" "b/Day01-15/08.\351\235\242\345\220\221\345\257\271\350\261\241\347\274\226\347\250\213\345\237\272\347\241\200.md" similarity index 100% rename from "Day01-15/Day08/\351\235\242\345\220\221\345\257\271\350\261\241\347\274\226\347\250\213\345\237\272\347\241\200.md" rename to "Day01-15/08.\351\235\242\345\220\221\345\257\271\350\261\241\347\274\226\347\250\213\345\237\272\347\241\200.md" diff --git "a/Day01-15/Day09/\351\235\242\345\220\221\345\257\271\350\261\241\350\277\233\351\230\266.md" "b/Day01-15/09.\351\235\242\345\220\221\345\257\271\350\261\241\350\277\233\351\230\266.md" similarity index 100% rename from "Day01-15/Day09/\351\235\242\345\220\221\345\257\271\350\261\241\350\277\233\351\230\266.md" rename to "Day01-15/09.\351\235\242\345\220\221\345\257\271\350\261\241\350\277\233\351\230\266.md" diff --git "a/Day01-15/Day10/\345\233\276\345\275\242\347\224\250\346\210\267\347\225\214\351\235\242\345\222\214\346\270\270\346\210\217\345\274\200\345\217\221.md" "b/Day01-15/10.\345\233\276\345\275\242\347\224\250\346\210\267\347\225\214\351\235\242\345\222\214\346\270\270\346\210\217\345\274\200\345\217\221.md" similarity index 100% rename from "Day01-15/Day10/\345\233\276\345\275\242\347\224\250\346\210\267\347\225\214\351\235\242\345\222\214\346\270\270\346\210\217\345\274\200\345\217\221.md" rename to "Day01-15/10.\345\233\276\345\275\242\347\224\250\346\210\267\347\225\214\351\235\242\345\222\214\346\270\270\346\210\217\345\274\200\345\217\221.md" diff --git "a/Day01-15/Day11/\346\226\207\344\273\266\345\222\214\345\274\202\345\270\270.md" "b/Day01-15/11.\346\226\207\344\273\266\345\222\214\345\274\202\345\270\270.md" similarity index 100% rename from "Day01-15/Day11/\346\226\207\344\273\266\345\222\214\345\274\202\345\270\270.md" rename to "Day01-15/11.\346\226\207\344\273\266\345\222\214\345\274\202\345\270\270.md" diff --git "a/Day01-15/Day12/\345\255\227\347\254\246\344\270\262\345\222\214\346\255\243\345\210\231\350\241\250\350\276\276\345\274\217.md" "b/Day01-15/12.\345\255\227\347\254\246\344\270\262\345\222\214\346\255\243\345\210\231\350\241\250\350\276\276\345\274\217.md" similarity index 100% rename from "Day01-15/Day12/\345\255\227\347\254\246\344\270\262\345\222\214\346\255\243\345\210\231\350\241\250\350\276\276\345\274\217.md" rename to "Day01-15/12.\345\255\227\347\254\246\344\270\262\345\222\214\346\255\243\345\210\231\350\241\250\350\276\276\345\274\217.md" diff --git "a/Day01-15/Day13/\350\277\233\347\250\213\345\222\214\347\272\277\347\250\213.md" "b/Day01-15/13.\350\277\233\347\250\213\345\222\214\347\272\277\347\250\213.md" similarity index 100% rename from "Day01-15/Day13/\350\277\233\347\250\213\345\222\214\347\272\277\347\250\213.md" rename to "Day01-15/13.\350\277\233\347\250\213\345\222\214\347\272\277\347\250\213.md" diff --git "a/Day01-15/Day14-A/\347\275\221\347\273\234\347\274\226\347\250\213\345\205\245\351\227\250.md" "b/Day01-15/14.\347\275\221\347\273\234\347\274\226\347\250\213\345\205\245\351\227\250\345\222\214\347\275\221\347\273\234\345\272\224\347\224\250\345\274\200\345\217\221.md" similarity index 77% rename from "Day01-15/Day14-A/\347\275\221\347\273\234\347\274\226\347\250\213\345\205\245\351\227\250.md" rename to "Day01-15/14.\347\275\221\347\273\234\347\274\226\347\250\213\345\205\245\351\227\250\345\222\214\347\275\221\347\273\234\345\272\224\347\224\250\345\274\200\345\217\221.md" index 234ca2d6f..27a6cd57c 100644 --- "a/Day01-15/Day14-A/\347\275\221\347\273\234\347\274\226\347\250\213\345\205\245\351\227\250.md" +++ "b/Day01-15/14.\347\275\221\347\273\234\347\274\226\347\250\213\345\205\245\351\227\250\345\222\214\347\275\221\347\273\234\345\272\224\347\224\250\345\274\200\345\217\221.md" @@ -297,3 +297,123 @@ if __name__ == '__main__': 传输层除了有可靠的传输协议TCP之外,还有一种非常轻便的传输协议叫做用户数据报协议,简称UDP。TCP和UDP都是提供端到端传输服务的协议,二者的差别就如同打电话和发短信的区别,后者不对传输的可靠性和可达性做出任何承诺从而避免了TCP中握手和重传的开销,所以在强调性能和而不是数据完整性的场景中(例如传输网络音视频数据),UDP可能是更好的选择。可能大家会注意到一个现象,就是在观看网络视频时,有时会出现卡顿,有时会出现花屏,这无非就是部分数据传丢或传错造成的。在Python中也可以使用UDP套接字来创建网络应用,对此我们不进行赘述,有兴趣的读者可以自行研究。 +### 网络应用开发 + +#### 发送电子邮件 + +在即时通信软件如此发达的今天,电子邮件仍然是互联网上使用最为广泛的应用之一,公司向应聘者发出录用通知、网站向用户发送一个激活账号的链接、银行向客户推广它们的理财产品等几乎都是通过电子邮件来完成的,而这些任务应该都是由程序自动完成的。 + +就像我们可以用HTTP(超文本传输协议)来访问一个网站一样,发送邮件要使用SMTP(简单邮件传输协议),SMTP也是一个建立在TCP(传输控制协议)提供的可靠数据传输服务的基础上的应用级协议,它规定了邮件的发送者如何跟发送邮件的服务器进行通信的细节,而Python中的smtplib模块将这些操作简化成了几个简单的函数。 + +下面的代码演示了如何在Python发送邮件。 + +```Python +from smtplib import SMTP +from email.header import Header +from email.mime.text import MIMEText + + +def main(): + # 请自行修改下面的邮件发送者和接收者 + sender = 'abcdefg@126.com' + receivers = ['uvwxyz@qq.com', 'uvwxyz@126.com'] + message = MIMEText('用Python发送邮件的示例代码.', 'plain', 'utf-8') + message['From'] = Header('王大锤', 'utf-8') + message['To'] = Header('骆昊', 'utf-8') + message['Subject'] = Header('示例代码实验邮件', 'utf-8') + smtper = SMTP('smtp.126.com') + # 请自行修改下面的登录口令 + smtper.login(sender, 'secretpass') + smtper.sendmail(sender, receivers, message.as_string()) + print('邮件发送完成!') + + +if __name__ == '__main__': + main() +``` + +如果要发送带有附件的邮件,那么可以按照下面的方式进行操作。 + +```Python +from smtplib import SMTP +from email.header import Header +from email.mime.text import MIMEText +from email.mime.image import MIMEImage +from email.mime.multipart import MIMEMultipart + +import urllib + + +def main(): + # 创建一个带附件的邮件消息对象 + message = MIMEMultipart() + + # 创建文本内容 + text_content = MIMEText('附件中有本月数据请查收', 'plain', 'utf-8') + message['Subject'] = Header('本月数据', 'utf-8') + # 将文本内容添加到邮件消息对象中 + message.attach(text_content) + + # 读取文件并将文件作为附件添加到邮件消息对象中 + with open('/Users/Hao/Desktop/hello.txt', 'rb') as f: + txt = MIMEText(f.read(), 'base64', 'utf-8') + txt['Content-Type'] = 'text/plain' + txt['Content-Disposition'] = 'attachment; filename=hello.txt' + message.attach(txt) + # 读取文件并将文件作为附件添加到邮件消息对象中 + with open('/Users/Hao/Desktop/汇总数据.xlsx', 'rb') as f: + xls = MIMEText(f.read(), 'base64', 'utf-8') + xls['Content-Type'] = 'application/vnd.ms-excel' + xls['Content-Disposition'] = 'attachment; filename=month-data.xlsx' + message.attach(xls) + + # 创建SMTP对象 + smtper = SMTP('smtp.126.com') + # 开启安全连接 + # smtper.starttls() + sender = 'abcdefg@126.com' + receivers = ['uvwxyz@qq.com'] + # 登录到SMTP服务器 + # 请注意此处不是使用密码而是邮件客户端授权码进行登录 + # 对此有疑问的读者可以联系自己使用的邮件服务器客服 + smtper.login(sender, 'secretpass') + # 发送邮件 + smtper.sendmail(sender, receivers, message.as_string()) + # 与邮件服务器断开连接 + smtper.quit() + print('发送完成!') + + +if __name__ == '__main__': + main() +``` + +#### 发送短信 + +发送短信也是项目中常见的功能,网站的注册码、验证码、营销信息基本上都是通过短信来发送给用户的。在下面的代码中我们使用了[互亿无线](http://www.ihuyi.com/)短信平台(该平台为注册用户提供了50条免费短信以及常用开发语言发送短信的demo,可以登录该网站并在用户自服务页面中对短信进行配置)提供的API接口实现了发送短信的服务,当然国内的短信平台很多,读者可以根据自己的需要进行选择(通常会考虑费用预算、短信达到率、使用的难易程度等指标),如果需要在商业项目中使用短信服务建议购买短信平台提供的套餐服务。 + +```Python +import urllib.parse +import http.client +import json + + +def main(): + host = "106.ihuyi.com" + sms_send_uri = "/webservice/sms.php?method=Submit" + # 下面的参数需要填入自己注册的账号和对应的密码 + params = urllib.parse.urlencode({'account': '你自己的账号', 'password' : '你自己的密码', 'content': '您的验证码是:147258。请不要把验证码泄露给其他人。', 'mobile': '接收者的手机号', 'format':'json' }) + print(params) + headers = {'Content-type': 'application/x-www-form-urlencoded', 'Accept': 'text/plain'} + conn = http.client.HTTPConnection(host, port=80, timeout=30) + conn.request('POST', sms_send_uri, params, headers) + response = conn.getresponse() + response_str = response.read() + jsonstr = response_str.decode('utf-8') + print(json.loads(jsonstr)) + conn.close() + + +if __name__ == '__main__': + main() +``` \ No newline at end of file diff --git "a/Day01-15/Day15/\345\233\276\345\203\217\345\222\214\345\212\236\345\205\254\346\226\207\346\241\243\345\244\204\347\220\206.md" "b/Day01-15/15.\345\233\276\345\203\217\345\222\214\345\212\236\345\205\254\346\226\207\346\241\243\345\244\204\347\220\206.md" similarity index 100% rename from "Day01-15/Day15/\345\233\276\345\203\217\345\222\214\345\212\236\345\205\254\346\226\207\346\241\243\345\244\204\347\220\206.md" rename to "Day01-15/15.\345\233\276\345\203\217\345\222\214\345\212\236\345\205\254\346\226\207\346\241\243\345\244\204\347\220\206.md" diff --git a/Day01-15/Day09/res/uml-example.gliffy b/Day01-15/Day09/res/uml-example.gliffy deleted file mode 100644 index 015163a2f..000000000 --- a/Day01-15/Day09/res/uml-example.gliffy +++ /dev/null @@ -1 +0,0 @@ -{"contentType":"application/gliffy+json","version":"1.1","metadata":{"title":"untitled","revision":0,"exportBorder":false},"embeddedResources":{"index":0,"resources":[]},"stage":{"objects":[{"x":211,"y":179.5,"rotation":0,"id":79,"uid":"com.gliffy.shape.basic.basic_v1.default.text","width":60,"height":28,"lockAspectRatio":false,"lockShape":false,"order":71,"graphic":{"type":"Text","Text":{"tid":null,"valign":"middle","overflow":"none","vposition":"none","hposition":"none","html":"
继承关系
","paddingLeft":2,"paddingRight":2,"paddingBottom":2,"paddingTop":2}},"children":null,"linkMap":[]},{"x":702,"y":249,"rotation":0,"id":78,"uid":"com.gliffy.shape.uml.uml_v1.default.generalization","width":100,"height":100,"lockAspectRatio":false,"lockShape":false,"order":70,"graphic":{"type":"Line","Line":{"strokeWidth":1,"strokeColor":"#000000","fillColor":"none","dashStyle":null,"startArrow":0,"endArrow":4,"startArrowRotation":"auto","endArrowRotation":"auto","ortho":true,"interpolationType":"linear","cornerRadius":null,"controlPath":[[82,-4],[50,-4],[50,-69.32485578727801],[18,-69.32485578727801]],"lockSegments":{}}},"children":null,"constraints":{"constraints":[],"startConstraint":{"type":"StartPositionConstraint","StartPositionConstraint":{"nodeId":70,"px":0,"py":0.5}},"endConstraint":{"type":"EndPositionConstraint","EndPositionConstraint":{"nodeId":32,"px":0.9999999999999998,"py":0.7071067811865475}}},"linkMap":[]},{"x":615,"y":70,"rotation":0,"id":77,"uid":"com.gliffy.shape.uml.uml_v1.default.generalization","width":100,"height":100,"lockAspectRatio":false,"lockShape":false,"order":69,"graphic":{"type":"Line","Line":{"strokeWidth":1,"strokeColor":"#000000","fillColor":"none","dashStyle":null,"startArrow":0,"endArrow":4,"startArrowRotation":"auto","endArrowRotation":"auto","ortho":true,"interpolationType":"linear","cornerRadius":null,"controlPath":[[169,6.75],[137,6.75],[137,70.32485578727798],[105,70.32485578727798]],"lockSegments":{}}},"children":null,"constraints":{"constraints":[],"startConstraint":{"type":"StartPositionConstraint","StartPositionConstraint":{"nodeId":63,"px":0,"py":0.5}},"endConstraint":{"type":"EndPositionConstraint","EndPositionConstraint":{"nodeId":32,"px":1,"py":0.29289321881345237}}},"linkMap":[]},{"x":228,"y":356,"rotation":0,"id":55,"uid":"com.gliffy.shape.uml.uml_v1.default.association","width":100,"height":100,"lockAspectRatio":false,"lockShape":false,"order":0,"graphic":{"type":"Line","Line":{"strokeWidth":1,"strokeColor":"#000000","fillColor":"none","dashStyle":null,"startArrow":0,"endArrow":0,"startArrowRotation":"auto","endArrowRotation":"auto","ortho":true,"interpolationType":"linear","cornerRadius":null,"controlPath":[[202,-46],[202,-22.666666666666686],[202,0.6666666666666856],[202,24]],"lockSegments":{}}},"children":null,"constraints":{"constraints":[],"startConstraint":{"type":"StartPositionConstraint","StartPositionConstraint":{"nodeId":24,"px":0.5,"py":1}},"endConstraint":{"type":"EndPositionConstraint","EndPositionConstraint":{"nodeId":48,"px":0.5,"py":0}}},"linkMap":[]},{"x":667,"y":225,"rotation":0,"id":47,"uid":"com.gliffy.shape.uml.uml_v1.default.aggregation","width":100,"height":100,"lockAspectRatio":false,"lockShape":false,"order":40,"graphic":{"type":"Line","Line":{"strokeWidth":1,"strokeColor":"#000000","fillColor":"none","dashStyle":null,"startArrow":0,"endArrow":5,"startArrowRotation":"auto","endArrowRotation":"auto","ortho":true,"interpolationType":"linear","cornerRadius":null,"controlPath":[[-17,-17.5],[-17,8.333333333333343],[-17,34.166666666666686],[-17,60]],"lockSegments":{}}},"children":null,"constraints":{"constraints":[],"startConstraint":{"type":"StartPositionConstraint","StartPositionConstraint":{"nodeId":32,"px":0.5,"py":1}},"endConstraint":{"type":"EndPositionConstraint","EndPositionConstraint":{"nodeId":56,"px":0.5,"py":0}}},"linkMap":[]},{"x":403,"y":390,"rotation":0,"id":39,"uid":"com.gliffy.shape.uml.uml_v1.default.dependency","width":100,"height":100,"lockAspectRatio":false,"lockShape":false,"order":39,"graphic":{"type":"Line","Line":{"strokeWidth":1,"strokeColor":"#000000","fillColor":"none","dashStyle":"8.0,2.0","startArrow":0,"endArrow":6,"startArrowRotation":"auto","endArrowRotation":"auto","ortho":true,"interpolationType":"linear","cornerRadius":null,"controlPath":[[97,-125],[137,-125],[137,-230],[177,-230]],"lockSegments":{}}},"children":null,"constraints":{"constraints":[],"startConstraint":{"type":"StartPositionConstraint","StartPositionConstraint":{"nodeId":24,"px":1,"py":0.5}},"endConstraint":{"type":"EndPositionConstraint","EndPositionConstraint":{"nodeId":32,"px":0,"py":0.5}}},"linkMap":[]},{"x":289,"y":219,"rotation":0,"id":31,"uid":"com.gliffy.shape.uml.uml_v1.default.generalization","width":100,"height":100,"lockAspectRatio":false,"lockShape":false,"order":31,"graphic":{"type":"Line","Line":{"strokeWidth":1,"strokeColor":"#000000","fillColor":"none","dashStyle":null,"startArrow":0,"endArrow":4,"startArrowRotation":"auto","endArrowRotation":"auto","ortho":true,"interpolationType":"linear","cornerRadius":null,"controlPath":[[141,1],[141,-124],[51,-124]],"lockSegments":{}}},"children":null,"constraints":{"constraints":[],"startConstraint":{"type":"StartPositionConstraint","StartPositionConstraint":{"nodeId":24,"px":0.5,"py":0}},"endConstraint":{"type":"EndPositionConstraint","EndPositionConstraint":{"nodeId":0,"px":1,"py":0.5}}},"linkMap":[]},{"x":325,"y":185,"rotation":0,"id":22,"uid":"com.gliffy.shape.uml.uml_v1.default.generalization","width":100,"height":100,"lockAspectRatio":false,"lockShape":false,"order":23,"graphic":{"type":"Line","Line":{"strokeWidth":1,"strokeColor":"#000000","fillColor":"none","dashStyle":null,"startArrow":0,"endArrow":4,"startArrowRotation":"auto","endArrowRotation":"auto","ortho":true,"interpolationType":"linear","cornerRadius":null,"controlPath":[[-55,35],[-55,11.666666666666657],[-55,-11.666666666666657],[-55,-35]],"lockSegments":{}}},"children":null,"constraints":{"constraints":[],"startConstraint":{"type":"StartPositionConstraint","StartPositionConstraint":{"nodeId":14,"px":0.5,"py":0}},"endConstraint":{"type":"EndPositionConstraint","EndPositionConstraint":{"nodeId":0,"px":0.5,"py":1}}},"linkMap":[]},{"x":98,"y":173,"rotation":0,"id":21,"uid":"com.gliffy.shape.uml.uml_v1.default.generalization","width":100,"height":100,"lockAspectRatio":false,"lockShape":false,"order":22,"graphic":{"type":"Line","Line":{"strokeWidth":1,"strokeColor":"#000000","fillColor":"none","dashStyle":null,"startArrow":0,"endArrow":4,"startArrowRotation":"auto","endArrowRotation":"auto","ortho":true,"interpolationType":"linear","cornerRadius":null,"controlPath":[[12,47],[12,-78],[102,-78]],"lockSegments":{}}},"children":null,"constraints":{"constraints":[],"startConstraint":{"type":"StartPositionConstraint","StartPositionConstraint":{"nodeId":7,"px":0.5,"py":0}},"endConstraint":{"type":"EndPositionConstraint","EndPositionConstraint":{"nodeId":0,"px":0,"py":0.5}}},"linkMap":[]},{"x":200,"y":220,"rotation":0,"id":14,"uid":"com.gliffy.shape.uml.uml_v1.default.class","width":140,"height":75,"lockAspectRatio":false,"lockShape":false,"order":15,"graphic":null,"children":[{"x":0,"y":0,"rotation":0,"id":15,"uid":null,"width":140,"height":18,"lockAspectRatio":false,"lockShape":false,"order":"auto","graphic":{"type":"Shape","Shape":{"tid":"com.gliffy.stencil.rectangle.basic_v1","strokeWidth":2,"strokeColor":"#000000","fillColor":"#FFFFFF","gradient":false,"dropShadow":true,"state":0,"shadowX":4,"shadowY":4,"opacity":1}},"children":[{"x":0,"y":0,"rotation":0,"id":16,"uid":null,"width":140,"height":18,"lockAspectRatio":false,"lockShape":false,"order":"auto","graphic":{"type":"Text","Text":{"tid":null,"valign":"top","overflow":"none","vposition":"none","hposition":"none","html":"Teacher
","paddingLeft":2,"paddingRight":2,"paddingBottom":2,"paddingTop":2}},"children":null}],"constraints":{"constraints":[{"type":"HeightConstraint","HeightConstraint":{"isMin":false,"heightInfo":[{"id":16,"magnitude":1}],"growParent":true,"padding":0}}]}},{"x":0,"y":18,"rotation":0,"id":17,"uid":null,"width":140,"height":18,"lockAspectRatio":false,"lockShape":false,"order":"auto","graphic":{"type":"Shape","Shape":{"tid":"com.gliffy.stencil.rectangle.basic_v1","strokeWidth":2,"strokeColor":"#000000","fillColor":"#FFFFFF","gradient":false,"dropShadow":true,"state":0,"shadowX":4,"shadowY":4,"opacity":1}},"children":[{"x":0,"y":0,"rotation":0,"id":18,"uid":null,"width":140,"height":18,"lockAspectRatio":false,"lockShape":false,"order":"auto","graphic":{"type":"Text","Text":{"tid":null,"valign":"top","overflow":"none","vposition":"none","hposition":"none","html":"title
","paddingLeft":2,"paddingRight":2,"paddingBottom":2,"paddingTop":2}},"children":null}],"constraints":{"constraints":[{"type":"PositionConstraint","PositionConstraint":{"nodeId":15,"px":0,"py":1}},{"type":"HeightConstraint","HeightConstraint":{"isMin":false,"heightInfo":[{"id":18,"magnitude":1}],"growParent":true,"padding":0}}]}},{"x":0,"y":36,"rotation":0,"id":19,"uid":null,"width":140,"height":39,"lockAspectRatio":false,"lockShape":false,"order":"auto","graphic":{"type":"Shape","Shape":{"tid":"com.gliffy.stencil.rectangle.basic_v1","strokeWidth":2,"strokeColor":"#000000","fillColor":"#FFFFFF","gradient":false,"dropShadow":true,"state":0,"shadowX":4,"shadowY":4,"opacity":1}},"children":[{"x":0,"y":0,"rotation":0,"id":20,"uid":null,"width":140,"height":18,"lockAspectRatio":false,"lockShape":false,"order":"auto","graphic":{"type":"Text","Text":{"tid":null,"valign":"top","overflow":"none","vposition":"none","hposition":"none","html":"teach
","paddingLeft":2,"paddingRight":2,"paddingBottom":2,"paddingTop":2}},"children":null}],"constraints":{"constraints":[{"type":"HeightConstraint","HeightConstraint":{"isMin":false,"heightInfo":[{"id":14,"magnitude":1},{"id":15,"magnitude":-1},{"id":17,"magnitude":-1}],"growParent":false,"padding":0}},{"type":"PositionConstraint","PositionConstraint":{"nodeId":17,"px":0,"py":1}}]}}],"constraints":{"constraints":[{"type":"HeightConstraint","HeightConstraint":{"isMin":true,"heightInfo":[{"id":15,"magnitude":1},{"id":17,"magnitude":1},{"id":20,"magnitude":1}],"growParent":false,"padding":0}}]},"linkMap":[]},{"x":40,"y":220,"rotation":0,"id":7,"uid":"com.gliffy.shape.uml.uml_v1.default.class","width":140,"height":75,"lockAspectRatio":false,"lockShape":false,"order":8,"graphic":null,"children":[{"x":0,"y":0,"rotation":0,"id":8,"uid":null,"width":140,"height":18,"lockAspectRatio":false,"lockShape":false,"order":"auto","graphic":{"type":"Shape","Shape":{"tid":"com.gliffy.stencil.rectangle.basic_v1","strokeWidth":2,"strokeColor":"#000000","fillColor":"#FFFFFF","gradient":false,"dropShadow":true,"state":0,"shadowX":4,"shadowY":4,"opacity":1}},"children":[{"x":0,"y":0,"rotation":0,"id":9,"uid":null,"width":140,"height":18,"lockAspectRatio":false,"lockShape":false,"order":"auto","graphic":{"type":"Text","Text":{"tid":null,"valign":"top","overflow":"none","vposition":"none","hposition":"none","html":"Student
","paddingLeft":2,"paddingRight":2,"paddingBottom":2,"paddingTop":2}},"children":null}],"constraints":{"constraints":[{"type":"HeightConstraint","HeightConstraint":{"isMin":false,"heightInfo":[{"id":9,"magnitude":1}],"growParent":true,"padding":0}}]}},{"x":0,"y":18,"rotation":0,"id":10,"uid":null,"width":140,"height":18,"lockAspectRatio":false,"lockShape":false,"order":"auto","graphic":{"type":"Shape","Shape":{"tid":"com.gliffy.stencil.rectangle.basic_v1","strokeWidth":2,"strokeColor":"#000000","fillColor":"#FFFFFF","gradient":false,"dropShadow":true,"state":0,"shadowX":4,"shadowY":4,"opacity":1}},"children":[{"x":0,"y":0,"rotation":0,"id":11,"uid":null,"width":140,"height":18,"lockAspectRatio":false,"lockShape":false,"order":"auto","graphic":{"type":"Text","Text":{"tid":null,"valign":"top","overflow":"none","vposition":"none","hposition":"none","html":"grade
","paddingLeft":2,"paddingRight":2,"paddingBottom":2,"paddingTop":2}},"children":null}],"constraints":{"constraints":[{"type":"PositionConstraint","PositionConstraint":{"nodeId":8,"px":0,"py":1}},{"type":"HeightConstraint","HeightConstraint":{"isMin":false,"heightInfo":[{"id":11,"magnitude":1}],"growParent":true,"padding":0}}]}},{"x":0,"y":36,"rotation":0,"id":12,"uid":null,"width":140,"height":39,"lockAspectRatio":false,"lockShape":false,"order":"auto","graphic":{"type":"Shape","Shape":{"tid":"com.gliffy.stencil.rectangle.basic_v1","strokeWidth":2,"strokeColor":"#000000","fillColor":"#FFFFFF","gradient":false,"dropShadow":true,"state":0,"shadowX":4,"shadowY":4,"opacity":1}},"children":[{"x":0,"y":0,"rotation":0,"id":13,"uid":null,"width":140,"height":18,"lockAspectRatio":false,"lockShape":false,"order":"auto","graphic":{"type":"Text","Text":{"tid":null,"valign":"top","overflow":"none","vposition":"none","hposition":"none","html":"study
","paddingLeft":2,"paddingRight":2,"paddingBottom":2,"paddingTop":2}},"children":null}],"constraints":{"constraints":[{"type":"HeightConstraint","HeightConstraint":{"isMin":false,"heightInfo":[{"id":7,"magnitude":1},{"id":8,"magnitude":-1},{"id":10,"magnitude":-1}],"growParent":false,"padding":0}},{"type":"PositionConstraint","PositionConstraint":{"nodeId":10,"px":0,"py":1}}]}}],"constraints":{"constraints":[{"type":"HeightConstraint","HeightConstraint":{"isMin":true,"heightInfo":[{"id":8,"magnitude":1},{"id":10,"magnitude":1},{"id":13,"magnitude":1}],"growParent":false,"padding":0}}]},"linkMap":[]},{"x":200,"y":40,"rotation":0,"id":0,"uid":"com.gliffy.shape.uml.uml_v1.default.class","width":140,"height":110,"lockAspectRatio":false,"lockShape":false,"order":1,"graphic":null,"children":[{"x":0,"y":0,"rotation":0,"id":1,"uid":null,"width":140,"height":18,"lockAspectRatio":false,"lockShape":false,"order":"auto","graphic":{"type":"Shape","Shape":{"tid":"com.gliffy.stencil.rectangle.basic_v1","strokeWidth":2,"strokeColor":"#000000","fillColor":"#FFFFFF","gradient":false,"dropShadow":true,"state":0,"shadowX":4,"shadowY":4,"opacity":1}},"children":[{"x":0,"y":0,"rotation":0,"id":2,"uid":null,"width":140,"height":18,"lockAspectRatio":false,"lockShape":false,"order":"auto","graphic":{"type":"Text","Text":{"tid":null,"valign":"top","overflow":"none","vposition":"none","hposition":"none","html":"Person
","paddingLeft":2,"paddingRight":2,"paddingBottom":2,"paddingTop":2}},"children":null}],"constraints":{"constraints":[{"type":"HeightConstraint","HeightConstraint":{"isMin":false,"heightInfo":[{"id":2,"magnitude":1}],"growParent":true,"padding":0}}]}},{"x":0,"y":18,"rotation":0,"id":3,"uid":null,"width":140,"height":32,"lockAspectRatio":false,"lockShape":false,"order":"auto","graphic":{"type":"Shape","Shape":{"tid":"com.gliffy.stencil.rectangle.basic_v1","strokeWidth":2,"strokeColor":"#000000","fillColor":"#FFFFFF","gradient":false,"dropShadow":true,"state":0,"shadowX":4,"shadowY":4,"opacity":1}},"children":[{"x":0,"y":0,"rotation":0,"id":4,"uid":null,"width":140,"height":32,"lockAspectRatio":false,"lockShape":false,"order":"auto","graphic":{"type":"Text","Text":{"tid":null,"valign":"top","overflow":"none","vposition":"none","hposition":"none","html":"name\n
age
","paddingLeft":2,"paddingRight":2,"paddingBottom":2,"paddingTop":2}},"children":null}],"constraints":{"constraints":[{"type":"PositionConstraint","PositionConstraint":{"nodeId":1,"px":0,"py":1}},{"type":"HeightConstraint","HeightConstraint":{"isMin":false,"heightInfo":[{"id":4,"magnitude":1}],"growParent":true,"padding":0}}]}},{"x":0,"y":50,"rotation":0,"id":5,"uid":null,"width":140,"height":60,"lockAspectRatio":false,"lockShape":false,"order":"auto","graphic":{"type":"Shape","Shape":{"tid":"com.gliffy.stencil.rectangle.basic_v1","strokeWidth":2,"strokeColor":"#000000","fillColor":"#FFFFFF","gradient":false,"dropShadow":true,"state":0,"shadowX":4,"shadowY":4,"opacity":1}},"children":[{"x":0,"y":0,"rotation":0,"id":6,"uid":null,"width":140,"height":32,"lockAspectRatio":false,"lockShape":false,"order":"auto","graphic":{"type":"Text","Text":{"tid":null,"valign":"top","overflow":"none","vposition":"none","hposition":"none","html":"eat\n
play
","paddingLeft":2,"paddingRight":2,"paddingBottom":2,"paddingTop":2}},"children":null}],"constraints":{"constraints":[{"type":"HeightConstraint","HeightConstraint":{"isMin":false,"heightInfo":[{"id":0,"magnitude":1},{"id":1,"magnitude":-1},{"id":3,"magnitude":-1}],"growParent":false,"padding":0}},{"type":"PositionConstraint","PositionConstraint":{"nodeId":3,"px":0,"py":1}}]}}],"constraints":{"constraints":[{"type":"HeightConstraint","HeightConstraint":{"isMin":true,"heightInfo":[{"id":1,"magnitude":1},{"id":3,"magnitude":1},{"id":6,"magnitude":1}],"growParent":false,"padding":0}}]},"linkMap":[]},{"x":360,"y":220,"rotation":0,"id":24,"uid":"com.gliffy.shape.uml.uml_v1.default.class","width":140,"height":90,"lockAspectRatio":false,"lockShape":false,"order":24,"graphic":null,"children":[{"x":0,"y":0,"rotation":0,"id":25,"uid":null,"width":140,"height":18,"lockAspectRatio":false,"lockShape":false,"order":"auto","graphic":{"type":"Shape","Shape":{"tid":"com.gliffy.stencil.rectangle.basic_v1","strokeWidth":2,"strokeColor":"#000000","fillColor":"#FFFFFF","gradient":false,"dropShadow":true,"state":0,"shadowX":4,"shadowY":4,"opacity":1}},"children":[{"x":0,"y":0,"rotation":0,"id":26,"uid":null,"width":140,"height":18,"lockAspectRatio":false,"lockShape":false,"order":"auto","graphic":{"type":"Text","Text":{"tid":null,"valign":"top","overflow":"none","vposition":"none","hposition":"none","html":"Driver
","paddingLeft":2,"paddingRight":2,"paddingBottom":2,"paddingTop":2}},"children":null}],"constraints":{"constraints":[{"type":"HeightConstraint","HeightConstraint":{"isMin":false,"heightInfo":[{"id":26,"magnitude":1}],"growParent":true,"padding":0}}]}},{"x":0,"y":18,"rotation":0,"id":27,"uid":null,"width":140,"height":32,"lockAspectRatio":false,"lockShape":false,"order":"auto","graphic":{"type":"Shape","Shape":{"tid":"com.gliffy.stencil.rectangle.basic_v1","strokeWidth":2,"strokeColor":"#000000","fillColor":"#FFFFFF","gradient":false,"dropShadow":true,"state":0,"shadowX":4,"shadowY":4,"opacity":1}},"children":[{"x":0,"y":0,"rotation":0,"id":28,"uid":null,"width":140,"height":32,"lockAspectRatio":false,"lockShape":false,"order":"auto","graphic":{"type":"Text","Text":{"tid":null,"valign":"top","overflow":"none","vposition":"none","hposition":"none","html":"work_experience\n
license
","paddingLeft":2,"paddingRight":2,"paddingBottom":2,"paddingTop":2}},"children":null}],"constraints":{"constraints":[{"type":"PositionConstraint","PositionConstraint":{"nodeId":25,"px":0,"py":1}},{"type":"HeightConstraint","HeightConstraint":{"isMin":false,"heightInfo":[{"id":28,"magnitude":1}],"growParent":true,"padding":0}}]}},{"x":0,"y":50,"rotation":0,"id":29,"uid":null,"width":140,"height":40,"lockAspectRatio":false,"lockShape":false,"order":"auto","graphic":{"type":"Shape","Shape":{"tid":"com.gliffy.stencil.rectangle.basic_v1","strokeWidth":2,"strokeColor":"#000000","fillColor":"#FFFFFF","gradient":false,"dropShadow":true,"state":0,"shadowX":4,"shadowY":4,"opacity":1}},"children":[{"x":0,"y":0,"rotation":0,"id":30,"uid":null,"width":140,"height":18,"lockAspectRatio":false,"lockShape":false,"order":"auto","graphic":{"type":"Text","Text":{"tid":null,"valign":"top","overflow":"none","vposition":"none","hposition":"none","html":"drive
","paddingLeft":2,"paddingRight":2,"paddingBottom":2,"paddingTop":2}},"children":null}],"constraints":{"constraints":[{"type":"HeightConstraint","HeightConstraint":{"isMin":false,"heightInfo":[{"id":24,"magnitude":1},{"id":25,"magnitude":-1},{"id":27,"magnitude":-1}],"growParent":false,"padding":0}},{"type":"PositionConstraint","PositionConstraint":{"nodeId":27,"px":0,"py":1}}]}}],"constraints":{"constraints":[{"type":"HeightConstraint","HeightConstraint":{"isMin":true,"heightInfo":[{"id":25,"magnitude":1},{"id":27,"magnitude":1},{"id":30,"magnitude":1}],"growParent":false,"padding":0}}]},"linkMap":[]},{"x":580,"y":112.5,"rotation":0,"id":32,"uid":"com.gliffy.shape.uml.uml_v1.default.class","width":140,"height":95,"lockAspectRatio":false,"lockShape":false,"order":32,"graphic":null,"children":[{"x":0,"y":0,"rotation":0,"id":33,"uid":null,"width":140,"height":18,"lockAspectRatio":false,"lockShape":false,"order":"auto","graphic":{"type":"Shape","Shape":{"tid":"com.gliffy.stencil.rectangle.basic_v1","strokeWidth":2,"strokeColor":"#000000","fillColor":"#FFFFFF","gradient":false,"dropShadow":true,"state":0,"shadowX":4,"shadowY":4,"opacity":1}},"children":[{"x":0,"y":0,"rotation":0,"id":34,"uid":null,"width":140,"height":18,"lockAspectRatio":false,"lockShape":false,"order":"auto","graphic":{"type":"Text","Text":{"tid":null,"valign":"top","overflow":"none","vposition":"none","hposition":"none","html":"Vehicle
","paddingLeft":2,"paddingRight":2,"paddingBottom":2,"paddingTop":2}},"children":null}],"constraints":{"constraints":[{"type":"HeightConstraint","HeightConstraint":{"isMin":false,"heightInfo":[{"id":34,"magnitude":1}],"growParent":true,"padding":0}}]}},{"x":0,"y":18,"rotation":0,"id":35,"uid":null,"width":140,"height":32,"lockAspectRatio":false,"lockShape":false,"order":"auto","graphic":{"type":"Shape","Shape":{"tid":"com.gliffy.stencil.rectangle.basic_v1","strokeWidth":2,"strokeColor":"#000000","fillColor":"#FFFFFF","gradient":false,"dropShadow":true,"state":0,"shadowX":4,"shadowY":4,"opacity":1}},"children":[{"x":0,"y":0,"rotation":0,"id":36,"uid":null,"width":140,"height":32,"lockAspectRatio":false,"lockShape":false,"order":"auto","graphic":{"type":"Text","Text":{"tid":null,"valign":"top","overflow":"none","vposition":"none","hposition":"none","html":"brand\n
engine
","paddingLeft":2,"paddingRight":2,"paddingBottom":2,"paddingTop":2}},"children":null}],"constraints":{"constraints":[{"type":"PositionConstraint","PositionConstraint":{"nodeId":33,"px":0,"py":1}},{"type":"HeightConstraint","HeightConstraint":{"isMin":false,"heightInfo":[{"id":36,"magnitude":1}],"growParent":true,"padding":0}}]}},{"x":0,"y":50,"rotation":0,"id":37,"uid":null,"width":140,"height":45,"lockAspectRatio":false,"lockShape":false,"order":"auto","graphic":{"type":"Shape","Shape":{"tid":"com.gliffy.stencil.rectangle.basic_v1","strokeWidth":2,"strokeColor":"#000000","fillColor":"#FFFFFF","gradient":false,"dropShadow":true,"state":0,"shadowX":4,"shadowY":4,"opacity":1}},"children":[{"x":0,"y":0,"rotation":0,"id":38,"uid":null,"width":140,"height":32,"lockAspectRatio":false,"lockShape":false,"order":"auto","graphic":{"type":"Text","Text":{"tid":null,"valign":"top","overflow":"none","vposition":"none","hposition":"none","html":"accelerate\n
slow_down
","paddingLeft":2,"paddingRight":2,"paddingBottom":2,"paddingTop":2}},"children":null}],"constraints":{"constraints":[{"type":"HeightConstraint","HeightConstraint":{"isMin":false,"heightInfo":[{"id":32,"magnitude":1},{"id":33,"magnitude":-1},{"id":35,"magnitude":-1}],"growParent":false,"padding":0}},{"type":"PositionConstraint","PositionConstraint":{"nodeId":35,"px":0,"py":1}}]}}],"constraints":{"constraints":[{"type":"HeightConstraint","HeightConstraint":{"isMin":true,"heightInfo":[{"id":33,"magnitude":1},{"id":35,"magnitude":1},{"id":38,"magnitude":1}],"growParent":false,"padding":0}}]},"linkMap":[]},{"x":360,"y":380,"rotation":0,"id":48,"uid":"com.gliffy.shape.uml.uml_v1.default.class","width":140,"height":75,"lockAspectRatio":false,"lockShape":false,"order":41,"graphic":null,"children":[{"x":0,"y":0,"rotation":0,"id":49,"uid":null,"width":140,"height":18,"lockAspectRatio":false,"lockShape":false,"order":"auto","graphic":{"type":"Shape","Shape":{"tid":"com.gliffy.stencil.rectangle.basic_v1","strokeWidth":2,"strokeColor":"#000000","fillColor":"#FFFFFF","gradient":false,"dropShadow":true,"state":0,"shadowX":4,"shadowY":4,"opacity":1}},"children":[{"x":0,"y":0,"rotation":0,"id":50,"uid":null,"width":140,"height":18,"lockAspectRatio":false,"lockShape":false,"order":"auto","graphic":{"type":"Text","Text":{"tid":null,"valign":"top","overflow":"none","vposition":"none","hposition":"none","html":"License
","paddingLeft":2,"paddingRight":2,"paddingBottom":2,"paddingTop":2}},"children":null}],"constraints":{"constraints":[{"type":"HeightConstraint","HeightConstraint":{"isMin":false,"heightInfo":[{"id":50,"magnitude":1}],"growParent":true,"padding":0}}]}},{"x":0,"y":18,"rotation":0,"id":51,"uid":null,"width":140,"height":18,"lockAspectRatio":false,"lockShape":false,"order":"auto","graphic":{"type":"Shape","Shape":{"tid":"com.gliffy.stencil.rectangle.basic_v1","strokeWidth":2,"strokeColor":"#000000","fillColor":"#FFFFFF","gradient":false,"dropShadow":true,"state":0,"shadowX":4,"shadowY":4,"opacity":1}},"children":[{"x":0,"y":0,"rotation":0,"id":52,"uid":null,"width":140,"height":18,"lockAspectRatio":false,"lockShape":false,"order":"auto","graphic":{"type":"Text","Text":{"tid":null,"valign":"top","overflow":"none","vposition":"none","hposition":"none","html":"Attribute
","paddingLeft":2,"paddingRight":2,"paddingBottom":2,"paddingTop":2}},"children":null}],"constraints":{"constraints":[{"type":"PositionConstraint","PositionConstraint":{"nodeId":49,"px":0,"py":1}},{"type":"HeightConstraint","HeightConstraint":{"isMin":false,"heightInfo":[{"id":52,"magnitude":1}],"growParent":true,"padding":0}}]}},{"x":0,"y":36,"rotation":0,"id":53,"uid":null,"width":140,"height":39,"lockAspectRatio":false,"lockShape":false,"order":"auto","graphic":{"type":"Shape","Shape":{"tid":"com.gliffy.stencil.rectangle.basic_v1","strokeWidth":2,"strokeColor":"#000000","fillColor":"#FFFFFF","gradient":false,"dropShadow":true,"state":0,"shadowX":4,"shadowY":4,"opacity":1}},"children":[{"x":0,"y":0,"rotation":0,"id":54,"uid":null,"width":140,"height":18,"lockAspectRatio":false,"lockShape":false,"order":"auto","graphic":{"type":"Text","Text":{"tid":null,"valign":"top","overflow":"none","vposition":"none","hposition":"none","html":"Method
","paddingLeft":2,"paddingRight":2,"paddingBottom":2,"paddingTop":2}},"children":null}],"constraints":{"constraints":[{"type":"HeightConstraint","HeightConstraint":{"isMin":false,"heightInfo":[{"id":48,"magnitude":1},{"id":49,"magnitude":-1},{"id":51,"magnitude":-1}],"growParent":false,"padding":0}},{"type":"PositionConstraint","PositionConstraint":{"nodeId":51,"px":0,"py":1}}]}}],"constraints":{"constraints":[{"type":"HeightConstraint","HeightConstraint":{"isMin":true,"heightInfo":[{"id":49,"magnitude":1},{"id":51,"magnitude":1},{"id":54,"magnitude":1}],"growParent":false,"padding":0}}]},"linkMap":[]},{"x":580,"y":285,"rotation":0,"id":56,"uid":"com.gliffy.shape.uml.uml_v1.default.class","width":140,"height":75,"lockAspectRatio":false,"lockShape":false,"order":48,"graphic":null,"children":[{"x":0,"y":0,"rotation":0,"id":57,"uid":null,"width":140,"height":18,"lockAspectRatio":false,"lockShape":false,"order":"auto","graphic":{"type":"Shape","Shape":{"tid":"com.gliffy.stencil.rectangle.basic_v1","strokeWidth":2,"strokeColor":"#000000","fillColor":"#FFFFFF","gradient":false,"dropShadow":true,"state":0,"shadowX":4,"shadowY":4,"opacity":1}},"children":[{"x":0,"y":0,"rotation":0,"id":58,"uid":null,"width":140,"height":18,"lockAspectRatio":false,"lockShape":false,"order":"auto","graphic":{"type":"Text","Text":{"tid":null,"valign":"top","overflow":"none","vposition":"none","hposition":"none","html":"Engine
","paddingLeft":2,"paddingRight":2,"paddingBottom":2,"paddingTop":2}},"children":null}],"constraints":{"constraints":[{"type":"HeightConstraint","HeightConstraint":{"isMin":false,"heightInfo":[{"id":58,"magnitude":1}],"growParent":true,"padding":0}}]}},{"x":0,"y":18,"rotation":0,"id":59,"uid":null,"width":140,"height":18,"lockAspectRatio":false,"lockShape":false,"order":"auto","graphic":{"type":"Shape","Shape":{"tid":"com.gliffy.stencil.rectangle.basic_v1","strokeWidth":2,"strokeColor":"#000000","fillColor":"#FFFFFF","gradient":false,"dropShadow":true,"state":0,"shadowX":4,"shadowY":4,"opacity":1}},"children":[{"x":0,"y":0,"rotation":0,"id":60,"uid":null,"width":140,"height":18,"lockAspectRatio":false,"lockShape":false,"order":"auto","graphic":{"type":"Text","Text":{"tid":null,"valign":"top","overflow":"none","vposition":"none","hposition":"none","html":"number
","paddingLeft":2,"paddingRight":2,"paddingBottom":2,"paddingTop":2}},"children":null}],"constraints":{"constraints":[{"type":"PositionConstraint","PositionConstraint":{"nodeId":57,"px":0,"py":1}},{"type":"HeightConstraint","HeightConstraint":{"isMin":false,"heightInfo":[{"id":60,"magnitude":1}],"growParent":true,"padding":0}}]}},{"x":0,"y":36,"rotation":0,"id":61,"uid":null,"width":140,"height":39,"lockAspectRatio":false,"lockShape":false,"order":"auto","graphic":{"type":"Shape","Shape":{"tid":"com.gliffy.stencil.rectangle.basic_v1","strokeWidth":2,"strokeColor":"#000000","fillColor":"#FFFFFF","gradient":false,"dropShadow":true,"state":0,"shadowX":4,"shadowY":4,"opacity":1}},"children":[{"x":0,"y":0,"rotation":0,"id":62,"uid":null,"width":140,"height":4,"lockAspectRatio":false,"lockShape":false,"order":"auto","graphic":{"type":"Text","Text":{"tid":null,"valign":"top","overflow":"none","vposition":"none","hposition":"none","html":"","paddingLeft":2,"paddingRight":2,"paddingBottom":2,"paddingTop":2}},"children":null}],"constraints":{"constraints":[{"type":"HeightConstraint","HeightConstraint":{"isMin":false,"heightInfo":[{"id":56,"magnitude":1},{"id":57,"magnitude":-1},{"id":59,"magnitude":-1}],"growParent":false,"padding":0}},{"type":"PositionConstraint","PositionConstraint":{"nodeId":59,"px":0,"py":1}}]}}],"constraints":{"constraints":[{"type":"HeightConstraint","HeightConstraint":{"isMin":true,"heightInfo":[{"id":57,"magnitude":1},{"id":59,"magnitude":1},{"id":62,"magnitude":1}],"growParent":false,"padding":0}}]},"linkMap":[]},{"x":784,"y":41,"rotation":0,"id":63,"uid":"com.gliffy.shape.uml.uml_v1.default.class","width":140,"height":71.5,"lockAspectRatio":false,"lockShape":false,"order":55,"graphic":null,"children":[{"x":0,"y":0,"rotation":0,"id":64,"uid":null,"width":140,"height":18,"lockAspectRatio":false,"lockShape":false,"order":"auto","graphic":{"type":"Shape","Shape":{"tid":"com.gliffy.stencil.rectangle.basic_v1","strokeWidth":2,"strokeColor":"#000000","fillColor":"#FFFFFF","gradient":false,"dropShadow":true,"state":0,"shadowX":4,"shadowY":4,"opacity":1}},"children":[{"x":0,"y":0,"rotation":0,"id":65,"uid":null,"width":140,"height":18,"lockAspectRatio":false,"lockShape":false,"order":"auto","graphic":{"type":"Text","Text":{"tid":null,"valign":"top","overflow":"none","vposition":"none","hposition":"none","html":"
Car
","paddingLeft":2,"paddingRight":2,"paddingBottom":2,"paddingTop":2}},"children":null}],"constraints":{"constraints":[{"type":"HeightConstraint","HeightConstraint":{"isMin":false,"heightInfo":[{"id":65,"magnitude":1}],"growParent":true,"padding":0}}]}},{"x":0,"y":18,"rotation":0,"id":66,"uid":null,"width":140,"height":32,"lockAspectRatio":false,"lockShape":false,"order":"auto","graphic":{"type":"Shape","Shape":{"tid":"com.gliffy.stencil.rectangle.basic_v1","strokeWidth":2,"strokeColor":"#000000","fillColor":"#FFFFFF","gradient":false,"dropShadow":true,"state":0,"shadowX":4,"shadowY":4,"opacity":1}},"children":[{"x":0,"y":0,"rotation":0,"id":67,"uid":null,"width":140,"height":32,"lockAspectRatio":false,"lockShape":false,"order":"auto","graphic":{"type":"Text","Text":{"tid":null,"valign":"top","overflow":"none","vposition":"none","hposition":"none","html":"seats\n
displacement
","paddingLeft":2,"paddingRight":2,"paddingBottom":2,"paddingTop":2}},"children":null}],"constraints":{"constraints":[{"type":"PositionConstraint","PositionConstraint":{"nodeId":64,"px":0,"py":1}},{"type":"HeightConstraint","HeightConstraint":{"isMin":false,"heightInfo":[{"id":67,"magnitude":1}],"growParent":true,"padding":0}}]}},{"x":0,"y":50,"rotation":0,"id":68,"uid":null,"width":140,"height":21.5,"lockAspectRatio":false,"lockShape":false,"order":"auto","graphic":{"type":"Shape","Shape":{"tid":"com.gliffy.stencil.rectangle.basic_v1","strokeWidth":2,"strokeColor":"#000000","fillColor":"#FFFFFF","gradient":false,"dropShadow":true,"state":0,"shadowX":4,"shadowY":4,"opacity":1}},"children":[{"x":0,"y":0,"rotation":0,"id":69,"uid":null,"width":140,"height":4,"lockAspectRatio":false,"lockShape":false,"order":"auto","graphic":{"type":"Text","Text":{"tid":null,"valign":"top","overflow":"none","vposition":"none","hposition":"none","html":"","paddingLeft":2,"paddingRight":2,"paddingBottom":2,"paddingTop":2}},"children":null}],"constraints":{"constraints":[{"type":"HeightConstraint","HeightConstraint":{"isMin":false,"heightInfo":[{"id":63,"magnitude":1},{"id":64,"magnitude":-1},{"id":66,"magnitude":-1}],"growParent":false,"padding":0}},{"type":"PositionConstraint","PositionConstraint":{"nodeId":66,"px":0,"py":1}}]}}],"constraints":{"constraints":[{"type":"HeightConstraint","HeightConstraint":{"isMin":true,"heightInfo":[{"id":64,"magnitude":1},{"id":66,"magnitude":1},{"id":69,"magnitude":1}],"growParent":false,"padding":0}}]},"linkMap":[]},{"x":784,"y":207.5,"rotation":0,"id":70,"uid":"com.gliffy.shape.uml.uml_v1.default.class","width":140,"height":75,"lockAspectRatio":false,"lockShape":false,"order":62,"graphic":null,"children":[{"x":0,"y":0,"rotation":0,"id":71,"uid":null,"width":140,"height":18,"lockAspectRatio":false,"lockShape":false,"order":"auto","graphic":{"type":"Shape","Shape":{"tid":"com.gliffy.stencil.rectangle.basic_v1","strokeWidth":2,"strokeColor":"#000000","fillColor":"#FFFFFF","gradient":false,"dropShadow":true,"state":0,"shadowX":4,"shadowY":4,"opacity":1}},"children":[{"x":0,"y":0,"rotation":0,"id":72,"uid":null,"width":140,"height":18,"lockAspectRatio":false,"lockShape":false,"order":"auto","graphic":{"type":"Text","Text":{"tid":null,"valign":"top","overflow":"none","vposition":"none","hposition":"none","html":"
Truck
","paddingLeft":2,"paddingRight":2,"paddingBottom":2,"paddingTop":2}},"children":null}],"constraints":{"constraints":[{"type":"HeightConstraint","HeightConstraint":{"isMin":false,"heightInfo":[{"id":72,"magnitude":1}],"growParent":true,"padding":0}}]}},{"x":0,"y":18,"rotation":0,"id":73,"uid":null,"width":140,"height":18,"lockAspectRatio":false,"lockShape":false,"order":"auto","graphic":{"type":"Shape","Shape":{"tid":"com.gliffy.stencil.rectangle.basic_v1","strokeWidth":2,"strokeColor":"#000000","fillColor":"#FFFFFF","gradient":false,"dropShadow":true,"state":0,"shadowX":4,"shadowY":4,"opacity":1}},"children":[{"x":0,"y":0,"rotation":0,"id":74,"uid":null,"width":140,"height":18,"lockAspectRatio":false,"lockShape":false,"order":"auto","graphic":{"type":"Text","Text":{"tid":null,"valign":"top","overflow":"none","vposition":"none","hposition":"none","html":"capacity
","paddingLeft":2,"paddingRight":2,"paddingBottom":2,"paddingTop":2}},"children":null}],"constraints":{"constraints":[{"type":"PositionConstraint","PositionConstraint":{"nodeId":71,"px":0,"py":1}},{"type":"HeightConstraint","HeightConstraint":{"isMin":false,"heightInfo":[{"id":74,"magnitude":1}],"growParent":true,"padding":0}}]}},{"x":0,"y":36,"rotation":0,"id":75,"uid":null,"width":140,"height":39,"lockAspectRatio":false,"lockShape":false,"order":"auto","graphic":{"type":"Shape","Shape":{"tid":"com.gliffy.stencil.rectangle.basic_v1","strokeWidth":2,"strokeColor":"#000000","fillColor":"#FFFFFF","gradient":false,"dropShadow":true,"state":0,"shadowX":4,"shadowY":4,"opacity":1}},"children":[{"x":0,"y":0,"rotation":0,"id":76,"uid":null,"width":140,"height":4,"lockAspectRatio":false,"lockShape":false,"order":"auto","graphic":{"type":"Text","Text":{"tid":null,"valign":"top","overflow":"none","vposition":"none","hposition":"none","html":"","paddingLeft":2,"paddingRight":2,"paddingBottom":2,"paddingTop":2}},"children":null}],"constraints":{"constraints":[{"type":"HeightConstraint","HeightConstraint":{"isMin":false,"heightInfo":[{"id":70,"magnitude":1},{"id":71,"magnitude":-1},{"id":73,"magnitude":-1}],"growParent":false,"padding":0}},{"type":"PositionConstraint","PositionConstraint":{"nodeId":73,"px":0,"py":1}}]}}],"constraints":{"constraints":[{"type":"HeightConstraint","HeightConstraint":{"isMin":true,"heightInfo":[{"id":71,"magnitude":1},{"id":73,"magnitude":1},{"id":76,"magnitude":1}],"growParent":false,"padding":0}}]},"linkMap":[]},{"x":371,"y":346,"rotation":0,"id":81,"uid":"com.gliffy.shape.basic.basic_v1.default.text","width":60,"height":14,"lockAspectRatio":false,"lockShape":false,"order":72,"graphic":{"type":"Text","Text":{"tid":null,"valign":"middle","overflow":"none","vposition":"none","hposition":"none","html":"
关联关系
","paddingLeft":2,"paddingRight":2,"paddingBottom":2,"paddingTop":2}},"children":null,"linkMap":[]},{"x":490,"y":186.5,"rotation":0,"id":82,"uid":"com.gliffy.shape.basic.basic_v1.default.text","width":60,"height":14,"lockAspectRatio":false,"lockShape":false,"order":73,"graphic":{"type":"Text","Text":{"tid":null,"valign":"middle","overflow":"none","vposition":"none","hposition":"none","html":"依赖关系
","paddingLeft":2,"paddingRight":2,"paddingBottom":2,"paddingTop":2}},"children":null,"linkMap":[]},{"x":591,"y":238,"rotation":0,"id":83,"uid":"com.gliffy.shape.basic.basic_v1.default.text","width":60,"height":14,"lockAspectRatio":false,"lockShape":false,"order":74,"graphic":{"type":"Text","Text":{"tid":null,"valign":"middle","overflow":"none","vposition":"none","hposition":"none","html":"聚合关系
","paddingLeft":2,"paddingRight":2,"paddingBottom":2,"paddingTop":2}},"children":null,"linkMap":[]}],"background":"#FFFFFF","width":926,"height":455,"maxWidth":5000,"maxHeight":5000,"nodeIndex":84,"autoFit":true,"exportBorder":false,"gridOn":true,"snapToGrid":true,"drawingGuidesOn":true,"pageBreaksOn":false,"printGridOn":false,"printPaper":"LETTER","printShrinkToFit":false,"printPortrait":true,"shapeStyles":{},"lineStyles":{},"textStyles":{},"themeData":null}} \ No newline at end of file diff --git "a/Day01-15/Day14-B/\347\275\221\347\273\234\345\272\224\347\224\250\345\274\200\345\217\221.md" "b/Day01-15/Day14-B/\347\275\221\347\273\234\345\272\224\347\224\250\345\274\200\345\217\221.md" deleted file mode 100644 index 09edf815f..000000000 --- "a/Day01-15/Day14-B/\347\275\221\347\273\234\345\272\224\347\224\250\345\274\200\345\217\221.md" +++ /dev/null @@ -1,121 +0,0 @@ -## 网络应用开发 - -### 发送电子邮件 - -在即时通信软件如此发达的今天,电子邮件仍然是互联网上使用最为广泛的应用之一,公司向应聘者发出录用通知、网站向用户发送一个激活账号的链接、银行向客户推广它们的理财产品等几乎都是通过电子邮件来完成的,而这些任务应该都是由程序自动完成的。 - -就像我们可以用HTTP(超文本传输协议)来访问一个网站一样,发送邮件要使用SMTP(简单邮件传输协议),SMTP也是一个建立在TCP(传输控制协议)提供的可靠数据传输服务的基础上的应用级协议,它规定了邮件的发送者如何跟发送邮件的服务器进行通信的细节,而Python中的smtplib模块将这些操作简化成了几个简单的函数。 - -下面的代码演示了如何在Python发送邮件。 - -```Python -from smtplib import SMTP -from email.header import Header -from email.mime.text import MIMEText - - -def main(): - # 请自行修改下面的邮件发送者和接收者 - sender = 'abcdefg@126.com' - receivers = ['uvwxyz@qq.com', 'uvwxyz@126.com'] - message = MIMEText('用Python发送邮件的示例代码.', 'plain', 'utf-8') - message['From'] = Header('王大锤', 'utf-8') - message['To'] = Header('骆昊', 'utf-8') - message['Subject'] = Header('示例代码实验邮件', 'utf-8') - smtper = SMTP('smtp.126.com') - # 请自行修改下面的登录口令 - smtper.login(sender, 'secretpass') - smtper.sendmail(sender, receivers, message.as_string()) - print('邮件发送完成!') - - -if __name__ == '__main__': - main() -``` - -如果要发送带有附件的邮件,那么可以按照下面的方式进行操作。 - -```Python -from smtplib import SMTP -from email.header import Header -from email.mime.text import MIMEText -from email.mime.image import MIMEImage -from email.mime.multipart import MIMEMultipart - -import urllib - - -def main(): - # 创建一个带附件的邮件消息对象 - message = MIMEMultipart() - - # 创建文本内容 - text_content = MIMEText('附件中有本月数据请查收', 'plain', 'utf-8') - message['Subject'] = Header('本月数据', 'utf-8') - # 将文本内容添加到邮件消息对象中 - message.attach(text_content) - - # 读取文件并将文件作为附件添加到邮件消息对象中 - with open('/Users/Hao/Desktop/hello.txt', 'rb') as f: - txt = MIMEText(f.read(), 'base64', 'utf-8') - txt['Content-Type'] = 'text/plain' - txt['Content-Disposition'] = 'attachment; filename=hello.txt' - message.attach(txt) - # 读取文件并将文件作为附件添加到邮件消息对象中 - with open('/Users/Hao/Desktop/汇总数据.xlsx', 'rb') as f: - xls = MIMEText(f.read(), 'base64', 'utf-8') - xls['Content-Type'] = 'application/vnd.ms-excel' - xls['Content-Disposition'] = 'attachment; filename=month-data.xlsx' - message.attach(xls) - - # 创建SMTP对象 - smtper = SMTP('smtp.126.com') - # 开启安全连接 - # smtper.starttls() - sender = 'abcdefg@126.com' - receivers = ['uvwxyz@qq.com'] - # 登录到SMTP服务器 - # 请注意此处不是使用密码而是邮件客户端授权码进行登录 - # 对此有疑问的读者可以联系自己使用的邮件服务器客服 - smtper.login(sender, 'secretpass') - # 发送邮件 - smtper.sendmail(sender, receivers, message.as_string()) - # 与邮件服务器断开连接 - smtper.quit() - print('发送完成!') - - -if __name__ == '__main__': - main() -``` - -### 发送短信 - -发送短信也是项目中常见的功能,网站的注册码、验证码、营销信息基本上都是通过短信来发送给用户的。在下面的代码中我们使用了[互亿无线](http://www.ihuyi.com/)短信平台(该平台为注册用户提供了50条免费短信以及常用开发语言发送短信的demo,可以登录该网站并在用户自服务页面中对短信进行配置)提供的API接口实现了发送短信的服务,当然国内的短信平台很多,读者可以根据自己的需要进行选择(通常会考虑费用预算、短信达到率、使用的难易程度等指标),如果需要在商业项目中使用短信服务建议购买短信平台提供的套餐服务。 - -```Python -import urllib.parse -import http.client -import json - - -def main(): - host = "106.ihuyi.com" - sms_send_uri = "/webservice/sms.php?method=Submit" - # 下面的参数需要填入自己注册的账号和对应的密码 - params = urllib.parse.urlencode({'account': '你自己的账号', 'password' : '你自己的密码', 'content': '您的验证码是:147258。请不要把验证码泄露给其他人。', 'mobile': '接收者的手机号', 'format':'json' }) - print(params) - headers = {'Content-type': 'application/x-www-form-urlencoded', 'Accept': 'text/plain'} - conn = http.client.HTTPConnection(host, port=80, timeout=30) - conn.request('POST', sms_send_uri, params, headers) - response = conn.getresponse() - response_str = response.read() - jsonstr = response_str.decode('utf-8') - print(json.loads(jsonstr)) - conn.close() - - -if __name__ == '__main__': - main() -``` - diff --git a/Day01-15/Day01/code/hello.py b/Day01-15/code/Day01/hello.py similarity index 100% rename from Day01-15/Day01/code/hello.py rename to Day01-15/code/Day01/hello.py diff --git a/Day01-15/Day01/code/peppa_pig.py b/Day01-15/code/Day01/peppa_pig.py similarity index 100% rename from Day01-15/Day01/code/peppa_pig.py rename to Day01-15/code/Day01/peppa_pig.py diff --git a/Day01-15/Day02/code/centigrade.py b/Day01-15/code/Day02/centigrade.py similarity index 100% rename from Day01-15/Day02/code/centigrade.py rename to Day01-15/code/Day02/centigrade.py diff --git a/Day01-15/Day02/code/circle.py b/Day01-15/code/Day02/circle.py similarity index 100% rename from Day01-15/Day02/code/circle.py rename to Day01-15/code/Day02/circle.py diff --git a/Day01-15/Day02/code/leap.py b/Day01-15/code/Day02/leap.py similarity index 100% rename from Day01-15/Day02/code/leap.py rename to Day01-15/code/Day02/leap.py diff --git a/Day01-15/Day02/code/operator.py b/Day01-15/code/Day02/operator.py similarity index 100% rename from Day01-15/Day02/code/operator.py rename to Day01-15/code/Day02/operator.py diff --git a/Day01-15/Day02/code/strings.py b/Day01-15/code/Day02/strings.py similarity index 100% rename from Day01-15/Day02/code/strings.py rename to Day01-15/code/Day02/strings.py diff --git a/Day01-15/Day02/code/variable1.py b/Day01-15/code/Day02/variable1.py similarity index 100% rename from Day01-15/Day02/code/variable1.py rename to Day01-15/code/Day02/variable1.py diff --git a/Day01-15/Day02/code/variable2.py b/Day01-15/code/Day02/variable2.py similarity index 100% rename from Day01-15/Day02/code/variable2.py rename to Day01-15/code/Day02/variable2.py diff --git a/Day01-15/Day02/code/variable3.py b/Day01-15/code/Day02/variable3.py similarity index 100% rename from Day01-15/Day02/code/variable3.py rename to Day01-15/code/Day02/variable3.py diff --git a/Day01-15/Day02/code/variable4.py b/Day01-15/code/Day02/variable4.py similarity index 100% rename from Day01-15/Day02/code/variable4.py rename to Day01-15/code/Day02/variable4.py diff --git a/Day01-15/Day02/code/variable5.py b/Day01-15/code/Day02/variable5.py similarity index 100% rename from Day01-15/Day02/code/variable5.py rename to Day01-15/code/Day02/variable5.py diff --git a/Day01-15/Day03/code/convert.py b/Day01-15/code/Day03/convert.py similarity index 100% rename from Day01-15/Day03/code/convert.py rename to Day01-15/code/Day03/convert.py diff --git a/Day01-15/Day03/code/grade.py b/Day01-15/code/Day03/grade.py similarity index 100% rename from Day01-15/Day03/code/grade.py rename to Day01-15/code/Day03/grade.py diff --git a/Day01-15/Day03/code/piecewise.py b/Day01-15/code/Day03/piecewise.py similarity index 100% rename from Day01-15/Day03/code/piecewise.py rename to Day01-15/code/Day03/piecewise.py diff --git a/Day01-15/Day03/code/rolldice.py b/Day01-15/code/Day03/rolldice.py similarity index 100% rename from Day01-15/Day03/code/rolldice.py rename to Day01-15/code/Day03/rolldice.py diff --git a/Day01-15/Day03/code/tax.py b/Day01-15/code/Day03/tax.py similarity index 100% rename from Day01-15/Day03/code/tax.py rename to Day01-15/code/Day03/tax.py diff --git a/Day01-15/Day03/code/triangle.py b/Day01-15/code/Day03/triangle.py similarity index 100% rename from Day01-15/Day03/code/triangle.py rename to Day01-15/code/Day03/triangle.py diff --git a/Day01-15/Day03/code/verify.py b/Day01-15/code/Day03/verify.py similarity index 100% rename from Day01-15/Day03/code/verify.py rename to Day01-15/code/Day03/verify.py diff --git a/Day01-15/Day04/code/for1.py b/Day01-15/code/Day04/for1.py similarity index 100% rename from Day01-15/Day04/code/for1.py rename to Day01-15/code/Day04/for1.py diff --git a/Day01-15/Day04/code/for2.py b/Day01-15/code/Day04/for2.py similarity index 100% rename from Day01-15/Day04/code/for2.py rename to Day01-15/code/Day04/for2.py diff --git a/Day01-15/Day04/code/for3.py b/Day01-15/code/Day04/for3.py similarity index 100% rename from Day01-15/Day04/code/for3.py rename to Day01-15/code/Day04/for3.py diff --git a/Day01-15/Day04/code/for4.py b/Day01-15/code/Day04/for4.py similarity index 100% rename from Day01-15/Day04/code/for4.py rename to Day01-15/code/Day04/for4.py diff --git a/Day01-15/Day04/code/for5.py b/Day01-15/code/Day04/for5.py similarity index 100% rename from Day01-15/Day04/code/for5.py rename to Day01-15/code/Day04/for5.py diff --git a/Day01-15/Day04/code/for6.py b/Day01-15/code/Day04/for6.py similarity index 100% rename from Day01-15/Day04/code/for6.py rename to Day01-15/code/Day04/for6.py diff --git a/Day01-15/Day04/code/while1.py b/Day01-15/code/Day04/while1.py similarity index 100% rename from Day01-15/Day04/code/while1.py rename to Day01-15/code/Day04/while1.py diff --git a/Day01-15/Day04/code/while2.py b/Day01-15/code/Day04/while2.py similarity index 100% rename from Day01-15/Day04/code/while2.py rename to Day01-15/code/Day04/while2.py diff --git a/Day01-15/Day05/code/chicken.py b/Day01-15/code/Day05/chicken.py similarity index 100% rename from Day01-15/Day05/code/chicken.py rename to Day01-15/code/Day05/chicken.py diff --git a/Day01-15/Day05/code/craps.py b/Day01-15/code/Day05/craps.py similarity index 100% rename from Day01-15/Day05/code/craps.py rename to Day01-15/code/Day05/craps.py diff --git a/Day01-15/Day05/code/fibonacci.py b/Day01-15/code/Day05/fibonacci.py similarity index 100% rename from Day01-15/Day05/code/fibonacci.py rename to Day01-15/code/Day05/fibonacci.py diff --git a/Day01-15/Day05/code/guess.py b/Day01-15/code/Day05/guess.py similarity index 100% rename from Day01-15/Day05/code/guess.py rename to Day01-15/code/Day05/guess.py diff --git a/Day01-15/Day05/code/lily.py b/Day01-15/code/Day05/lily.py similarity index 100% rename from Day01-15/Day05/code/lily.py rename to Day01-15/code/Day05/lily.py diff --git a/Day01-15/Day05/code/palindrome.py b/Day01-15/code/Day05/palindrome.py similarity index 100% rename from Day01-15/Day05/code/palindrome.py rename to Day01-15/code/Day05/palindrome.py diff --git a/Day01-15/Day05/code/perfect.py b/Day01-15/code/Day05/perfect.py similarity index 100% rename from Day01-15/Day05/code/perfect.py rename to Day01-15/code/Day05/perfect.py diff --git a/Day01-15/Day05/code/prime.py b/Day01-15/code/Day05/prime.py similarity index 100% rename from Day01-15/Day05/code/prime.py rename to Day01-15/code/Day05/prime.py diff --git a/Day01-15/Day05/code/table.py b/Day01-15/code/Day05/table.py similarity index 100% rename from Day01-15/Day05/code/table.py rename to Day01-15/code/Day05/table.py diff --git a/Day01-15/Day06/code/function1.py b/Day01-15/code/Day06/function1.py similarity index 100% rename from Day01-15/Day06/code/function1.py rename to Day01-15/code/Day06/function1.py diff --git a/Day01-15/Day06/code/function2.py b/Day01-15/code/Day06/function2.py similarity index 100% rename from Day01-15/Day06/code/function2.py rename to Day01-15/code/Day06/function2.py diff --git a/Day01-15/Day06/code/function3.py b/Day01-15/code/Day06/function3.py similarity index 100% rename from Day01-15/Day06/code/function3.py rename to Day01-15/code/Day06/function3.py diff --git a/Day01-15/Day06/code/function4.py b/Day01-15/code/Day06/function4.py similarity index 100% rename from Day01-15/Day06/code/function4.py rename to Day01-15/code/Day06/function4.py diff --git a/Day01-15/Day06/code/function5.py b/Day01-15/code/Day06/function5.py similarity index 100% rename from Day01-15/Day06/code/function5.py rename to Day01-15/code/Day06/function5.py diff --git a/Day01-15/Day06/code/function6.py b/Day01-15/code/Day06/function6.py similarity index 100% rename from Day01-15/Day06/code/function6.py rename to Day01-15/code/Day06/function6.py diff --git a/Day01-15/Day07/code/avgscore.py b/Day01-15/code/Day07/avgscore.py similarity index 100% rename from Day01-15/Day07/code/avgscore.py rename to Day01-15/code/Day07/avgscore.py diff --git a/Day01-15/Day07/code/dict1.py b/Day01-15/code/Day07/dict1.py similarity index 100% rename from Day01-15/Day07/code/dict1.py rename to Day01-15/code/Day07/dict1.py diff --git a/Day01-15/Day07/code/dict2.py b/Day01-15/code/Day07/dict2.py similarity index 100% rename from Day01-15/Day07/code/dict2.py rename to Day01-15/code/Day07/dict2.py diff --git a/Day01-15/Day07/code/fibonacci.py b/Day01-15/code/Day07/fibonacci.py similarity index 100% rename from Day01-15/Day07/code/fibonacci.py rename to Day01-15/code/Day07/fibonacci.py diff --git a/Day01-15/Day07/code/findmax.py b/Day01-15/code/Day07/findmax.py similarity index 100% rename from Day01-15/Day07/code/findmax.py rename to Day01-15/code/Day07/findmax.py diff --git a/Day01-15/Day07/code/list1.py b/Day01-15/code/Day07/list1.py similarity index 100% rename from Day01-15/Day07/code/list1.py rename to Day01-15/code/Day07/list1.py diff --git a/Day01-15/Day07/code/list2.py b/Day01-15/code/Day07/list2.py similarity index 100% rename from Day01-15/Day07/code/list2.py rename to Day01-15/code/Day07/list2.py diff --git a/Day01-15/Day07/code/list3.py b/Day01-15/code/Day07/list3.py similarity index 100% rename from Day01-15/Day07/code/list3.py rename to Day01-15/code/Day07/list3.py diff --git a/Day01-15/Day07/code/lottery.py b/Day01-15/code/Day07/lottery.py similarity index 100% rename from Day01-15/Day07/code/lottery.py rename to Day01-15/code/Day07/lottery.py diff --git a/Day01-15/Day07/code/marquee.py b/Day01-15/code/Day07/marquee.py similarity index 100% rename from Day01-15/Day07/code/marquee.py rename to Day01-15/code/Day07/marquee.py diff --git a/Day01-15/Day07/code/scoretable.py b/Day01-15/code/Day07/scoretable.py similarity index 100% rename from Day01-15/Day07/code/scoretable.py rename to Day01-15/code/Day07/scoretable.py diff --git a/Day01-15/Day07/code/set1.py b/Day01-15/code/Day07/set1.py similarity index 100% rename from Day01-15/Day07/code/set1.py rename to Day01-15/code/Day07/set1.py diff --git a/Day01-15/Day07/code/set2.py b/Day01-15/code/Day07/set2.py similarity index 100% rename from Day01-15/Day07/code/set2.py rename to Day01-15/code/Day07/set2.py diff --git a/Day01-15/Day07/code/tic-tac-toe.py b/Day01-15/code/Day07/tic-tac-toe.py similarity index 100% rename from Day01-15/Day07/code/tic-tac-toe.py rename to Day01-15/code/Day07/tic-tac-toe.py diff --git a/Day01-15/Day07/code/tuple.py b/Day01-15/code/Day07/tuple.py similarity index 100% rename from Day01-15/Day07/code/tuple.py rename to Day01-15/code/Day07/tuple.py diff --git a/Day01-15/Day07/code/yanghui.py b/Day01-15/code/Day07/yanghui.py similarity index 100% rename from Day01-15/Day07/code/yanghui.py rename to Day01-15/code/Day07/yanghui.py diff --git a/Day01-15/Day08/code/access.py b/Day01-15/code/Day08/access.py similarity index 100% rename from Day01-15/Day08/code/access.py rename to Day01-15/code/Day08/access.py diff --git a/Day01-15/Day08/code/circle.py b/Day01-15/code/Day08/circle.py similarity index 100% rename from Day01-15/Day08/code/circle.py rename to Day01-15/code/Day08/circle.py diff --git a/Day01-15/Day08/code/clock.py b/Day01-15/code/Day08/clock.py similarity index 100% rename from Day01-15/Day08/code/clock.py rename to Day01-15/code/Day08/clock.py diff --git a/Day01-15/Day08/code/guess.py b/Day01-15/code/Day08/guess.py similarity index 100% rename from Day01-15/Day08/code/guess.py rename to Day01-15/code/Day08/guess.py diff --git a/Day01-15/Day08/code/hack.py b/Day01-15/code/Day08/hack.py similarity index 100% rename from Day01-15/Day08/code/hack.py rename to Day01-15/code/Day08/hack.py diff --git a/Day01-15/Day08/code/rect.py b/Day01-15/code/Day08/rect.py similarity index 100% rename from Day01-15/Day08/code/rect.py rename to Day01-15/code/Day08/rect.py diff --git a/Day01-15/Day08/code/student.py b/Day01-15/code/Day08/student.py similarity index 100% rename from Day01-15/Day08/code/student.py rename to Day01-15/code/Day08/student.py diff --git a/Day01-15/Day09/code/association.py b/Day01-15/code/Day09/association.py similarity index 100% rename from Day01-15/Day09/code/association.py rename to Day01-15/code/Day09/association.py diff --git a/Day01-15/Day09/code/car1.py b/Day01-15/code/Day09/car1.py similarity index 100% rename from Day01-15/Day09/code/car1.py rename to Day01-15/code/Day09/car1.py diff --git a/Day01-15/Day09/code/car2.py b/Day01-15/code/Day09/car2.py similarity index 100% rename from Day01-15/Day09/code/car2.py rename to Day01-15/code/Day09/car2.py diff --git a/Day01-15/Day09/code/clock.py b/Day01-15/code/Day09/clock.py similarity index 100% rename from Day01-15/Day09/code/clock.py rename to Day01-15/code/Day09/clock.py diff --git a/Day01-15/Day09/code/dependency.py b/Day01-15/code/Day09/dependency.py similarity index 100% rename from Day01-15/Day09/code/dependency.py rename to Day01-15/code/Day09/dependency.py diff --git a/Day01-15/Day09/code/diamond.py b/Day01-15/code/Day09/diamond.py similarity index 100% rename from Day01-15/Day09/code/diamond.py rename to Day01-15/code/Day09/diamond.py diff --git a/Day01-15/Day09/code/employee.py b/Day01-15/code/Day09/employee.py similarity index 100% rename from Day01-15/Day09/code/employee.py rename to Day01-15/code/Day09/employee.py diff --git a/Day01-15/Day09/code/multi.py b/Day01-15/code/Day09/multi.py similarity index 100% rename from Day01-15/Day09/code/multi.py rename to Day01-15/code/Day09/multi.py diff --git a/Day01-15/Day09/code/pet.py b/Day01-15/code/Day09/pet.py similarity index 100% rename from Day01-15/Day09/code/pet.py rename to Day01-15/code/Day09/pet.py diff --git a/Day01-15/Day09/code/rational.py b/Day01-15/code/Day09/rational.py similarity index 100% rename from Day01-15/Day09/code/rational.py rename to Day01-15/code/Day09/rational.py diff --git a/Day01-15/Day09/code/shape.py b/Day01-15/code/Day09/shape.py similarity index 100% rename from Day01-15/Day09/code/shape.py rename to Day01-15/code/Day09/shape.py diff --git a/Day01-15/Day09/code/triangle.py b/Day01-15/code/Day09/triangle.py similarity index 100% rename from Day01-15/Day09/code/triangle.py rename to Day01-15/code/Day09/triangle.py diff --git a/Day01-15/Day10/code/ball.py b/Day01-15/code/Day10/ball.py similarity index 100% rename from Day01-15/Day10/code/ball.py rename to Day01-15/code/Day10/ball.py diff --git a/Day01-15/Day10/code/gui1.py b/Day01-15/code/Day10/gui1.py similarity index 100% rename from Day01-15/Day10/code/gui1.py rename to Day01-15/code/Day10/gui1.py diff --git a/Day01-15/Day10/code/gui2.py b/Day01-15/code/Day10/gui2.py similarity index 100% rename from Day01-15/Day10/code/gui2.py rename to Day01-15/code/Day10/gui2.py diff --git a/Day01-15/Day10/code/gui3.py b/Day01-15/code/Day10/gui3.py similarity index 100% rename from Day01-15/Day10/code/gui3.py rename to Day01-15/code/Day10/gui3.py diff --git a/Day01-15/Day10/code/renju.py b/Day01-15/code/Day10/renju.py similarity index 97% rename from Day01-15/Day10/code/renju.py rename to Day01-15/code/Day10/renju.py index 89cea1e6f..5f8cd8812 100644 --- a/Day01-15/Day10/code/renju.py +++ b/Day01-15/code/Day10/renju.py @@ -1,78 +1,78 @@ -import pygame - -EMPTY = 0 -BLACK = 1 -WHITE = 2 - -black_color = [0, 0, 0] -white_color = [255, 255, 255] - - -class RenjuBoard(object): - - def __init__(self): - self._board = [[]] * 15 - self.reset() - - def reset(self): - for row in range(len(self._board)): - self._board[row] = [EMPTY] * 15 - - def move(self, row, col, is_black): - if self._board[row][col] == EMPTY: - self._board[row][col] = BLACK if is_black else WHITE - return True - return False - - def draw(self, screen): - for index in range(1, 16): - pygame.draw.line(screen, black_color, - [40, 40 * index], [600, 40 * index], 1) - pygame.draw.line(screen, black_color, - [40 * index, 40], [40 * index, 600], 1) - pygame.draw.rect(screen, black_color, [36, 36, 568, 568], 4) - pygame.draw.circle(screen, black_color, [320, 320], 5, 0) - pygame.draw.circle(screen, black_color, [160, 160], 5, 0) - pygame.draw.circle(screen, black_color, [480, 480], 5, 0) - pygame.draw.circle(screen, black_color, [480, 160], 5, 0) - pygame.draw.circle(screen, black_color, [160, 480], 5, 0) - for row in range(len(self._board)): - for col in range(len(self._board[row])): - if self._board[row][col] != EMPTY: - ccolor = black_color \ - if self._board[row][col] == BLACK else white_color - pos = [40 * (col + 1), 40 * (row + 1)] - pygame.draw.circle(screen, ccolor, pos, 20, 0) - - -def main(): - board = RenjuBoard() - is_black = True - pygame.init() - pygame.display.set_caption('五子棋') - screen = pygame.display.set_mode([640, 640]) - screen.fill([255, 255, 0]) - board.draw(screen) - pygame.display.flip() - running = True - while running: - for event in pygame.event.get(): - if event.type == pygame.QUIT: - running = False - elif event.type == pygame.KEYUP: - pass - elif event.type == pygame.MOUSEBUTTONDOWN\ - and event.button == 1: - x, y = event.pos - row = round((y - 40) / 40) - col = round((x - 40) / 40) - if board.move(row, col, is_black): - is_black = not is_black - screen.fill([255, 255, 0]) - board.draw(screen) - pygame.display.flip() - pygame.quit() - - -if __name__ == '__main__': - main() +import pygame + +EMPTY = 0 +BLACK = 1 +WHITE = 2 + +black_color = [0, 0, 0] +white_color = [255, 255, 255] + + +class RenjuBoard(object): + + def __init__(self): + self._board = [[]] * 15 + self.reset() + + def reset(self): + for row in range(len(self._board)): + self._board[row] = [EMPTY] * 15 + + def move(self, row, col, is_black): + if self._board[row][col] == EMPTY: + self._board[row][col] = BLACK if is_black else WHITE + return True + return False + + def draw(self, screen): + for index in range(1, 16): + pygame.draw.line(screen, black_color, + [40, 40 * index], [600, 40 * index], 1) + pygame.draw.line(screen, black_color, + [40 * index, 40], [40 * index, 600], 1) + pygame.draw.rect(screen, black_color, [36, 36, 568, 568], 4) + pygame.draw.circle(screen, black_color, [320, 320], 5, 0) + pygame.draw.circle(screen, black_color, [160, 160], 5, 0) + pygame.draw.circle(screen, black_color, [480, 480], 5, 0) + pygame.draw.circle(screen, black_color, [480, 160], 5, 0) + pygame.draw.circle(screen, black_color, [160, 480], 5, 0) + for row in range(len(self._board)): + for col in range(len(self._board[row])): + if self._board[row][col] != EMPTY: + ccolor = black_color \ + if self._board[row][col] == BLACK else white_color + pos = [40 * (col + 1), 40 * (row + 1)] + pygame.draw.circle(screen, ccolor, pos, 20, 0) + + +def main(): + board = RenjuBoard() + is_black = True + pygame.init() + pygame.display.set_caption('五子棋') + screen = pygame.display.set_mode([640, 640]) + screen.fill([255, 255, 0]) + board.draw(screen) + pygame.display.flip() + running = True + while running: + for event in pygame.event.get(): + if event.type == pygame.QUIT: + running = False + elif event.type == pygame.KEYUP: + pass + elif event.type == pygame.MOUSEBUTTONDOWN\ + and event.button == 1: + x, y = event.pos + row = round((y - 40) / 40) + col = round((x - 40) / 40) + if board.move(row, col, is_black): + is_black = not is_black + screen.fill([255, 255, 0]) + board.draw(screen) + pygame.display.flip() + pygame.quit() + + +if __name__ == '__main__': + main() diff --git a/Day01-15/Day10/code/snake.py b/Day01-15/code/Day10/snake.py similarity index 96% rename from Day01-15/Day10/code/snake.py rename to Day01-15/code/Day10/snake.py index 71d7148e3..5147930ac 100644 --- a/Day01-15/Day10/code/snake.py +++ b/Day01-15/code/Day10/snake.py @@ -1,334 +1,334 @@ -from abc import ABCMeta, abstractmethod -from enum import Enum, unique -from random import randrange -from threading import Thread - -import pygame - - -class Color(object): - """颜色""" - - GRAY = (242, 242, 242) - BLACK = (0, 0, 0) - GREEN = (0, 255, 0) - PINK = (255, 20, 147) - - -@unique -class Direction(Enum): - """方向""" - - UP = 0 - RIGHT = 1 - DOWN = 2 - LEFT = 3 - - -class GameObject(object, metaclass=ABCMeta): - """游戏中的对象""" - - def __init__(self, x=0, y=0, color=Color.BLACK): - """ - 初始化方法 - - :param x: 横坐标 - :param y: 纵坐标 - :param color: 颜色 - """ - self._x = x - self._y = y - self._color = color - - @property - def x(self): - return self._x - - @property - def y(self): - return self._y - - @abstractmethod - def draw(self, screen): - """ - 绘制 - - :param screen: 屏幕 - """ - pass - - -class Wall(GameObject): - """围墙""" - - def __init__(self, x, y, width, height, color=Color.BLACK): - """ - 初始化方法 - - :param x: 横坐标 - :param y: 纵坐标 - :param width: 宽度 - :param height: 高度 - :param color: 颜色 - """ - super().__init__(x, y, color) - self._width = width - self._height = height - - @property - def width(self): - return self._width - - @property - def height(self): - return self._height - - def draw(self, screen): - pygame.draw.rect(screen, self._color, - (self._x, self._y, self._width, self._height), 4) - - -class Food(GameObject): - """食物""" - - def __init__(self, x, y, size, color=Color.PINK): - """ - 初始化方法 - - :param x: 横坐标 - :param y: 纵坐标 - :param size: 大小 - :param color: 颜色 - """ - super().__init__(x, y, color) - self._size = size - self._hidden = False - - def draw(self, screen): - if not self._hidden: - pygame.draw.circle(screen, self._color, - (self._x + self._size // 2, self._y + self._size // 2), - self._size // 2, 0) - self._hidden = not self._hidden - - -class SnakeNode(GameObject): - """蛇身上的节点""" - - def __init__(self, x, y, size, color=Color.GREEN): - """ - 初始化方法 - - :param x: 横坐标 - :param y: 纵坐标 - :param size: 大小 - :param color: 颜色 - """ - super().__init__(x, y, color) - self._size = size - - @property - def size(self): - return self._size - - def draw(self, screen): - pygame.draw.rect(screen, self._color, - (self._x, self._y, self._size, self._size), 0) - pygame.draw.rect(screen, Color.BLACK, - (self._x, self._y, self._size, self._size), 1) - - -class Snake(GameObject): - """蛇""" - - def __init__(self, x, y, size=20, length=5): - """ - 初始化方法 - - :param x: 横坐标 - :param y: 纵坐标 - :param size: 大小 - :param length: 初始长度 - """ - super().__init__() - self._dir = Direction.LEFT - self._nodes = [] - self._alive = True - self._new_dir = None - for index in range(length): - node = SnakeNode(x + index * size, y, size) - self._nodes.append(node) - - @property - def dir(self): - return self._dir - - @property - def alive(self): - return self._alive - - @property - def head(self): - return self._nodes[0] - - def change_dir(self, new_dir): - """ - 改变方向 - - :param new_dir: 新方向 - """ - if new_dir != self._dir and \ - (self._dir.value + new_dir.value) % 2 != 0: - self._new_dir = new_dir - - def move(self): - """移动""" - if self._new_dir: - self._dir, self._new_dir = self._new_dir, None - snake_dir = self._dir - x, y, size = self.head.x, self.head.y, self.head.size - if snake_dir == Direction.UP: - y -= size - elif snake_dir == Direction.RIGHT: - x += size - elif snake_dir == Direction.DOWN: - y += size - else: - x -= size - new_head = SnakeNode(x, y, size) - self._nodes.insert(0, new_head) - self._nodes.pop() - - def collide(self, wall): - """ - 撞墙 - - :param wall: 围墙 - """ - head = self.head - if head.x < wall.x or head.x + head.size > wall.x + wall.width \ - or head.y < wall.y or head.y + head.size > wall.y + wall.height: - self._alive = False - - def eat_food(self, food): - """ - 吃食物 - - :param food: 食物 - - :return: 吃到食物返回True否则返回False - """ - if self.head.x == food.x and self.head.y == food.y: - tail = self._nodes[-1] - self._nodes.append(tail) - return True - return False - - def eat_self(self): - """咬自己""" - for index in range(4, len(self._nodes)): - node = self._nodes[index] - if node.x == self.head.x and node.y == self.head.y: - self._alive = False - - def draw(self, screen): - for node in self._nodes: - node.draw(screen) - - -def main(): - - def refresh(): - """刷新游戏窗口""" - screen.fill(Color.GRAY) - wall.draw(screen) - food.draw(screen) - snake.draw(screen) - pygame.display.flip() - - def handle_key_event(key_event): - """处理按键事件""" - key = key_event.key - if key == pygame.K_F2: - reset_game() - elif key in (pygame.K_a, pygame.K_w, pygame.K_d, pygame.K_s): - if snake.alive: - if key == pygame.K_w: - new_dir = Direction.UP - elif key == pygame.K_d: - new_dir = Direction.RIGHT - elif key == pygame.K_s: - new_dir = Direction.DOWN - else: - new_dir = Direction.LEFT - snake.change_dir(new_dir) - - def create_food(): - """创建食物""" - unit_size = snake.head.size - max_row = wall.height // unit_size - max_col = wall.width // unit_size - row = randrange(0, max_row) - col = randrange(0, max_col) - return Food(wall.x + unit_size * col, wall.y + unit_size * row, unit_size) - - def reset_game(): - """重置游戏""" - nonlocal food, snake - food = create_food() - snake = Snake(250, 290) - - def background_task(): - nonlocal running, food - while running: - if snake.alive: - refresh() - clock.tick(10) - if snake.alive: - snake.move() - snake.collide(wall) - if snake.eat_food(food): - food = create_food() - snake.eat_self() - - """ - class BackgroundTask(Thread): - - def run(self): - nonlocal running, food - while running: - if snake.alive: - refresh() - clock.tick(10) - if snake.alive: - snake.move() - snake.collide(wall) - if snake.eat_food(food): - food = create_food() - snake.eat_self() - """ - - wall = Wall(10, 10, 600, 600) - snake = Snake(250, 290) - food = create_food() - pygame.init() - screen = pygame.display.set_mode((620, 620)) - pygame.display.set_caption('贪吃蛇') - # 创建控制游戏每秒帧数的时钟 - clock = pygame.time.Clock() - running = True - # 启动后台线程负责刷新窗口和让蛇移动 - # BackgroundTask().start() - Thread(target=background_task).start() - # 处理事件的消息循环 - while running: - for event in pygame.event.get(): - if event.type == pygame.QUIT: - running = False - elif event.type == pygame.KEYDOWN: - handle_key_event(event) - pygame.quit() - - -if __name__ == '__main__': - main() +from abc import ABCMeta, abstractmethod +from enum import Enum, unique +from random import randrange +from threading import Thread + +import pygame + + +class Color(object): + """颜色""" + + GRAY = (242, 242, 242) + BLACK = (0, 0, 0) + GREEN = (0, 255, 0) + PINK = (255, 20, 147) + + +@unique +class Direction(Enum): + """方向""" + + UP = 0 + RIGHT = 1 + DOWN = 2 + LEFT = 3 + + +class GameObject(object, metaclass=ABCMeta): + """游戏中的对象""" + + def __init__(self, x=0, y=0, color=Color.BLACK): + """ + 初始化方法 + + :param x: 横坐标 + :param y: 纵坐标 + :param color: 颜色 + """ + self._x = x + self._y = y + self._color = color + + @property + def x(self): + return self._x + + @property + def y(self): + return self._y + + @abstractmethod + def draw(self, screen): + """ + 绘制 + + :param screen: 屏幕 + """ + pass + + +class Wall(GameObject): + """围墙""" + + def __init__(self, x, y, width, height, color=Color.BLACK): + """ + 初始化方法 + + :param x: 横坐标 + :param y: 纵坐标 + :param width: 宽度 + :param height: 高度 + :param color: 颜色 + """ + super().__init__(x, y, color) + self._width = width + self._height = height + + @property + def width(self): + return self._width + + @property + def height(self): + return self._height + + def draw(self, screen): + pygame.draw.rect(screen, self._color, + (self._x, self._y, self._width, self._height), 4) + + +class Food(GameObject): + """食物""" + + def __init__(self, x, y, size, color=Color.PINK): + """ + 初始化方法 + + :param x: 横坐标 + :param y: 纵坐标 + :param size: 大小 + :param color: 颜色 + """ + super().__init__(x, y, color) + self._size = size + self._hidden = False + + def draw(self, screen): + if not self._hidden: + pygame.draw.circle(screen, self._color, + (self._x + self._size // 2, self._y + self._size // 2), + self._size // 2, 0) + self._hidden = not self._hidden + + +class SnakeNode(GameObject): + """蛇身上的节点""" + + def __init__(self, x, y, size, color=Color.GREEN): + """ + 初始化方法 + + :param x: 横坐标 + :param y: 纵坐标 + :param size: 大小 + :param color: 颜色 + """ + super().__init__(x, y, color) + self._size = size + + @property + def size(self): + return self._size + + def draw(self, screen): + pygame.draw.rect(screen, self._color, + (self._x, self._y, self._size, self._size), 0) + pygame.draw.rect(screen, Color.BLACK, + (self._x, self._y, self._size, self._size), 1) + + +class Snake(GameObject): + """蛇""" + + def __init__(self, x, y, size=20, length=5): + """ + 初始化方法 + + :param x: 横坐标 + :param y: 纵坐标 + :param size: 大小 + :param length: 初始长度 + """ + super().__init__() + self._dir = Direction.LEFT + self._nodes = [] + self._alive = True + self._new_dir = None + for index in range(length): + node = SnakeNode(x + index * size, y, size) + self._nodes.append(node) + + @property + def dir(self): + return self._dir + + @property + def alive(self): + return self._alive + + @property + def head(self): + return self._nodes[0] + + def change_dir(self, new_dir): + """ + 改变方向 + + :param new_dir: 新方向 + """ + if new_dir != self._dir and \ + (self._dir.value + new_dir.value) % 2 != 0: + self._new_dir = new_dir + + def move(self): + """移动""" + if self._new_dir: + self._dir, self._new_dir = self._new_dir, None + snake_dir = self._dir + x, y, size = self.head.x, self.head.y, self.head.size + if snake_dir == Direction.UP: + y -= size + elif snake_dir == Direction.RIGHT: + x += size + elif snake_dir == Direction.DOWN: + y += size + else: + x -= size + new_head = SnakeNode(x, y, size) + self._nodes.insert(0, new_head) + self._nodes.pop() + + def collide(self, wall): + """ + 撞墙 + + :param wall: 围墙 + """ + head = self.head + if head.x < wall.x or head.x + head.size > wall.x + wall.width \ + or head.y < wall.y or head.y + head.size > wall.y + wall.height: + self._alive = False + + def eat_food(self, food): + """ + 吃食物 + + :param food: 食物 + + :return: 吃到食物返回True否则返回False + """ + if self.head.x == food.x and self.head.y == food.y: + tail = self._nodes[-1] + self._nodes.append(tail) + return True + return False + + def eat_self(self): + """咬自己""" + for index in range(4, len(self._nodes)): + node = self._nodes[index] + if node.x == self.head.x and node.y == self.head.y: + self._alive = False + + def draw(self, screen): + for node in self._nodes: + node.draw(screen) + + +def main(): + + def refresh(): + """刷新游戏窗口""" + screen.fill(Color.GRAY) + wall.draw(screen) + food.draw(screen) + snake.draw(screen) + pygame.display.flip() + + def handle_key_event(key_event): + """处理按键事件""" + key = key_event.key + if key == pygame.K_F2: + reset_game() + elif key in (pygame.K_a, pygame.K_w, pygame.K_d, pygame.K_s): + if snake.alive: + if key == pygame.K_w: + new_dir = Direction.UP + elif key == pygame.K_d: + new_dir = Direction.RIGHT + elif key == pygame.K_s: + new_dir = Direction.DOWN + else: + new_dir = Direction.LEFT + snake.change_dir(new_dir) + + def create_food(): + """创建食物""" + unit_size = snake.head.size + max_row = wall.height // unit_size + max_col = wall.width // unit_size + row = randrange(0, max_row) + col = randrange(0, max_col) + return Food(wall.x + unit_size * col, wall.y + unit_size * row, unit_size) + + def reset_game(): + """重置游戏""" + nonlocal food, snake + food = create_food() + snake = Snake(250, 290) + + def background_task(): + nonlocal running, food + while running: + if snake.alive: + refresh() + clock.tick(10) + if snake.alive: + snake.move() + snake.collide(wall) + if snake.eat_food(food): + food = create_food() + snake.eat_self() + + """ + class BackgroundTask(Thread): + + def run(self): + nonlocal running, food + while running: + if snake.alive: + refresh() + clock.tick(10) + if snake.alive: + snake.move() + snake.collide(wall) + if snake.eat_food(food): + food = create_food() + snake.eat_self() + """ + + wall = Wall(10, 10, 600, 600) + snake = Snake(250, 290) + food = create_food() + pygame.init() + screen = pygame.display.set_mode((620, 620)) + pygame.display.set_caption('贪吃蛇') + # 创建控制游戏每秒帧数的时钟 + clock = pygame.time.Clock() + running = True + # 启动后台线程负责刷新窗口和让蛇移动 + # BackgroundTask().start() + Thread(target=background_task).start() + # 处理事件的消息循环 + while running: + for event in pygame.event.get(): + if event.type == pygame.QUIT: + running = False + elif event.type == pygame.KEYDOWN: + handle_key_event(event) + pygame.quit() + + +if __name__ == '__main__': + main() diff --git a/Day01-15/Day10/code/turtle1.py b/Day01-15/code/Day10/turtle1.py similarity index 100% rename from Day01-15/Day10/code/turtle1.py rename to Day01-15/code/Day10/turtle1.py diff --git a/Day01-15/Day11/code/csv1.py b/Day01-15/code/Day11/csv1.py similarity index 100% rename from Day01-15/Day11/code/csv1.py rename to Day01-15/code/Day11/csv1.py diff --git a/Day01-15/Day11/code/csv2.py b/Day01-15/code/Day11/csv2.py similarity index 100% rename from Day01-15/Day11/code/csv2.py rename to Day01-15/code/Day11/csv2.py diff --git a/Day01-15/Day11/code/ex1.py b/Day01-15/code/Day11/ex1.py similarity index 100% rename from Day01-15/Day11/code/ex1.py rename to Day01-15/code/Day11/ex1.py diff --git a/Day01-15/Day11/code/ex2.py b/Day01-15/code/Day11/ex2.py similarity index 100% rename from Day01-15/Day11/code/ex2.py rename to Day01-15/code/Day11/ex2.py diff --git a/Day01-15/Day11/code/ex3.py b/Day01-15/code/Day11/ex3.py similarity index 100% rename from Day01-15/Day11/code/ex3.py rename to Day01-15/code/Day11/ex3.py diff --git a/Day01-15/Day11/code/ex4.py b/Day01-15/code/Day11/ex4.py similarity index 100% rename from Day01-15/Day11/code/ex4.py rename to Day01-15/code/Day11/ex4.py diff --git a/Day01-15/Day11/code/example.csv b/Day01-15/code/Day11/example.csv similarity index 100% rename from Day01-15/Day11/code/example.csv rename to Day01-15/code/Day11/example.csv diff --git a/Day01-15/Day11/code/file1.py b/Day01-15/code/Day11/file1.py similarity index 100% rename from Day01-15/Day11/code/file1.py rename to Day01-15/code/Day11/file1.py diff --git a/Day01-15/Day11/code/file2.py b/Day01-15/code/Day11/file2.py similarity index 100% rename from Day01-15/Day11/code/file2.py rename to Day01-15/code/Day11/file2.py diff --git a/Day01-15/Day11/code/file3.py b/Day01-15/code/Day11/file3.py similarity index 100% rename from Day01-15/Day11/code/file3.py rename to Day01-15/code/Day11/file3.py diff --git a/Day01-15/Day11/code/file4.py b/Day01-15/code/Day11/file4.py similarity index 100% rename from Day01-15/Day11/code/file4.py rename to Day01-15/code/Day11/file4.py diff --git a/Day01-15/Day11/code/json1.py b/Day01-15/code/Day11/json1.py similarity index 100% rename from Day01-15/Day11/code/json1.py rename to Day01-15/code/Day11/json1.py diff --git a/Day01-15/Day11/code/json2.py b/Day01-15/code/Day11/json2.py similarity index 100% rename from Day01-15/Day11/code/json2.py rename to Day01-15/code/Day11/json2.py diff --git a/Day01-15/Day11/code/mm.jpg b/Day01-15/code/Day11/mm.jpg similarity index 100% rename from Day01-15/Day11/code/mm.jpg rename to Day01-15/code/Day11/mm.jpg diff --git a/Day01-15/Day11/code/pi_million_digits.txt b/Day01-15/code/Day11/pi_million_digits.txt similarity index 100% rename from Day01-15/Day11/code/pi_million_digits.txt rename to Day01-15/code/Day11/pi_million_digits.txt diff --git a/Day01-15/Day11/code/teacher.csv b/Day01-15/code/Day11/teacher.csv similarity index 100% rename from Day01-15/Day11/code/teacher.csv rename to Day01-15/code/Day11/teacher.csv diff --git "a/Day01-15/Day11/code/\350\207\264\346\251\241\346\240\221.txt" "b/Day01-15/code/Day11/\350\207\264\346\251\241\346\240\221.txt" similarity index 100% rename from "Day01-15/Day11/code/\350\207\264\346\251\241\346\240\221.txt" rename to "Day01-15/code/Day11/\350\207\264\346\251\241\346\240\221.txt" diff --git a/Day01-15/Day12/code/str1.py b/Day01-15/code/Day12/str1.py similarity index 100% rename from Day01-15/Day12/code/str1.py rename to Day01-15/code/Day12/str1.py diff --git a/Day01-15/Day12/code/str2.py b/Day01-15/code/Day12/str2.py similarity index 100% rename from Day01-15/Day12/code/str2.py rename to Day01-15/code/Day12/str2.py diff --git a/Day01-15/Day12/code/test3.py b/Day01-15/code/Day12/test3.py similarity index 100% rename from Day01-15/Day12/code/test3.py rename to Day01-15/code/Day12/test3.py diff --git a/Day01-15/Day12/code/test4.py b/Day01-15/code/Day12/test4.py similarity index 100% rename from Day01-15/Day12/code/test4.py rename to Day01-15/code/Day12/test4.py diff --git a/Day01-15/Day12/code/test5.py b/Day01-15/code/Day12/test5.py similarity index 100% rename from Day01-15/Day12/code/test5.py rename to Day01-15/code/Day12/test5.py diff --git a/Day01-15/Day13/code/asyncio1.py b/Day01-15/code/Day13/asyncio1.py similarity index 100% rename from Day01-15/Day13/code/asyncio1.py rename to Day01-15/code/Day13/asyncio1.py diff --git a/Day01-15/Day13/code/asyncio2.py b/Day01-15/code/Day13/asyncio2.py similarity index 100% rename from Day01-15/Day13/code/asyncio2.py rename to Day01-15/code/Day13/asyncio2.py diff --git a/Day01-15/Day13/code/asyncio3.py b/Day01-15/code/Day13/asyncio3.py similarity index 100% rename from Day01-15/Day13/code/asyncio3.py rename to Day01-15/code/Day13/asyncio3.py diff --git a/Day01-15/Day13/code/coroutine1.py b/Day01-15/code/Day13/coroutine1.py similarity index 100% rename from Day01-15/Day13/code/coroutine1.py rename to Day01-15/code/Day13/coroutine1.py diff --git a/Day01-15/Day13/code/coroutine2.py b/Day01-15/code/Day13/coroutine2.py similarity index 100% rename from Day01-15/Day13/code/coroutine2.py rename to Day01-15/code/Day13/coroutine2.py diff --git a/Day01-15/Day13/code/generator1.py b/Day01-15/code/Day13/generator1.py similarity index 100% rename from Day01-15/Day13/code/generator1.py rename to Day01-15/code/Day13/generator1.py diff --git a/Day01-15/Day13/code/generator2.py b/Day01-15/code/Day13/generator2.py similarity index 100% rename from Day01-15/Day13/code/generator2.py rename to Day01-15/code/Day13/generator2.py diff --git a/Day01-15/Day13/code/multiprocess1.py b/Day01-15/code/Day13/multiprocess1.py similarity index 100% rename from Day01-15/Day13/code/multiprocess1.py rename to Day01-15/code/Day13/multiprocess1.py diff --git a/Day01-15/Day13/code/multiprocess2.py b/Day01-15/code/Day13/multiprocess2.py similarity index 100% rename from Day01-15/Day13/code/multiprocess2.py rename to Day01-15/code/Day13/multiprocess2.py diff --git a/Day01-15/Day13/code/multiprocess3.py b/Day01-15/code/Day13/multiprocess3.py similarity index 100% rename from Day01-15/Day13/code/multiprocess3.py rename to Day01-15/code/Day13/multiprocess3.py diff --git a/Day01-15/Day13/code/multiprocess4.py b/Day01-15/code/Day13/multiprocess4.py similarity index 100% rename from Day01-15/Day13/code/multiprocess4.py rename to Day01-15/code/Day13/multiprocess4.py diff --git a/Day01-15/Day13/code/multithread1.py b/Day01-15/code/Day13/multithread1.py similarity index 100% rename from Day01-15/Day13/code/multithread1.py rename to Day01-15/code/Day13/multithread1.py diff --git a/Day01-15/Day13/code/multithread2.py b/Day01-15/code/Day13/multithread2.py similarity index 100% rename from Day01-15/Day13/code/multithread2.py rename to Day01-15/code/Day13/multithread2.py diff --git a/Day01-15/Day13/code/multithread3.py b/Day01-15/code/Day13/multithread3.py similarity index 100% rename from Day01-15/Day13/code/multithread3.py rename to Day01-15/code/Day13/multithread3.py diff --git a/Day01-15/Day13/code/multithread4.py b/Day01-15/code/Day13/multithread4.py similarity index 100% rename from Day01-15/Day13/code/multithread4.py rename to Day01-15/code/Day13/multithread4.py diff --git a/Day01-15/Day13/code/multithread5.py b/Day01-15/code/Day13/multithread5.py similarity index 100% rename from Day01-15/Day13/code/multithread5.py rename to Day01-15/code/Day13/multithread5.py diff --git a/Day01-15/Day13/code/multithread6.py b/Day01-15/code/Day13/multithread6.py similarity index 100% rename from Day01-15/Day13/code/multithread6.py rename to Day01-15/code/Day13/multithread6.py diff --git a/Day01-15/Day13/code/singlethread1.py b/Day01-15/code/Day13/singlethread1.py similarity index 100% rename from Day01-15/Day13/code/singlethread1.py rename to Day01-15/code/Day13/singlethread1.py diff --git a/Day01-15/Day13/code/singlethread2.py b/Day01-15/code/Day13/singlethread2.py similarity index 100% rename from Day01-15/Day13/code/singlethread2.py rename to Day01-15/code/Day13/singlethread2.py diff --git a/Day01-15/Day13/code/test2.py b/Day01-15/code/Day13/test2.py similarity index 100% rename from Day01-15/Day13/code/test2.py rename to Day01-15/code/Day13/test2.py diff --git a/Day01-15/Day13/code/test3.py b/Day01-15/code/Day13/test3.py similarity index 100% rename from Day01-15/Day13/code/test3.py rename to Day01-15/code/Day13/test3.py diff --git a/Day01-15/Day14-A/code/chatclient.py b/Day01-15/code/Day14/chatclient.py similarity index 100% rename from Day01-15/Day14-A/code/chatclient.py rename to Day01-15/code/Day14/chatclient.py diff --git a/Day01-15/Day14-A/code/chatserver.py b/Day01-15/code/Day14/chatserver.py similarity index 100% rename from Day01-15/Day14-A/code/chatserver.py rename to Day01-15/code/Day14/chatserver.py diff --git a/Day01-15/Day14-A/code/fileclient.py b/Day01-15/code/Day14/fileclient.py similarity index 100% rename from Day01-15/Day14-A/code/fileclient.py rename to Day01-15/code/Day14/fileclient.py diff --git a/Day01-15/Day14-A/code/fileserver.py b/Day01-15/code/Day14/fileserver.py similarity index 100% rename from Day01-15/Day14-A/code/fileserver.py rename to Day01-15/code/Day14/fileserver.py diff --git a/Day01-15/Day14-A/code/guido.jpg b/Day01-15/code/Day14/guido.jpg similarity index 100% rename from Day01-15/Day14-A/code/guido.jpg rename to Day01-15/code/Day14/guido.jpg diff --git a/Day01-15/Day14-A/code/mmdownloader.py b/Day01-15/code/Day14/mmdownloader.py similarity index 100% rename from Day01-15/Day14-A/code/mmdownloader.py rename to Day01-15/code/Day14/mmdownloader.py diff --git a/Day01-15/Day14-A/code/socket1.py b/Day01-15/code/Day14/socket1.py similarity index 100% rename from Day01-15/Day14-A/code/socket1.py rename to Day01-15/code/Day14/socket1.py diff --git a/Day01-15/Day14-A/code/socket2.py b/Day01-15/code/Day14/socket2.py similarity index 100% rename from Day01-15/Day14-A/code/socket2.py rename to Day01-15/code/Day14/socket2.py diff --git a/Day01-15/Day14-A/code/socket3.py b/Day01-15/code/Day14/socket3.py similarity index 100% rename from Day01-15/Day14-A/code/socket3.py rename to Day01-15/code/Day14/socket3.py diff --git a/Day01-15/Day14-A/code/socket4.py b/Day01-15/code/Day14/socket4.py similarity index 100% rename from Day01-15/Day14-A/code/socket4.py rename to Day01-15/code/Day14/socket4.py diff --git a/Day01-15/Day14-A/code/socket5.py b/Day01-15/code/Day14/socket5.py similarity index 100% rename from Day01-15/Day14-A/code/socket5.py rename to Day01-15/code/Day14/socket5.py diff --git a/Day01-15/Day14-A/code/timeclient.py b/Day01-15/code/Day14/timeclient.py similarity index 100% rename from Day01-15/Day14-A/code/timeclient.py rename to Day01-15/code/Day14/timeclient.py diff --git a/Day01-15/Day14-A/code/timeserver.py b/Day01-15/code/Day14/timeserver.py similarity index 100% rename from Day01-15/Day14-A/code/timeserver.py rename to Day01-15/code/Day14/timeserver.py diff --git a/Day01-15/Day15/code/excel1.py b/Day01-15/code/Day15/excel1.py similarity index 100% rename from Day01-15/Day15/code/excel1.py rename to Day01-15/code/Day15/excel1.py diff --git a/Day01-15/Day15/code/excel2.py b/Day01-15/code/Day15/excel2.py similarity index 100% rename from Day01-15/Day15/code/excel2.py rename to Day01-15/code/Day15/excel2.py diff --git a/Day01-15/Day15/code/pdf1.py b/Day01-15/code/Day15/pdf1.py similarity index 100% rename from Day01-15/Day15/code/pdf1.py rename to Day01-15/code/Day15/pdf1.py diff --git a/Day01-15/Day15/code/pdf2.py b/Day01-15/code/Day15/pdf2.py similarity index 100% rename from Day01-15/Day15/code/pdf2.py rename to Day01-15/code/Day15/pdf2.py diff --git a/Day01-15/Day15/code/pillow1.py b/Day01-15/code/Day15/pillow1.py similarity index 100% rename from Day01-15/Day15/code/pillow1.py rename to Day01-15/code/Day15/pillow1.py diff --git "a/Day01-15/Day15/code/res/Docker\345\205\245\351\227\250\346\225\231\347\250\213.pdf" "b/Day01-15/code/Day15/res/Docker\345\205\245\351\227\250\346\225\231\347\250\213.pdf" similarity index 100% rename from "Day01-15/Day15/code/res/Docker\345\205\245\351\227\250\346\225\231\347\250\213.pdf" rename to "Day01-15/code/Day15/res/Docker\345\205\245\351\227\250\346\225\231\347\250\213.pdf" diff --git a/Day01-15/Day15/code/res/guido.jpg b/Day01-15/code/Day15/res/guido.jpg similarity index 100% rename from Day01-15/Day15/code/res/guido.jpg rename to Day01-15/code/Day15/res/guido.jpg diff --git a/Day01-15/Day15/code/res/luohao.png b/Day01-15/code/Day15/res/luohao.png similarity index 100% rename from Day01-15/Day15/code/res/luohao.png rename to Day01-15/code/Day15/res/luohao.png diff --git "a/Day01-15/Day15/code/res/\345\255\246\347\224\237\346\230\216\347\273\206\350\241\250.xlsx" "b/Day01-15/code/Day15/res/\345\255\246\347\224\237\346\230\216\347\273\206\350\241\250.xlsx" similarity index 100% rename from "Day01-15/Day15/code/res/\345\255\246\347\224\237\346\230\216\347\273\206\350\241\250.xlsx" rename to "Day01-15/code/Day15/res/\345\255\246\347\224\237\346\230\216\347\273\206\350\241\250.xlsx" diff --git "a/Day01-15/Day15/code/res/\347\224\250\345\207\275\346\225\260\350\277\230\346\230\257\347\224\250\345\244\215\346\235\202\347\232\204\350\241\250\350\276\276\345\274\217.docx" "b/Day01-15/code/Day15/res/\347\224\250\345\207\275\346\225\260\350\277\230\346\230\257\347\224\250\345\244\215\346\235\202\347\232\204\350\241\250\350\276\276\345\274\217.docx" similarity index 100% rename from "Day01-15/Day15/code/res/\347\224\250\345\207\275\346\225\260\350\277\230\346\230\257\347\224\250\345\244\215\346\235\202\347\232\204\350\241\250\350\276\276\345\274\217.docx" rename to "Day01-15/code/Day15/res/\347\224\250\345\207\275\346\225\260\350\277\230\346\230\257\347\224\250\345\244\215\346\235\202\347\232\204\350\241\250\350\276\276\345\274\217.docx" diff --git a/Day01-15/Day15/code/word1.py b/Day01-15/code/Day15/word1.py similarity index 100% rename from Day01-15/Day15/code/word1.py rename to Day01-15/code/Day15/word1.py diff --git a/Day01-15/Day15/code/word2.py b/Day01-15/code/Day15/word2.py similarity index 100% rename from Day01-15/Day15/code/word2.py rename to Day01-15/code/Day15/word2.py diff --git a/Day01-15/Day14-A/res/TCP-IP-model.png b/Day01-15/res/TCP-IP-model.png similarity index 100% rename from Day01-15/Day14-A/res/TCP-IP-model.png rename to Day01-15/res/TCP-IP-model.png diff --git a/Day01-15/Day14-A/res/after-browser.jpg b/Day01-15/res/after-browser.jpg similarity index 100% rename from Day01-15/Day14-A/res/after-browser.jpg rename to Day01-15/res/after-browser.jpg diff --git a/Day01-15/Day14-A/res/arpanet.png b/Day01-15/res/arpanet.png similarity index 100% rename from Day01-15/Day14-A/res/arpanet.png rename to Day01-15/res/arpanet.png diff --git a/Day01-15/Day10/res/ball-game.png b/Day01-15/res/ball-game.png similarity index 100% rename from Day01-15/Day10/res/ball-game.png rename to Day01-15/res/ball-game.png diff --git a/Day01-15/Day10/res/ball.png b/Day01-15/res/ball.png similarity index 100% rename from Day01-15/Day10/res/ball.png rename to Day01-15/res/ball.png diff --git a/Day01-15/Day14-A/res/before-browser.jpg b/Day01-15/res/before-browser.jpg similarity index 100% rename from Day01-15/Day14-A/res/before-browser.jpg rename to Day01-15/res/before-browser.jpg diff --git a/Day01-15/Day14-A/res/browers.jpg b/Day01-15/res/browers.jpg similarity index 100% rename from Day01-15/Day14-A/res/browers.jpg rename to Day01-15/res/browers.jpg diff --git a/Day01-15/Day14-A/res/browser-market-place.jpeg b/Day01-15/res/browser-market-place.jpeg similarity index 100% rename from Day01-15/Day14-A/res/browser-market-place.jpeg rename to Day01-15/res/browser-market-place.jpeg diff --git a/Day01-15/Day07/res/fibonacci-blocks.png b/Day01-15/res/fibonacci-blocks.png similarity index 100% rename from Day01-15/Day07/res/fibonacci-blocks.png rename to Day01-15/res/fibonacci-blocks.png diff --git a/Day01-15/Day11/res/file-open-mode.png b/Day01-15/res/file-open-mode.png similarity index 100% rename from Day01-15/Day11/res/file-open-mode.png rename to Day01-15/res/file-open-mode.png diff --git a/Day01-15/Day03/res/formula_1.png b/Day01-15/res/formula_1.png similarity index 100% rename from Day01-15/Day03/res/formula_1.png rename to Day01-15/res/formula_1.png diff --git a/Day01-15/Day04/res/formula_1.png b/Day01-15/res/formula_2.png similarity index 100% rename from Day01-15/Day04/res/formula_1.png rename to Day01-15/res/formula_2.png diff --git a/Day01-15/Day06/res/formula_1.png b/Day01-15/res/formula_3.png similarity index 100% rename from Day01-15/Day06/res/formula_1.png rename to Day01-15/res/formula_3.png diff --git a/Day01-15/Day06/res/formula_2.png b/Day01-15/res/formula_4.png similarity index 100% rename from Day01-15/Day06/res/formula_2.png rename to Day01-15/res/formula_4.png diff --git a/Day01-15/Day07/res/formula_1.png b/Day01-15/res/formula_5.png similarity index 100% rename from Day01-15/Day07/res/formula_1.png rename to Day01-15/res/formula_5.png diff --git a/Day01-15/Day07/res/formula_2.png b/Day01-15/res/formula_6.png similarity index 100% rename from Day01-15/Day07/res/formula_2.png rename to Day01-15/res/formula_6.png diff --git a/Day01-15/Day07/res/formula_3.png b/Day01-15/res/formula_7.png similarity index 100% rename from Day01-15/Day07/res/formula_3.png rename to Day01-15/res/formula_7.png diff --git a/Day01-15/Day07/res/formula_4.png b/Day01-15/res/formula_8.png similarity index 100% rename from Day01-15/Day07/res/formula_4.png rename to Day01-15/res/formula_8.png diff --git a/Day01-15/Day14-A/res/how-data-is-processed.jpg b/Day01-15/res/how-data-is-processed.jpg similarity index 100% rename from Day01-15/Day14-A/res/how-data-is-processed.jpg rename to Day01-15/res/how-data-is-processed.jpg diff --git a/Day01-15/Day15/res/image-crop.png b/Day01-15/res/image-crop.png similarity index 100% rename from Day01-15/Day15/res/image-crop.png rename to Day01-15/res/image-crop.png diff --git a/Day01-15/Day15/res/image-filter.png b/Day01-15/res/image-filter.png similarity index 100% rename from Day01-15/Day15/res/image-filter.png rename to Day01-15/res/image-filter.png diff --git a/Day01-15/Day15/res/image-paste.png b/Day01-15/res/image-paste.png similarity index 100% rename from Day01-15/Day15/res/image-paste.png rename to Day01-15/res/image-paste.png diff --git a/Day01-15/Day15/res/image-putpixel.png b/Day01-15/res/image-putpixel.png similarity index 100% rename from Day01-15/Day15/res/image-putpixel.png rename to Day01-15/res/image-putpixel.png diff --git a/Day01-15/Day15/res/image-rotate.png b/Day01-15/res/image-rotate.png similarity index 100% rename from Day01-15/Day15/res/image-rotate.png rename to Day01-15/res/image-rotate.png diff --git a/Day01-15/Day15/res/image-show.png b/Day01-15/res/image-show.png similarity index 100% rename from Day01-15/Day15/res/image-show.png rename to Day01-15/res/image-show.png diff --git a/Day01-15/Day15/res/image-thumbnail.png b/Day01-15/res/image-thumbnail.png similarity index 100% rename from Day01-15/Day15/res/image-thumbnail.png rename to Day01-15/res/image-thumbnail.png diff --git a/Day01-15/Day15/res/image-transpose.png b/Day01-15/res/image-transpose.png similarity index 100% rename from Day01-15/Day15/res/image-transpose.png rename to Day01-15/res/image-transpose.png diff --git a/Day01-15/Day07/res/ipython-timeit.png b/Day01-15/res/ipython-timeit.png similarity index 100% rename from Day01-15/Day07/res/ipython-timeit.png rename to Day01-15/res/ipython-timeit.png diff --git a/Day01-15/Day13/res/macos-monitor.png b/Day01-15/res/macos-monitor.png similarity index 100% rename from Day01-15/Day13/res/macos-monitor.png rename to Day01-15/res/macos-monitor.png diff --git a/Day01-15/Day08/res/object-feature.png b/Day01-15/res/object-feature.png similarity index 100% rename from Day01-15/Day08/res/object-feature.png rename to Day01-15/res/object-feature.png diff --git a/Day01-15/Day08/res/oop-zhihu.png b/Day01-15/res/oop-zhihu.png similarity index 100% rename from Day01-15/Day08/res/oop-zhihu.png rename to Day01-15/res/oop-zhihu.png diff --git a/Day01-15/Day14-A/res/osi_rm.gif b/Day01-15/res/osi_rm.gif similarity index 100% rename from Day01-15/Day14-A/res/osi_rm.gif rename to Day01-15/res/osi_rm.gif diff --git a/Day01-15/Day14-A/res/osimodel.png b/Day01-15/res/osimodel.png similarity index 100% rename from Day01-15/Day14-A/res/osimodel.png rename to Day01-15/res/osimodel.png diff --git a/Day01-15/Day01/res/python-idle.png b/Day01-15/res/python-idle.png similarity index 100% rename from Day01-15/Day01/res/python-idle.png rename to Day01-15/res/python-idle.png diff --git a/Day01-15/Day01/res/python-ipython.png b/Day01-15/res/python-ipython.png similarity index 100% rename from Day01-15/Day01/res/python-ipython.png rename to Day01-15/res/python-ipython.png diff --git a/Day01-15/Day01/res/python-jupyter-1.png b/Day01-15/res/python-jupyter-1.png similarity index 100% rename from Day01-15/Day01/res/python-jupyter-1.png rename to Day01-15/res/python-jupyter-1.png diff --git a/Day01-15/Day01/res/python-jupyter-2.png b/Day01-15/res/python-jupyter-2.png similarity index 100% rename from Day01-15/Day01/res/python-jupyter-2.png rename to Day01-15/res/python-jupyter-2.png diff --git a/Day01-15/Day01/res/python-pycharm.png b/Day01-15/res/python-pycharm.png similarity index 100% rename from Day01-15/Day01/res/python-pycharm.png rename to Day01-15/res/python-pycharm.png diff --git a/Day01-15/Day07/res/python-set.png b/Day01-15/res/python-set.png similarity index 100% rename from Day01-15/Day07/res/python-set.png rename to Day01-15/res/python-set.png diff --git a/Day01-15/Day01/res/python-sublime.png b/Day01-15/res/python-sublime.png similarity index 100% rename from Day01-15/Day01/res/python-sublime.png rename to Day01-15/res/python-sublime.png diff --git a/Day01-15/Day14-A/res/tcpipprotocols.png b/Day01-15/res/tcpipprotocols.png similarity index 100% rename from Day01-15/Day14-A/res/tcpipprotocols.png rename to Day01-15/res/tcpipprotocols.png diff --git a/Day01-15/Day12/res/tel-start-number.png b/Day01-15/res/tel-start-number.png similarity index 100% rename from Day01-15/Day12/res/tel-start-number.png rename to Day01-15/res/tel-start-number.png diff --git a/Day01-15/Day14-A/res/telnet.png b/Day01-15/res/telnet.png similarity index 100% rename from Day01-15/Day14-A/res/telnet.png rename to Day01-15/res/telnet.png diff --git a/Day01-15/Day09/res/uml-components.png b/Day01-15/res/uml-components.png similarity index 100% rename from Day01-15/Day09/res/uml-components.png rename to Day01-15/res/uml-components.png diff --git a/Day01-15/Day09/res/uml-example.png b/Day01-15/res/uml-example.png similarity index 100% rename from Day01-15/Day09/res/uml-example.png rename to Day01-15/res/uml-example.png diff --git "a/Day16-20/Python\350\257\255\350\250\200\350\277\233\351\230\266.md" "b/Day16-20/16.Python\350\257\255\350\250\200\350\277\233\351\230\266.md" similarity index 100% rename from "Day16-20/Python\350\257\255\350\250\200\350\277\233\351\230\266.md" rename to "Day16-20/16.Python\350\257\255\350\250\200\350\277\233\351\230\266.md" diff --git "a/Day21-30/Web\345\211\215\347\253\257\346\246\202\350\277\260.md" "b/Day21-30/21.Web\345\211\215\347\253\257\346\246\202\350\277\260.md" similarity index 100% rename from "Day21-30/Web\345\211\215\347\253\257\346\246\202\350\277\260.md" rename to "Day21-30/21.Web\345\211\215\347\253\257\346\246\202\350\277\260.md" diff --git "a/Day31-35/\347\216\251\350\275\254Linux\346\223\215\344\275\234\347\263\273\347\273\237.md" "b/Day31-35/31.\347\216\251\350\275\254Linux\346\223\215\344\275\234\347\263\273\347\273\237.md" similarity index 100% rename from "Day31-35/\347\216\251\350\275\254Linux\346\223\215\344\275\234\347\263\273\347\273\237.md" rename to "Day31-35/31.\347\216\251\350\275\254Linux\346\223\215\344\275\234\347\263\273\347\273\237.md" diff --git "a/Day36-40/\345\205\263\347\263\273\345\236\213\346\225\260\346\215\256\345\272\223MySQL.md" "b/Day36-40/36.\345\205\263\347\263\273\345\236\213\346\225\260\346\215\256\345\272\223MySQL.md" similarity index 100% rename from "Day36-40/\345\205\263\347\263\273\345\236\213\346\225\260\346\215\256\345\272\223MySQL.md" rename to "Day36-40/36.\345\205\263\347\263\273\345\236\213\346\225\260\346\215\256\345\272\223MySQL.md" diff --git "a/Day36-40/NoSQL\345\205\245\351\227\250.md" "b/Day36-40/39.NoSQL\345\205\245\351\227\250.md" similarity index 100% rename from "Day36-40/NoSQL\345\205\245\351\227\250.md" rename to "Day36-40/39.NoSQL\345\205\245\351\227\250.md" diff --git "a/Day41-55/01.\345\277\253\351\200\237\344\270\212\346\211\213.md" "b/Day41-55/41.\345\277\253\351\200\237\344\270\212\346\211\213.md" similarity index 100% rename from "Day41-55/01.\345\277\253\351\200\237\344\270\212\346\211\213.md" rename to "Day41-55/41.\345\277\253\351\200\237\344\270\212\346\211\213.md" diff --git "a/Day41-55/02.\346\267\261\345\205\245\346\250\241\345\236\213.md" "b/Day41-55/42.\346\267\261\345\205\245\346\250\241\345\236\213.md" similarity index 100% rename from "Day41-55/02.\346\267\261\345\205\245\346\250\241\345\236\213.md" rename to "Day41-55/42.\346\267\261\345\205\245\346\250\241\345\236\213.md" diff --git "a/Day41-55/03.\351\235\231\346\200\201\350\265\204\346\272\220\345\222\214Ajax\350\257\267\346\261\202.md" "b/Day41-55/43.\351\235\231\346\200\201\350\265\204\346\272\220\345\222\214Ajax\350\257\267\346\261\202.md" similarity index 100% rename from "Day41-55/03.\351\235\231\346\200\201\350\265\204\346\272\220\345\222\214Ajax\350\257\267\346\261\202.md" rename to "Day41-55/43.\351\235\231\346\200\201\350\265\204\346\272\220\345\222\214Ajax\350\257\267\346\261\202.md" diff --git "a/Day41-55/04.\350\241\250\345\215\225\347\232\204\345\272\224\347\224\250.md" "b/Day41-55/44.\350\241\250\345\215\225\347\232\204\345\272\224\347\224\250.md" similarity index 100% rename from "Day41-55/04.\350\241\250\345\215\225\347\232\204\345\272\224\347\224\250.md" rename to "Day41-55/44.\350\241\250\345\215\225\347\232\204\345\272\224\347\224\250.md" diff --git "a/Day41-55/05.Cookie\345\222\214Session.md" "b/Day41-55/45.Cookie\345\222\214Session.md" similarity index 100% rename from "Day41-55/05.Cookie\345\222\214Session.md" rename to "Day41-55/45.Cookie\345\222\214Session.md" diff --git "a/Day41-55/06.\344\270\255\351\227\264\344\273\266\347\232\204\345\272\224\347\224\250.md" "b/Day41-55/46.\344\270\255\351\227\264\344\273\266\347\232\204\345\272\224\347\224\250.md" similarity index 100% rename from "Day41-55/06.\344\270\255\351\227\264\344\273\266\347\232\204\345\272\224\347\224\250.md" rename to "Day41-55/46.\344\270\255\351\227\264\344\273\266\347\232\204\345\272\224\347\224\250.md" diff --git "a/Day41-55/07.\346\227\245\345\277\227\345\222\214\350\260\203\350\257\225.md" "b/Day41-55/47.\346\227\245\345\277\227\345\222\214\350\260\203\350\257\225.md" similarity index 100% rename from "Day41-55/07.\346\227\245\345\277\227\345\222\214\350\260\203\350\257\225.md" rename to "Day41-55/47.\346\227\245\345\277\227\345\222\214\350\260\203\350\257\225.md" diff --git "a/Day41-55/08.\346\226\207\344\273\266\344\270\212\344\274\240\345\222\214\345\257\214\346\226\207\346\234\254\347\274\226\350\276\221.md" "b/Day41-55/48.\346\226\207\344\273\266\344\270\212\344\274\240\345\222\214\345\257\214\346\226\207\346\234\254\347\274\226\350\276\221.md" similarity index 100% rename from "Day41-55/08.\346\226\207\344\273\266\344\270\212\344\274\240\345\222\214\345\257\214\346\226\207\346\234\254\347\274\226\350\276\221.md" rename to "Day41-55/48.\346\226\207\344\273\266\344\270\212\344\274\240\345\222\214\345\257\214\346\226\207\346\234\254\347\274\226\350\276\221.md" diff --git "a/Day41-55/09.\346\226\207\344\273\266\344\270\213\350\275\275\345\222\214\346\212\245\350\241\250.md" "b/Day41-55/49.\346\226\207\344\273\266\344\270\213\350\275\275\345\222\214\346\212\245\350\241\250.md" similarity index 100% rename from "Day41-55/09.\346\226\207\344\273\266\344\270\213\350\275\275\345\222\214\346\212\245\350\241\250.md" rename to "Day41-55/49.\346\226\207\344\273\266\344\270\213\350\275\275\345\222\214\346\212\245\350\241\250.md" diff --git "a/Day41-55/10.RESTful\346\236\266\346\236\204\345\222\214DRF\345\205\245\351\227\250.md" "b/Day41-55/50.RESTful\346\236\266\346\236\204\345\222\214DRF\345\205\245\351\227\250.md" similarity index 100% rename from "Day41-55/10.RESTful\346\236\266\346\236\204\345\222\214DRF\345\205\245\351\227\250.md" rename to "Day41-55/50.RESTful\346\236\266\346\236\204\345\222\214DRF\345\205\245\351\227\250.md" diff --git "a/Day41-55/11.RESTful\346\236\266\346\236\204\345\222\214DRF\350\277\233\351\230\266.md" "b/Day41-55/51.RESTful\346\236\266\346\236\204\345\222\214DRF\350\277\233\351\230\266.md" similarity index 100% rename from "Day41-55/11.RESTful\346\236\266\346\236\204\345\222\214DRF\350\277\233\351\230\266.md" rename to "Day41-55/51.RESTful\346\236\266\346\236\204\345\222\214DRF\350\277\233\351\230\266.md" diff --git "a/Day41-55/12.\344\275\277\347\224\250\347\274\223\345\255\230.md" "b/Day41-55/52.\344\275\277\347\224\250\347\274\223\345\255\230.md" similarity index 100% rename from "Day41-55/12.\344\275\277\347\224\250\347\274\223\345\255\230.md" rename to "Day41-55/52.\344\275\277\347\224\250\347\274\223\345\255\230.md" diff --git "a/Day41-55/13.\347\237\255\344\277\241\345\222\214\351\202\256\344\273\266.md" "b/Day41-55/53.\347\237\255\344\277\241\345\222\214\351\202\256\344\273\266.md" similarity index 100% rename from "Day41-55/13.\347\237\255\344\277\241\345\222\214\351\202\256\344\273\266.md" rename to "Day41-55/53.\347\237\255\344\277\241\345\222\214\351\202\256\344\273\266.md" diff --git "a/Day41-55/14.\345\274\202\346\255\245\344\273\273\345\212\241\345\222\214\345\256\232\346\227\266\344\273\273\345\212\241.md" "b/Day41-55/54.\345\274\202\346\255\245\344\273\273\345\212\241\345\222\214\345\256\232\346\227\266\344\273\273\345\212\241.md" similarity index 100% rename from "Day41-55/14.\345\274\202\346\255\245\344\273\273\345\212\241\345\222\214\345\256\232\346\227\266\344\273\273\345\212\241.md" rename to "Day41-55/54.\345\274\202\346\255\245\344\273\273\345\212\241\345\222\214\345\256\232\346\227\266\344\273\273\345\212\241.md" diff --git "a/Day41-55/15.\345\215\225\345\205\203\346\265\213\350\257\225\345\222\214\351\241\271\347\233\256\344\270\212\347\272\277.md" "b/Day41-55/55.\345\215\225\345\205\203\346\265\213\350\257\225\345\222\214\351\241\271\347\233\256\344\270\212\347\272\277.md" similarity index 100% rename from "Day41-55/15.\345\215\225\345\205\203\346\265\213\350\257\225\345\222\214\351\241\271\347\233\256\344\270\212\347\272\277.md" rename to "Day41-55/55.\345\215\225\345\205\203\346\265\213\350\257\225\345\222\214\351\241\271\347\233\256\344\270\212\347\272\277.md" diff --git "a/Day56-60/01.Flask\345\205\245\351\227\250.md" "b/Day56-60/56.Flask\345\205\245\351\227\250.md" similarity index 100% rename from "Day56-60/01.Flask\345\205\245\351\227\250.md" rename to "Day56-60/56.Flask\345\205\245\351\227\250.md" diff --git "a/Day56-60/02.\346\250\241\346\235\277\347\232\204\344\275\277\347\224\250.md" "b/Day56-60/57.\346\250\241\346\235\277\347\232\204\344\275\277\347\224\250.md" similarity index 100% rename from "Day56-60/02.\346\250\241\346\235\277\347\232\204\344\275\277\347\224\250.md" rename to "Day56-60/57.\346\250\241\346\235\277\347\232\204\344\275\277\347\224\250.md" diff --git "a/Day56-60/03.\350\241\250\345\215\225\347\232\204\345\244\204\347\220\206.md" "b/Day56-60/58.\350\241\250\345\215\225\347\232\204\345\244\204\347\220\206.md" similarity index 100% rename from "Day56-60/03.\350\241\250\345\215\225\347\232\204\345\244\204\347\220\206.md" rename to "Day56-60/58.\350\241\250\345\215\225\347\232\204\345\244\204\347\220\206.md" diff --git "a/Day56-60/04.\346\225\260\346\215\256\345\272\223\346\223\215\344\275\234.md" "b/Day56-60/59.\346\225\260\346\215\256\345\272\223\346\223\215\344\275\234.md" similarity index 100% rename from "Day56-60/04.\346\225\260\346\215\256\345\272\223\346\223\215\344\275\234.md" rename to "Day56-60/59.\346\225\260\346\215\256\345\272\223\346\223\215\344\275\234.md" diff --git "a/Day56-60/05.\351\241\271\347\233\256\345\256\236\346\210\230.md" "b/Day56-60/60.\351\241\271\347\233\256\345\256\236\346\210\230.md" similarity index 100% rename from "Day56-60/05.\351\241\271\347\233\256\345\256\236\346\210\230.md" rename to "Day56-60/60.\351\241\271\347\233\256\345\256\236\346\210\230.md" diff --git "a/Day61-65/01.\351\242\204\345\244\207\347\237\245\350\257\206.md" "b/Day61-65/61.\351\242\204\345\244\207\347\237\245\350\257\206.md" similarity index 100% rename from "Day61-65/01.\351\242\204\345\244\207\347\237\245\350\257\206.md" rename to "Day61-65/61.\351\242\204\345\244\207\347\237\245\350\257\206.md" diff --git "a/Day61-65/02.Tornado\345\205\245\351\227\250.md" "b/Day61-65/62.Tornado\345\205\245\351\227\250.md" similarity index 100% rename from "Day61-65/02.Tornado\345\205\245\351\227\250.md" rename to "Day61-65/62.Tornado\345\205\245\351\227\250.md" diff --git "a/Day61-65/03.\345\274\202\346\255\245\345\214\226.md" "b/Day61-65/63.\345\274\202\346\255\245\345\214\226.md" similarity index 100% rename from "Day61-65/03.\345\274\202\346\255\245\345\214\226.md" rename to "Day61-65/63.\345\274\202\346\255\245\345\214\226.md" diff --git "a/Day61-65/04.WebSocket\347\232\204\345\272\224\347\224\250.md" "b/Day61-65/64.WebSocket\347\232\204\345\272\224\347\224\250.md" similarity index 100% rename from "Day61-65/04.WebSocket\347\232\204\345\272\224\347\224\250.md" rename to "Day61-65/64.WebSocket\347\232\204\345\272\224\347\224\250.md" diff --git "a/Day61-65/05.\351\241\271\347\233\256\345\256\236\346\210\230.md" "b/Day61-65/65.\351\241\271\347\233\256\345\256\236\346\210\230.md" similarity index 100% rename from "Day61-65/05.\351\241\271\347\233\256\345\256\236\346\210\230.md" rename to "Day61-65/65.\351\241\271\347\233\256\345\256\236\346\210\230.md" diff --git "a/Day66-75/01.\347\275\221\347\273\234\347\210\254\350\231\253\345\222\214\347\233\270\345\205\263\345\267\245\345\205\267.md" "b/Day66-75/66.\347\275\221\347\273\234\347\210\254\350\231\253\345\222\214\347\233\270\345\205\263\345\267\245\345\205\267.md" similarity index 100% rename from "Day66-75/01.\347\275\221\347\273\234\347\210\254\350\231\253\345\222\214\347\233\270\345\205\263\345\267\245\345\205\267.md" rename to "Day66-75/66.\347\275\221\347\273\234\347\210\254\350\231\253\345\222\214\347\233\270\345\205\263\345\267\245\345\205\267.md" diff --git "a/Day66-75/02.\346\225\260\346\215\256\351\207\207\351\233\206\345\222\214\350\247\243\346\236\220.md" "b/Day66-75/67.\346\225\260\346\215\256\351\207\207\351\233\206\345\222\214\350\247\243\346\236\220.md" similarity index 100% rename from "Day66-75/02.\346\225\260\346\215\256\351\207\207\351\233\206\345\222\214\350\247\243\346\236\220.md" rename to "Day66-75/67.\346\225\260\346\215\256\351\207\207\351\233\206\345\222\214\350\247\243\346\236\220.md" diff --git "a/Day66-75/03.\345\255\230\345\202\250\346\225\260\346\215\256.md" "b/Day66-75/68.\345\255\230\345\202\250\346\225\260\346\215\256.md" similarity index 100% rename from "Day66-75/03.\345\255\230\345\202\250\346\225\260\346\215\256.md" rename to "Day66-75/68.\345\255\230\345\202\250\346\225\260\346\215\256.md" diff --git "a/Day66-75/04.\345\271\266\345\217\221\344\270\213\350\275\275.md" "b/Day66-75/69.\345\271\266\345\217\221\344\270\213\350\275\275.md" similarity index 100% rename from "Day66-75/04.\345\271\266\345\217\221\344\270\213\350\275\275.md" rename to "Day66-75/69.\345\271\266\345\217\221\344\270\213\350\275\275.md" diff --git "a/Day66-75/05.\350\247\243\346\236\220\345\212\250\346\200\201\345\206\205\345\256\271.md" "b/Day66-75/70.\350\247\243\346\236\220\345\212\250\346\200\201\345\206\205\345\256\271.md" similarity index 100% rename from "Day66-75/05.\350\247\243\346\236\220\345\212\250\346\200\201\345\206\205\345\256\271.md" rename to "Day66-75/70.\350\247\243\346\236\220\345\212\250\346\200\201\345\206\205\345\256\271.md" diff --git "a/Day66-75/06.\350\241\250\345\215\225\344\272\244\344\272\222\345\222\214\351\252\214\350\257\201\347\240\201\345\244\204\347\220\206.md" "b/Day66-75/71.\350\241\250\345\215\225\344\272\244\344\272\222\345\222\214\351\252\214\350\257\201\347\240\201\345\244\204\347\220\206.md" similarity index 100% rename from "Day66-75/06.\350\241\250\345\215\225\344\272\244\344\272\222\345\222\214\351\252\214\350\257\201\347\240\201\345\244\204\347\220\206.md" rename to "Day66-75/71.\350\241\250\345\215\225\344\272\244\344\272\222\345\222\214\351\252\214\350\257\201\347\240\201\345\244\204\347\220\206.md" diff --git "a/Day66-75/07.Scrapy\345\205\245\351\227\250.md" "b/Day66-75/72.Scrapy\345\205\245\351\227\250.md" similarity index 100% rename from "Day66-75/07.Scrapy\345\205\245\351\227\250.md" rename to "Day66-75/72.Scrapy\345\205\245\351\227\250.md" diff --git "a/Day66-75/08.Scrapy\351\253\230\347\272\247\345\272\224\347\224\250.md" "b/Day66-75/73.Scrapy\351\253\230\347\272\247\345\272\224\347\224\250.md" similarity index 100% rename from "Day66-75/08.Scrapy\351\253\230\347\272\247\345\272\224\347\224\250.md" rename to "Day66-75/73.Scrapy\351\253\230\347\272\247\345\272\224\347\224\250.md" diff --git "a/Day66-75/09.Scrapy\345\210\206\345\270\203\345\274\217\345\256\236\347\216\260.md" "b/Day66-75/74.Scrapy\345\210\206\345\270\203\345\274\217\345\256\236\347\216\260.md" similarity index 100% rename from "Day66-75/09.Scrapy\345\210\206\345\270\203\345\274\217\345\256\236\347\216\260.md" rename to "Day66-75/74.Scrapy\345\210\206\345\270\203\345\274\217\345\256\236\347\216\260.md" diff --git "a/Day66-75/10.\347\210\254\350\231\253\351\241\271\347\233\256\345\256\236\346\210\230.md" "b/Day66-75/75.\347\210\254\350\231\253\351\241\271\347\233\256\345\256\236\346\210\230.md" similarity index 100% rename from "Day66-75/10.\347\210\254\350\231\253\351\241\271\347\233\256\345\256\236\346\210\230.md" rename to "Day66-75/75.\347\210\254\350\231\253\351\241\271\347\233\256\345\256\236\346\210\230.md" diff --git "a/Day76-90/01.\346\234\272\345\231\250\345\255\246\344\271\240\345\237\272\347\241\200.md" "b/Day76-90/76.\346\234\272\345\231\250\345\255\246\344\271\240\345\237\272\347\241\200.md" similarity index 100% rename from "Day76-90/01.\346\234\272\345\231\250\345\255\246\344\271\240\345\237\272\347\241\200.md" rename to "Day76-90/76.\346\234\272\345\231\250\345\255\246\344\271\240\345\237\272\347\241\200.md" diff --git "a/Day76-90/02.Pandas\347\232\204\345\272\224\347\224\250.md" "b/Day76-90/77.Pandas\347\232\204\345\272\224\347\224\250.md" similarity index 100% rename from "Day76-90/02.Pandas\347\232\204\345\272\224\347\224\250.md" rename to "Day76-90/77.Pandas\347\232\204\345\272\224\347\224\250.md" diff --git "a/Day76-90/03.NumPy\345\222\214SciPy\347\232\204\345\272\224\347\224\250.md" "b/Day76-90/78.NumPy\345\222\214SciPy\347\232\204\345\272\224\347\224\250.md" similarity index 100% rename from "Day76-90/03.NumPy\345\222\214SciPy\347\232\204\345\272\224\347\224\250.md" rename to "Day76-90/78.NumPy\345\222\214SciPy\347\232\204\345\272\224\347\224\250.md" diff --git "a/Day76-90/04.Matplotlib\345\222\214\346\225\260\346\215\256\345\217\257\350\247\206\345\214\226.md" "b/Day76-90/79.Matplotlib\345\222\214\346\225\260\346\215\256\345\217\257\350\247\206\345\214\226.md" similarity index 100% rename from "Day76-90/04.Matplotlib\345\222\214\346\225\260\346\215\256\345\217\257\350\247\206\345\214\226.md" rename to "Day76-90/79.Matplotlib\345\222\214\346\225\260\346\215\256\345\217\257\350\247\206\345\214\226.md" diff --git "a/Day76-90/05.k\346\234\200\350\277\221\351\202\273\345\210\206\347\261\273.md" "b/Day76-90/80.k\346\234\200\350\277\221\351\202\273\345\210\206\347\261\273.md" similarity index 100% rename from "Day76-90/05.k\346\234\200\350\277\221\351\202\273\345\210\206\347\261\273.md" rename to "Day76-90/80.k\346\234\200\350\277\221\351\202\273\345\210\206\347\261\273.md" diff --git "a/Day76-90/06.\345\206\263\347\255\226\346\240\221.md" "b/Day76-90/81.\345\206\263\347\255\226\346\240\221.md" similarity index 100% rename from "Day76-90/06.\345\206\263\347\255\226\346\240\221.md" rename to "Day76-90/81.\345\206\263\347\255\226\346\240\221.md" diff --git "a/Day76-90/07.\350\264\235\345\217\266\346\226\257\345\210\206\347\261\273.md" "b/Day76-90/82.\350\264\235\345\217\266\346\226\257\345\210\206\347\261\273.md" similarity index 100% rename from "Day76-90/07.\350\264\235\345\217\266\346\226\257\345\210\206\347\261\273.md" rename to "Day76-90/82.\350\264\235\345\217\266\346\226\257\345\210\206\347\261\273.md" diff --git "a/Day76-90/08.\346\224\257\346\214\201\345\220\221\351\207\217\346\234\272.md" "b/Day76-90/83.\346\224\257\346\214\201\345\220\221\351\207\217\346\234\272.md" similarity index 100% rename from "Day76-90/08.\346\224\257\346\214\201\345\220\221\351\207\217\346\234\272.md" rename to "Day76-90/83.\346\224\257\346\214\201\345\220\221\351\207\217\346\234\272.md" diff --git "a/Day76-90/09.K-\345\235\207\345\200\274\350\201\232\347\261\273.md" "b/Day76-90/84.K-\345\235\207\345\200\274\350\201\232\347\261\273.md" similarity index 100% rename from "Day76-90/09.K-\345\235\207\345\200\274\350\201\232\347\261\273.md" rename to "Day76-90/84.K-\345\235\207\345\200\274\350\201\232\347\261\273.md" diff --git "a/Day76-90/10.\345\233\236\345\275\222\345\210\206\346\236\220.md" "b/Day76-90/85.\345\233\236\345\275\222\345\210\206\346\236\220.md" similarity index 100% rename from "Day76-90/10.\345\233\236\345\275\222\345\210\206\346\236\220.md" rename to "Day76-90/85.\345\233\236\345\275\222\345\210\206\346\236\220.md" diff --git "a/Day76-90/11.\345\244\247\346\225\260\346\215\256\345\210\206\346\236\220\345\205\245\351\227\250.md" "b/Day76-90/86.\345\244\247\346\225\260\346\215\256\345\210\206\346\236\220\345\205\245\351\227\250.md" similarity index 100% rename from "Day76-90/11.\345\244\247\346\225\260\346\215\256\345\210\206\346\236\220\345\205\245\351\227\250.md" rename to "Day76-90/86.\345\244\247\346\225\260\346\215\256\345\210\206\346\236\220\345\205\245\351\227\250.md" diff --git "a/Day76-90/12.\345\244\247\346\225\260\346\215\256\345\210\206\346\236\220\350\277\233\351\230\266.md" "b/Day76-90/87.\345\244\247\346\225\260\346\215\256\345\210\206\346\236\220\350\277\233\351\230\266.md" similarity index 100% rename from "Day76-90/12.\345\244\247\346\225\260\346\215\256\345\210\206\346\236\220\350\277\233\351\230\266.md" rename to "Day76-90/87.\345\244\247\346\225\260\346\215\256\345\210\206\346\236\220\350\277\233\351\230\266.md" diff --git "a/Day76-90/13.Tensorflow\345\205\245\351\227\250.md" "b/Day76-90/88.Tensorflow\345\205\245\351\227\250.md" similarity index 100% rename from "Day76-90/13.Tensorflow\345\205\245\351\227\250.md" rename to "Day76-90/88.Tensorflow\345\205\245\351\227\250.md" diff --git "a/Day76-90/14.Tensorflow\345\256\236\346\210\230.md" "b/Day76-90/89.Tensorflow\345\256\236\346\210\230.md" similarity index 100% rename from "Day76-90/14.Tensorflow\345\256\236\346\210\230.md" rename to "Day76-90/89.Tensorflow\345\256\236\346\210\230.md" diff --git "a/Day76-90/15.\346\216\250\350\215\220\347\263\273\347\273\237\345\256\236\346\210\230.md" "b/Day76-90/90.\346\216\250\350\215\220\347\263\273\347\273\237\345\256\236\346\210\230.md" similarity index 100% rename from "Day76-90/15.\346\216\250\350\215\220\347\263\273\347\273\237\345\256\236\346\210\230.md" rename to "Day76-90/90.\346\216\250\350\215\220\347\263\273\347\273\237\345\256\236\346\210\230.md" diff --git "a/Day91-100/\350\213\261\350\257\255\351\235\242\350\257\225.md" "b/Day91-100/100.\350\213\261\350\257\255\351\235\242\350\257\225.md" similarity index 100% rename from "Day91-100/\350\213\261\350\257\255\351\235\242\350\257\225.md" rename to "Day91-100/100.\350\213\261\350\257\255\351\235\242\350\257\225.md" diff --git "a/Day91-100/\345\233\242\351\230\237\351\241\271\347\233\256\345\274\200\345\217\221.md" "b/Day91-100/91.\345\233\242\351\230\237\351\241\271\347\233\256\345\274\200\345\217\221\345\207\206\345\244\207.md" similarity index 99% rename from "Day91-100/\345\233\242\351\230\237\351\241\271\347\233\256\345\274\200\345\217\221.md" rename to "Day91-100/91.\345\233\242\351\230\237\351\241\271\347\233\256\345\274\200\345\217\221\345\207\206\345\244\207.md" index d86e03b29..86f0e5eb4 100644 --- "a/Day91-100/\345\233\242\351\230\237\351\241\271\347\233\256\345\274\200\345\217\221.md" +++ "b/Day91-100/91.\345\233\242\351\230\237\351\241\271\347\233\256\345\274\200\345\217\221\345\207\206\345\244\207.md" @@ -1,4 +1,4 @@ -## 团队项目开发 +## 团队项目开发准备 我们经常听到个人开发和团队开发这两个词,所谓个人开发就是一个人把控产品的所有内容;而团队开发则是由多个人组成团队并完成产品的开发。要实施团队开发以下几点是必不可少的: diff --git "a/Day91-100/Docker\347\256\200\346\230\223\344\270\212\346\211\213\346\214\207\345\215\227.md" "b/Day91-100/92.Docker\345\234\250\351\241\271\347\233\256\344\270\255\347\232\204\345\272\224\347\224\250.md" similarity index 99% rename from "Day91-100/Docker\347\256\200\346\230\223\344\270\212\346\211\213\346\214\207\345\215\227.md" rename to "Day91-100/92.Docker\345\234\250\351\241\271\347\233\256\344\270\255\347\232\204\345\272\224\347\224\250.md" index 4d4de4259..ee47fb340 100644 --- "a/Day91-100/Docker\347\256\200\346\230\223\344\270\212\346\211\213\346\214\207\345\215\227.md" +++ "b/Day91-100/92.Docker\345\234\250\351\241\271\347\233\256\344\270\255\347\232\204\345\272\224\347\224\250.md" @@ -1,4 +1,4 @@ -## Docker简易上手指南 +## Docker在项目中的应用 ### Docker简介 diff --git "a/Day91-100/MySQL\347\233\270\345\205\263\347\237\245\350\257\206.md" "b/Day91-100/93.\346\225\260\346\215\256\345\272\223\350\256\276\350\256\241\345\222\214OOAD.md" similarity index 98% rename from "Day91-100/MySQL\347\233\270\345\205\263\347\237\245\350\257\206.md" rename to "Day91-100/93.\346\225\260\346\215\256\345\272\223\350\256\276\350\256\241\345\222\214OOAD.md" index 8f786471e..228104238 100644 --- "a/Day91-100/MySQL\347\233\270\345\205\263\347\237\245\350\257\206.md" +++ "b/Day91-100/93.\346\225\260\346\215\256\345\272\223\350\256\276\350\256\241\345\222\214OOAD.md" @@ -1,4 +1,4 @@ -## MySQL相关知识 +## 数据库设计和OOAD ### 存储引擎 diff --git "a/Day91-100/\347\275\221\347\273\234API\346\216\245\345\217\243\350\256\276\350\256\241.md" "b/Day91-100/94.\347\275\221\347\273\234API\346\216\245\345\217\243\350\256\276\350\256\241.md" similarity index 100% rename from "Day91-100/\347\275\221\347\273\234API\346\216\245\345\217\243\350\256\276\350\256\241.md" rename to "Day91-100/94.\347\275\221\347\273\234API\346\216\245\345\217\243\350\256\276\350\256\241.md" diff --git "a/Day91-100/Django\347\237\245\350\257\206\347\202\271\346\246\202\350\277\260.md" "b/Day91-100/95.\344\275\277\347\224\250Django\345\274\200\345\217\221\351\241\271\347\233\256.md" similarity index 100% rename from "Day91-100/Django\347\237\245\350\257\206\347\202\271\346\246\202\350\277\260.md" rename to "Day91-100/95.\344\275\277\347\224\250Django\345\274\200\345\217\221\351\241\271\347\233\256.md" diff --git "a/Day91-100/\345\205\263\344\272\216\346\265\213\350\257\225\345\222\214\350\207\252\345\212\250\345\214\226\346\265\213\350\257\225.md" "b/Day91-100/96.\350\275\257\344\273\266\346\265\213\350\257\225\345\222\214\350\207\252\345\212\250\345\214\226\346\265\213\350\257\225.md" similarity index 100% rename from "Day91-100/\345\205\263\344\272\216\346\265\213\350\257\225\345\222\214\350\207\252\345\212\250\345\214\226\346\265\213\350\257\225.md" rename to "Day91-100/96.\350\275\257\344\273\266\346\265\213\350\257\225\345\222\214\350\207\252\345\212\250\345\214\226\346\265\213\350\257\225.md" diff --git "a/Day91-100/\347\224\265\345\225\206\347\275\221\347\253\231\346\212\200\346\234\257\350\246\201\347\202\271\345\211\226\346\236\220.md" "b/Day91-100/97.\347\224\265\345\225\206\347\275\221\347\253\231\346\212\200\346\234\257\350\246\201\347\202\271\345\211\226\346\236\220.md" similarity index 100% rename from "Day91-100/\347\224\265\345\225\206\347\275\221\347\253\231\346\212\200\346\234\257\350\246\201\347\202\271\345\211\226\346\236\220.md" rename to "Day91-100/97.\347\224\265\345\225\206\347\275\221\347\253\231\346\212\200\346\234\257\350\246\201\347\202\271\345\211\226\346\236\220.md" diff --git "a/Day91-100/\351\241\271\347\233\256\351\203\250\347\275\262\344\270\212\347\272\277\346\214\207\345\215\227.md" "b/Day91-100/98.\351\241\271\347\233\256\351\203\250\347\275\262\344\270\212\347\272\277\345\222\214\346\200\247\350\203\275\350\260\203\344\274\230.md" similarity index 100% rename from "Day91-100/\351\241\271\347\233\256\351\203\250\347\275\262\344\270\212\347\272\277\346\214\207\345\215\227.md" rename to "Day91-100/98.\351\241\271\347\233\256\351\203\250\347\275\262\344\270\212\347\272\277\345\222\214\346\200\247\350\203\275\350\260\203\344\274\230.md" diff --git "a/Day91-100/\351\235\242\350\257\225\344\270\255\347\232\204\345\205\254\345\205\261\351\227\256\351\242\230.md" "b/Day91-100/99.\351\235\242\350\257\225\344\270\255\347\232\204\345\205\254\345\205\261\351\227\256\351\242\230.md" similarity index 100% rename from "Day91-100/\351\235\242\350\257\225\344\270\255\347\232\204\345\205\254\345\205\261\351\227\256\351\242\230.md" rename to "Day91-100/99.\351\235\242\350\257\225\344\270\255\347\232\204\345\205\254\345\205\261\351\227\256\351\242\230.md" diff --git a/README.md b/README.md index ce8d1fc8e..6457d681c 100644 --- a/README.md +++ b/README.md @@ -51,7 +51,7 @@ ### Day01~15 - [Python语言基础](./Day01-15) -#### Day01 - [初识Python](./Day01-15/Day01/初识Python.md) +#### Day01 - [初识Python](./Day01-15/01.初识Python.md) - Python简介 - Python的历史 / Python的优缺点 / Python的应用领域 - 搭建编程环境 - Windows环境 / Linux环境 / MacOS环境 @@ -59,7 +59,7 @@ - 使用IDLE - 交互式环境(REPL) / 编写多行代码 / 运行程序 / 退出IDLE - 注释 - 注释的作用 / 单行注释 / 多行注释 -#### Day02 - [语言元素](./Day01-15/Day02/语言元素.md) +#### Day02 - [语言元素](./Day01-15/02.语言元素.md) - 程序和进制 - 指令和程序 / 冯诺依曼机 / 二进制和十进制 / 八进制和十六进制 - 变量和类型 - 变量的命名 / 变量的使用 / input函数 / 检查变量类型 / 类型转换 @@ -67,25 +67,25 @@ - 运算符 - 数学运算符 / 赋值运算符 / 比较运算符 / 逻辑运算符 / 身份运算符 / 运算符的优先级 - 应用案例 - 华氏温度转换成摄氏温度 / 输入圆的半径计算周长和面积 / 输入年份判断是否是闰年 -#### Day03 - [分支结构](./Day01-15/Day03/分支结构.md) +#### Day03 - [分支结构](./Day01-15/03.分支结构.md) - 分支结构的应用场景 - 条件 / 缩进 / 代码块 / 流程图 - if语句 - 简单的if / if-else结构 / if-elif-else结构 / 嵌套的if - 应用案例 - 用户身份验证 / 英制单位与公制单位互换 / 掷骰子决定做什么 / 百分制成绩转等级制 / 分段函数求值 / 输入三条边的长度如果能构成三角形就计算周长和面积 -#### Day04 - [循环结构](./Day01-15/Day04/循环结构.md) +#### Day04 - [循环结构](./Day01-15/04.循环结构.md) - 循环结构的应用场景 - 条件 / 缩进 / 代码块 / 流程图 - while循环 - 基本结构 / break语句 / continue语句 - for循环 - 基本结构 / range类型 / 循环中的分支结构 / 嵌套的循环 / 提前结束程序 - 应用案例 - 1~100求和 / 判断素数 / 猜数字游戏 / 打印九九表 / 打印三角形图案 / 猴子吃桃 / 百钱百鸡 -#### Day05 - [总结和练习](./Day01-15/Day05/总结和练习.md) +#### Day05 - [总结和练习](./Day01-15/05.总结和练习.md) - 基础练习 - 水仙花数 / 完美数 / 五人分鱼 / Fibonacci数列 / 回文素数 - 综合练习 - Craps赌博游戏 -#### Day06 - [函数和模块的使用](./Day01-15/Day06/函数和模块的使用.md) +#### Day06 - [函数和模块的使用](./Day01-15/06.函数和模块的使用.md) - 函数的作用 - 代码的坏味道 / 用函数封装功能模块 - 定义函数 - def语句 / 函数名 / 参数列表 / return语句 / 调用自定义函数 @@ -95,7 +95,7 @@ - 作用域问题 - 局部作用域 / 嵌套作用域 / 全局作用域 / 内置作用域 / 和作用域相关的关键字 - 用模块管理函数 - 模块的概念 / 用自定义模块管理函数 / 命名冲突的时候会怎样(同一个模块和不同的模块) -#### Day07 - [字符串和常用数据结构](./Day01-15/Day07/字符串和常用数据结构.md) +#### Day07 - [字符串和常用数据结构](./Day01-15/07.字符串和常用数据结构.md) - 字符串的使用 - 计算长度 / 下标运算 / 切片 / 常用方法 - 列表基本用法 - 定义列表 / 用下表访问元素 / 下标越界 / 添加元素 / 删除元素 / 修改元素 / 切片 / 循环遍历 @@ -109,7 +109,7 @@ - 基础练习 - 跑马灯效果 / 列表找最大元素 / 统计考试成绩的平均分 / Fibonacci数列 / 杨辉三角 - 综合案例 - 双色球选号 / 井字棋 -#### Day08 - [面向对象编程基础](./Day01-15/Day08/面向对象编程基础.md) +#### Day08 - [面向对象编程基础](./Day01-15/08.面向对象编程基础.md) - 类和对象 - 什么是类 / 什么是对象 / 面向对象其他相关概念 - 定义类 - 基本结构 / 属性和方法 / 构造器 / 析构器 / \_\_str\_\_方法 @@ -117,7 +117,7 @@ - 面向对象的四大支柱 - 抽象 / 封装 / 继承 / 多态 - 基础练习 - 定义学生类 / 定义时钟类 / 定义图形类 / 定义汽车类 -#### Day09 - [面向对象进阶](./Day01-15/Day09/面向对象进阶.md) +#### Day09 - [面向对象进阶](./Day01-15/09.面向对象进阶.md) - 属性 - 类属性 / 实例属性 / 属性访问器 / 属性修改器 / 属性删除器 / 使用\_\_slots\_\_ - 类中的方法 - 实例方法 / 类方法 / 静态方法 @@ -126,13 +126,13 @@ - 继承和多态 - 什么是继承 / 继承的语法 / 调用父类方法 / 方法重写 / 类型判定 / 多重继承 / 菱形继承(钻石继承)和C3算法 - 综合案例 - 工资结算系统 / 图书自动折扣系统 / 自定义分数类 -#### Day10 - [图形用户界面和游戏开发](./Day01-15/Day10/图形用户界面和游戏开发.md) +#### Day10 - [图形用户界面和游戏开发](./Day01-15/10.图形用户界面和游戏开发.md) - 使用tkinter开发GUI - 使用pygame三方库开发游戏应用 - “大球吃小球”游戏 -#### Day11 - [文件和异常](./Day01-15/Day11/文件和异常.md) +#### Day11 - [文件和异常](./Day01-15/11.文件和异常.md) - 读文件 - 读取整个文件 / 逐行读取 / 文件路径 - 写文件 - 覆盖写入 / 追加写入 / 文本文件 / 二进制文件 @@ -140,40 +140,38 @@ - 数据持久化 - CSV文件概述 / csv模块的应用 / JSON数据格式 / json模块的应用 - 综合案例 - 歌词解析 -#### Day12 - [字符串和正则表达式](./Day01-15/Day12/字符串和正则表达式.md) +#### Day12 - [字符串和正则表达式](./Day01-15/12.字符串和正则表达式.md) - 字符串高级操作 - 转义字符 \ 原始字符串 \ 多行字符串 \ in和 not in运算符 \ is开头的方法 \ join和split方法 \ strip相关方法 \ pyperclip模块 \ 不变字符串和可变字符串 \ StringIO的使用 - 正则表达式入门 - 正则表达式的作用 \ 元字符 \ 转义 \ 量词 \ 分组 \ 零宽断言 \贪婪匹配与惰性匹配懒惰 \ 使用re模块实现正则表达式操作(匹配、搜索、替换、捕获) - 使用正则表达式 - re模块 \ compile函数 \ group和groups方法 \ match方法 \ search方法 \ findall和finditer方法 \ sub和subn方法 \ split方法 - 应用案例 - 使用正则表达式验证输入的字符串 -#### Day13 - [进程和线程](./Day01-15/Day13/进程和线程.md) +#### Day13 - [进程和线程](./Day01-15/13.进程和线程.md) - 进程和线程的概念 - 什么是进程 / 什么是线程 / 多线程的应用场景 - 使用进程 - fork函数 / multiprocessing模块 / 进程池 / 进程间通信 - 使用线程 - thread模块 / threading模块 / Thread类 / Lock类 / Condition类 / 线程池 -#### Day14-A - [网络编程入门](./Day01-15/Day14-A/网络编程入门.md) +#### Day14 - [网络编程入门和网络应用开发](./Day01-15/14.网络编程入门和网络应用开发.md) - 计算机网络基础 - 计算机网络发展史 / “TCP-IP”模型 / IP地址 / 端口 / 协议 / 其他相关概念 - 网络应用架构 - “客户端-服务器”架构 / “浏览器-服务器”架构 - Python网络编程 - 套接字的概念 / socket模块 / socket函数 / 创建TCP服务器 / 创建TCP客户端 / 创建UDP服务器 / 创建UDP客户端 / SocketServer模块 -#### Day14-B - [网络应用开发](./Day01-15/Day14-B/网络应用开发.md) - - 访问网络API - 网络API概述 / 访问URL / requests模块 / 解析JSON格式数据 - 文件传输 - FTP协议 / ftplib模块 / 交互式FTP应用 - 电子邮件 - SMTP协议 / POP3协议 / IMAP协议 / smtplib模块 / poplib模块 / imaplib模块 - 短信服务 - twilio模块 / 国内的短信服务 -#### Day15 - [图像和文档处理](./Day01-15/Day15/图像和办公文档处理.md) +#### Day15 - [图像和文档处理](./Day01-15/15.图像和办公文档处理.md) - 用Pillow处理图片 - 图片读写 / 图片合成 / 几何变换 / 色彩转换 / 滤镜效果 - 读写Word文档 - 文本内容的处理 / 段落 / 页眉和页脚 / 样式的处理 - 读写Excel文件 - xlrd模块 / xlwt模块 - 生成PDF文件 - pypdf2模块 / reportlab模块 -### Day16~Day20 - [Python语言进阶 ](./Day16-20/Python语言进阶.md) +### Day16~Day20 - [Python语言进阶 ](./Day16-20/16.Python语言进阶.md) - 常用数据结构 - 函数的高级用法 - “一等公民” / 高阶函数 / Lambda函数 / 作用域和闭包 / 装饰器 @@ -181,7 +179,7 @@ - 迭代器和生成器 - 相关魔术方法 / 创建生成器的两种方式 / - 并发和异步编程 - 多线程 / 多进程 / 异步IO / async和await -### Day21~30 - [Web前端入门](./Day21-30/Web前端概述.md) +### Day21~30 - [Web前端入门](./Day21-30/21.Web前端概述.md) - 用HTML标签承载页面内容 - 用CSS渲染页面 @@ -191,7 +189,7 @@ - Element的使用 - Bootstrap的使用 -### Day31~35 - [玩转Linux操作系统](./Day31-35/玩转Linux操作系统.md) +### Day31~35 - [玩转Linux操作系统](./Day31-35/31.玩转Linux操作系统.md) - 操作系统发展史和Linux概述 - Linux基础命令 @@ -205,7 +203,7 @@ ### Day36~40 - [数据库基础和进阶](./Day36-40) -- [关系型数据库MySQL](./Day36-40/关系型数据库MySQL.md) +- [关系型数据库MySQL](./Day36-40/36.关系型数据库MySQL.md) - 关系型数据库概述 - MySQL的安装和使用 - SQL的使用 @@ -217,21 +215,21 @@ - 数据完整性 - 数据一致性 - 在Python中操作MySQL -- [NoSQL入门](./Day36-40/NoSQL入门.md) +- [NoSQL入门](./Day36-40/39.NoSQL入门.md) - NoSQL概述 - Redis概述 - Mongo概述 ### Day41~55 - [实战Django](./Day41-55) -#### Day41 - [快速上手](./Day41-55/01.快速上手.md) +#### Day41 - [快速上手](./Day41-55/41.快速上手.md) - Web应用工作原理和HTTP协议 - Django框架概述 - 5分钟快速上手 - 使用视图模板 -#### Day42 - [深入模型](./Day41-55/02.深入模型.md) +#### Day42 - [深入模型](./Day41-55/42.深入模型.md) - 关系型数据库配置 - 管理后台的使用 @@ -239,44 +237,44 @@ - Django模型最佳实践 - 模型定义参考 -#### Day43 - [静态资源和Ajax请求](./Day41-55/03.静态资源和Ajax请求.md) +#### Day43 - [静态资源和Ajax请求](./Day41-55/43.静态资源和Ajax请求.md) - 加载静态资源 - 用Ajax请求获取数据 -#### Day44 - [表单的应用](./Day41-55/04.表单的应用.md) +#### Day44 - [表单的应用](./Day41-55/44.表单的应用.md) - 表单和表单控件 - 跨站请求伪造和CSRF令牌 - Form和ModelForm - 表单验证 -#### Day45 - [Cookie和Session](./Day41-55/05.Cookie和Session.md) +#### Day45 - [Cookie和Session](./Day41-55/45.Cookie和Session.md) - 实现用户跟踪 - cookie和session的关系 - Django框架对session的支持 - 视图函数中的cookie读写操作 -#### Day46 - [中间件的应用](./Day41-55/06.中间件的应用.md) +#### Day46 - [中间件的应用](./Day41-55/46.中间件的应用.md) - 什么是中间件 - Django框架内置的中间件 - 自定义中间件及其应用场景 -#### Day47 - [日志和调试](./Day41-55/07.日志和调试.md) +#### Day47 - [日志和调试](./Day41-55/47.日志和调试.md) - 配置日志 - 配置和使用Django-Debug-Toolbar -#### Day48 - [文件上传和富文本编辑](./Day41-55/08.文件上传.md) +#### Day48 - [文件上传和富文本编辑](./Day41-55/48.文件上传.md) - 文件上传表单控件和图片文件预览 - 服务器端如何处理上传的文件 - 富文本编辑器概述 - wangEditor的使用 -#### Day49 - [文件下载和报表](./Day41-55/09.文件下载和报表.md) +#### Day49 - [文件下载和报表](./Day41-55/49.文件下载和报表.md) - 通过HttpResponse修改响应头 - 使用StreamingHttpResponse处理大文件 @@ -284,11 +282,11 @@ - 使用reportlab生成PDF报表 - 使用ECharts生成前端图表 -#### Day50 - [RESTful架构和DRF入门](./Day41-55/10.RESTful架构和DRF入门.md) +#### Day50 - [RESTful架构和DRF入门](./Day41-55/50.RESTful架构和DRF入门.md) -#### Day51 - [RESTful架构和DRF进阶](./Day41-55/11.RESTful架构和DRF进阶.md) +#### Day51 - [RESTful架构和DRF进阶](./Day41-55/51.RESTful架构和DRF进阶.md) -#### Day52 - [使用缓存](./Day41-55/12.使用缓存.md) +#### Day52 - [使用缓存](./Day41-55/52.使用缓存.md) - 网站优化第一定律 @@ -297,20 +295,20 @@ - 使用装饰器实现页面缓存 - 为数据接口提供缓存服务 -#### Day53 - [短信和邮件](./Day41-55/13.短信和邮件.md) +#### Day53 - [短信和邮件](./Day41-55/53.短信和邮件.md) - 常用短信网关平台介绍 - 使用螺丝帽发送短信 - Django框架对邮件服务的支持 -#### Day54 - [异步任务和定时任务](./Day41-55/14.异步任务和定时任务.md) +#### Day54 - [异步任务和定时任务](./Day41-55/54.异步任务和定时任务.md) - 网站优化第二定律 - 配置消息队列服务 - 在项目中使用celery实现任务异步化 - 在项目中使用celery实现定时任务 -#### Day55 - [单元测试和项目上线](./Day41-55/15.单元测试和项目上线.md) +#### Day55 - [单元测试和项目上线](./Day41-55/55.单元测试和项目上线.md) - Python中的单元测试 - Django框架对单元测试的支持 @@ -322,42 +320,42 @@ ### Day56~60 - [实战Flask](./Day56-65) -#### Day56 - [Flask入门](./Day56-60/01.Flask入门.md) +#### Day56 - [Flask入门](./Day56-60/56.Flask入门.md) -#### Day57 - [模板的使用](./Day56-60/02.模板的使用.md) +#### Day57 - [模板的使用](./Day56-60/57.模板的使用.md) -#### Day58 - [表单的处理](./Day56-60/03.表单的处理.md) +#### Day58 - [表单的处理](./Day56-60/58.表单的处理.md) -#### Day59 - [数据库操作](./Day56-60/04.数据库操作.md) +#### Day59 - [数据库操作](./Day56-60/59.数据库操作.md) -#### Day60 - [项目实战](./Day56-60/05.项目实战.md) +#### Day60 - [项目实战](./Day56-60/60.项目实战.md) ### Day61~65 - [实战Tornado](./Day61-65) -#### Day61 - [预备知识](./Day61-65/01.预备知识.md) +#### Day61 - [预备知识](./Day61-65/61.预备知识.md) - 并发编程 - I/O模式和事件驱动 -#### Day62 - [Tornado入门](./Day61-65/02.Tornado入门.md) +#### Day62 - [Tornado入门](./Day61-65/62.Tornado入门.md) - Tornado概述 - 5分钟上手Tornado - 路由解析 - 请求处理器 -#### Day63 - [异步化](./Day61-65/03.异步化.md) +#### Day63 - [异步化](./Day61-65/63.异步化.md) - aiomysql和aioredis的使用 -#### Day64 - [WebSocket的应用](./Day61-65/04.WebSocket的应用.md) +#### Day64 - [WebSocket的应用](./Day61-65/64.WebSocket的应用.md) - WebSocket简介 - WebSocket服务器端编程 - WebSocket客户端编程 - 项目:Web聊天室 -#### Day65 - [项目实战](./Day61-65/05.项目实战.md) +#### Day65 - [项目实战](./Day61-65/65.项目实战.md) - 前后端分离开发和接口文档的撰写 - 使用Vue.js实现前端渲染 @@ -366,61 +364,61 @@ ### Day66~75 - [爬虫开发](./Day66-75) -#### Day66 - [网络爬虫和相关工具](./Day66-75/01.网络爬虫和相关工具.md) +#### Day66 - [网络爬虫和相关工具](./Day66-75/66.网络爬虫和相关工具.md) -#### Day67 - [数据采集和解析](./Day66-75/02.数据采集和解析.md) +#### Day67 - [数据采集和解析](./Day66-75/67.数据采集和解析.md) -#### Day68 - [存储数据](./Day66-75/03.存储数据.md) +#### Day68 - [存储数据](./Day66-75/68.存储数据.md) -#### Day69 - [并发下载](./Day66-75/04.并发下载.md) +#### Day69 - [并发下载](./Day66-75/69.并发下载.md) -#### Day70 - [解析动态内容](./Day66-75/05.解析动态内容.md) +#### Day70 - [解析动态内容](./Day66-75/70.解析动态内容.md) -#### Day71 - [表单交互和验证码处理](./Day66-75/06.表单交互和验证码处理.md) +#### Day71 - [表单交互和验证码处理](./Day66-75/71.表单交互和验证码处理.md) -#### Day72 - [Scrapy入门](./Day66-75/07.Scrapy入门.md) +#### Day72 - [Scrapy入门](./Day66-75/72.Scrapy入门.md) -#### Day73 - [Scrapy高级应用](./Day66-75/08.Scrapy高级应用.md) +#### Day73 - [Scrapy高级应用](./Day66-75/73.Scrapy高级应用.md) -#### Day74 - [Scrapy分布式实现](./Day66-75/09.Scrapy分布式实现.md) +#### Day74 - [Scrapy分布式实现](./Day66-75/74.Scrapy分布式实现.md) -#### Day75 - [爬虫项目实战](./Day66-75/10.爬虫项目实战.md) +#### Day75 - [爬虫项目实战](./Day66-75/75.爬虫项目实战.md) ### Day76~90 - [数据处理和机器学习](./Day76-90) -#### Day76 - [机器学习基础](./Day76-90/01.机器学习基础.md) +#### Day76 - [机器学习基础](./Day76-90/76.机器学习基础.md) -#### Day77 - [Pandas的应用](./Day76-90/02.Pandas的应用.md) +#### Day77 - [Pandas的应用](./Day76-90/77.Pandas的应用.md) -#### Day78 - [NumPy和SciPy的应用](./Day76-90/03.NumPy和SciPy的应用) +#### Day78 - [NumPy和SciPy的应用](./Day76-90/78.NumPy和SciPy的应用) -#### Day79 - [Matplotlib和数据可视化](./Day76-90/04.Matplotlib和数据可视化) +#### Day79 - [Matplotlib和数据可视化](./Day76-90/79.Matplotlib和数据可视化) -#### Day80 - [k最近邻(KNN)分类](./Day76-90/05.k最近邻分类.md) +#### Day80 - [k最近邻(KNN)分类](./Day76-90/80.k最近邻分类.md) -#### Day81 - [决策树](./Day76-90/06.决策树.md) +#### Day81 - [决策树](./Day76-90/81.决策树.md) -#### Day82 - [贝叶斯分类](./Day76-90/07.贝叶斯分类.md) +#### Day82 - [贝叶斯分类](./Day76-90/82.贝叶斯分类.md) -#### Day83 - [支持向量机(SVM)](./Day76-90/08.支持向量机.md) +#### Day83 - [支持向量机(SVM)](./Day76-90/83.支持向量机.md) -#### Day84 - [K-均值聚类](./Day76-90/09.K-均值聚类.md) +#### Day84 - [K-均值聚类](./Day76-90/84.K-均值聚类.md) -#### Day85 - [回归分析](./Day76-90/10.回归分析.md) +#### Day85 - [回归分析](./Day76-90/85.回归分析.md) -#### Day86 - [大数据分析入门](./Day76-90/11.大数据分析入门.md) +#### Day86 - [大数据分析入门](./Day76-90/86.大数据分析入门.md) -#### Day87 - [大数据分析进阶](./Day76-90/12.大数据分析进阶.md) +#### Day87 - [大数据分析进阶](./Day76-90/87.大数据分析进阶.md) -#### Day88 - [Tensorflow入门](./Day76-90/13.Tensorflow入门.md) +#### Day88 - [Tensorflow入门](./Day76-90/88.Tensorflow入门.md) -#### Day89 - [Tensorflow实战](./Day76-90/14.Tensorflow实战.md) +#### Day89 - [Tensorflow实战](./Day76-90/89.Tensorflow实战.md) -#### Day90 - [推荐系统](./Day76-90/15.推荐系统.md) +#### Day90 - [推荐系统](./Day76-90/90.推荐系统.md) ### Day91~100 - [团队项目开发](./Day91-100) -#### 第91天:团队开发和项目选题 +#### 第91天:[团队项目开发准备](./Day91-100/91.团队项目开发准备.md) 1. 软件过程模型 - 经典过程模型(瀑布模型) @@ -509,7 +507,9 @@ | | 查看评论 | 白元芳 | 正在进行 | 20% | 4 | 2018/8/7 | | 2018/8/7 | | 需要进行代码审查 | | | 评论投票 | 白元芳 | 等待 | 0% | 4 | 2018/8/8 | | 2018/8/8 | | | -#### 第92天:数据库设计和OOAD +#### 第92天:[Docker的使用](./Day91-100/92.Docker在项目中的应用.md) + +#### 第93天:[数据库设计和OOAD](./Day91-100/93.数据库设计和OOAD.md) ##### 概念模型和正向工程 @@ -536,9 +536,9 @@ python manage.py inspectdb > app/models.py ``` -#### 第93-98天:使用Django开发项目 +#### 第94天:[网络API接口设计](./Day91-100/94.网络API接口设计) -> 说明:具体内容请参考[《Django知识点概述》](Day91-100/Django知识点概述.md) +#### 第95天:[使用Django开发项目](./Day91-100/95.使用Django开发项目.md) ##### 项目开发中的公共问题 @@ -564,7 +564,7 @@ 1. 使用缓存缓解数据库压力 - Redis 2. 使用消息队列做解耦合和削峰 - Celery + RabbitMQ -#### 第99-100天:测试和部署 +#### 第96天:[软件测试和自动化测试](Day91-100/96.软件测试和自动化测试.md) ##### 单元测试 @@ -607,33 +607,29 @@ - Selenium Remote Control 3. 测试工具Robot Framework介绍 -##### 项目性能调优 +#### 第97天:[电商网站技术要点剖析](./Day91-100/97.电商网站技术要点剖析.md) + +#### 第98天:[项目部署上线和性能调优](./Day91-100/98.项目部署上线和性能调优.md) 1. 数据库性能调优 - 请参考[《MySQL相关知识》](Day91-100/MySQL相关知识.md) - 软硬件优化 - - SQL优化 - - 架构优化 - - 分表分库 - - 主从复制,读写分离 - 集群架构 - 2. Web服务器性能优化 - - Nginx负载均衡配置 - - Keepalived实现高可用 - 3. 代码性能调优 - - 多线程 - 异步化 - 4. 静态资源访问优化 - - 云存储 - - CDN + - 云存储 + - CDN + +#### 第99天:[面试中的公共问题](./Day91-100/99.面试中的公共问题.md) + +#### 第100天:[英语面试](./Day91-100/100.英语面试.md) > 致谢:感谢的我的同事古晔、张旭、肖世荣、王海飞、荣佳伟、路丰坤等在技术上给予的指导和帮助。 \ No newline at end of file diff --git "a/Day66-75/\345\270\270\350\247\201\345\217\215\347\210\254\347\255\226\347\225\245\345\217\212\345\272\224\345\257\271\346\226\271\346\241\210.md" "b/\345\270\270\350\247\201\345\217\215\347\210\254\347\255\226\347\225\245\345\217\212\345\272\224\345\257\271\346\226\271\346\241\210.md" similarity index 100% rename from "Day66-75/\345\270\270\350\247\201\345\217\215\347\210\254\347\255\226\347\225\245\345\217\212\345\272\224\345\257\271\346\226\271\346\241\210.md" rename to "\345\270\270\350\247\201\345\217\215\347\210\254\347\255\226\347\225\245\345\217\212\345\272\224\345\257\271\346\226\271\346\241\210.md"