Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
冰清雪酷
Python-100-Days
提交
6a7f8602
P
Python-100-Days
项目概览
冰清雪酷
/
Python-100-Days
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Python-100-Days
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
6a7f8602
编写于
6月 05, 2019
作者:
J
jackfrued
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
调整了目录结构
上级
36ffd6c2
变更
281
展开全部
隐藏空白更改
内联
并排
Showing
281 changed file
with
626 addition
and
631 deletion
+626
-631
Day01-15/01.初识Python.md
Day01-15/01.初识Python.md
+0
-0
Day01-15/02.语言元素.md
Day01-15/02.语言元素.md
+0
-0
Day01-15/03.分支结构.md
Day01-15/03.分支结构.md
+0
-0
Day01-15/04.循环结构.md
Day01-15/04.循环结构.md
+1
-1
Day01-15/05.总结和练习.md
Day01-15/05.总结和练习.md
+0
-0
Day01-15/06.函数和模块的使用.md
Day01-15/06.函数和模块的使用.md
+2
-2
Day01-15/07.字符串和常用数据结构.md
Day01-15/07.字符串和常用数据结构.md
+4
-4
Day01-15/08.面向对象编程基础.md
Day01-15/08.面向对象编程基础.md
+0
-0
Day01-15/09.面向对象进阶.md
Day01-15/09.面向对象进阶.md
+0
-0
Day01-15/10.图形用户界面和游戏开发.md
Day01-15/10.图形用户界面和游戏开发.md
+0
-0
Day01-15/11.文件和异常.md
Day01-15/11.文件和异常.md
+0
-0
Day01-15/12.字符串和正则表达式.md
Day01-15/12.字符串和正则表达式.md
+0
-0
Day01-15/13.进程和线程.md
Day01-15/13.进程和线程.md
+0
-0
Day01-15/14.网络编程入门和网络应用开发.md
Day01-15/14.网络编程入门和网络应用开发.md
+121
-0
Day01-15/15.图像和办公文档处理.md
Day01-15/15.图像和办公文档处理.md
+0
-0
Day01-15/Day09/res/uml-example.gliffy
Day01-15/Day09/res/uml-example.gliffy
+0
-1
Day01-15/Day14-B/网络应用开发.md
Day01-15/Day14-B/网络应用开发.md
+0
-121
Day01-15/code/Day01/hello.py
Day01-15/code/Day01/hello.py
+0
-0
Day01-15/code/Day01/peppa_pig.py
Day01-15/code/Day01/peppa_pig.py
+0
-0
Day01-15/code/Day02/centigrade.py
Day01-15/code/Day02/centigrade.py
+0
-0
Day01-15/code/Day02/circle.py
Day01-15/code/Day02/circle.py
+0
-0
Day01-15/code/Day02/leap.py
Day01-15/code/Day02/leap.py
+0
-0
Day01-15/code/Day02/operator.py
Day01-15/code/Day02/operator.py
+0
-0
Day01-15/code/Day02/strings.py
Day01-15/code/Day02/strings.py
+0
-0
Day01-15/code/Day02/variable1.py
Day01-15/code/Day02/variable1.py
+0
-0
Day01-15/code/Day02/variable2.py
Day01-15/code/Day02/variable2.py
+0
-0
Day01-15/code/Day02/variable3.py
Day01-15/code/Day02/variable3.py
+0
-0
Day01-15/code/Day02/variable4.py
Day01-15/code/Day02/variable4.py
+0
-0
Day01-15/code/Day02/variable5.py
Day01-15/code/Day02/variable5.py
+0
-0
Day01-15/code/Day03/convert.py
Day01-15/code/Day03/convert.py
+0
-0
Day01-15/code/Day03/grade.py
Day01-15/code/Day03/grade.py
+0
-0
Day01-15/code/Day03/piecewise.py
Day01-15/code/Day03/piecewise.py
+0
-0
Day01-15/code/Day03/rolldice.py
Day01-15/code/Day03/rolldice.py
+0
-0
Day01-15/code/Day03/tax.py
Day01-15/code/Day03/tax.py
+0
-0
Day01-15/code/Day03/triangle.py
Day01-15/code/Day03/triangle.py
+0
-0
Day01-15/code/Day03/verify.py
Day01-15/code/Day03/verify.py
+0
-0
Day01-15/code/Day04/for1.py
Day01-15/code/Day04/for1.py
+0
-0
Day01-15/code/Day04/for2.py
Day01-15/code/Day04/for2.py
+0
-0
Day01-15/code/Day04/for3.py
Day01-15/code/Day04/for3.py
+0
-0
Day01-15/code/Day04/for4.py
Day01-15/code/Day04/for4.py
+0
-0
Day01-15/code/Day04/for5.py
Day01-15/code/Day04/for5.py
+0
-0
Day01-15/code/Day04/for6.py
Day01-15/code/Day04/for6.py
+0
-0
Day01-15/code/Day04/while1.py
Day01-15/code/Day04/while1.py
+0
-0
Day01-15/code/Day04/while2.py
Day01-15/code/Day04/while2.py
+0
-0
Day01-15/code/Day05/chicken.py
Day01-15/code/Day05/chicken.py
+0
-0
Day01-15/code/Day05/craps.py
Day01-15/code/Day05/craps.py
+0
-0
Day01-15/code/Day05/fibonacci.py
Day01-15/code/Day05/fibonacci.py
+0
-0
Day01-15/code/Day05/guess.py
Day01-15/code/Day05/guess.py
+0
-0
Day01-15/code/Day05/lily.py
Day01-15/code/Day05/lily.py
+0
-0
Day01-15/code/Day05/palindrome.py
Day01-15/code/Day05/palindrome.py
+0
-0
Day01-15/code/Day05/perfect.py
Day01-15/code/Day05/perfect.py
+0
-0
Day01-15/code/Day05/prime.py
Day01-15/code/Day05/prime.py
+0
-0
Day01-15/code/Day05/table.py
Day01-15/code/Day05/table.py
+0
-0
Day01-15/code/Day06/function1.py
Day01-15/code/Day06/function1.py
+0
-0
Day01-15/code/Day06/function2.py
Day01-15/code/Day06/function2.py
+0
-0
Day01-15/code/Day06/function3.py
Day01-15/code/Day06/function3.py
+0
-0
Day01-15/code/Day06/function4.py
Day01-15/code/Day06/function4.py
+0
-0
Day01-15/code/Day06/function5.py
Day01-15/code/Day06/function5.py
+0
-0
Day01-15/code/Day06/function6.py
Day01-15/code/Day06/function6.py
+0
-0
Day01-15/code/Day07/avgscore.py
Day01-15/code/Day07/avgscore.py
+0
-0
Day01-15/code/Day07/dict1.py
Day01-15/code/Day07/dict1.py
+0
-0
Day01-15/code/Day07/dict2.py
Day01-15/code/Day07/dict2.py
+0
-0
Day01-15/code/Day07/fibonacci.py
Day01-15/code/Day07/fibonacci.py
+0
-0
Day01-15/code/Day07/findmax.py
Day01-15/code/Day07/findmax.py
+0
-0
Day01-15/code/Day07/list1.py
Day01-15/code/Day07/list1.py
+0
-0
Day01-15/code/Day07/list2.py
Day01-15/code/Day07/list2.py
+0
-0
Day01-15/code/Day07/list3.py
Day01-15/code/Day07/list3.py
+0
-0
Day01-15/code/Day07/lottery.py
Day01-15/code/Day07/lottery.py
+0
-0
Day01-15/code/Day07/marquee.py
Day01-15/code/Day07/marquee.py
+0
-0
Day01-15/code/Day07/scoretable.py
Day01-15/code/Day07/scoretable.py
+0
-0
Day01-15/code/Day07/set1.py
Day01-15/code/Day07/set1.py
+0
-0
Day01-15/code/Day07/set2.py
Day01-15/code/Day07/set2.py
+0
-0
Day01-15/code/Day07/tic-tac-toe.py
Day01-15/code/Day07/tic-tac-toe.py
+0
-0
Day01-15/code/Day07/tuple.py
Day01-15/code/Day07/tuple.py
+0
-0
Day01-15/code/Day07/yanghui.py
Day01-15/code/Day07/yanghui.py
+0
-0
Day01-15/code/Day08/access.py
Day01-15/code/Day08/access.py
+0
-0
Day01-15/code/Day08/circle.py
Day01-15/code/Day08/circle.py
+0
-0
Day01-15/code/Day08/clock.py
Day01-15/code/Day08/clock.py
+0
-0
Day01-15/code/Day08/guess.py
Day01-15/code/Day08/guess.py
+0
-0
Day01-15/code/Day08/hack.py
Day01-15/code/Day08/hack.py
+0
-0
Day01-15/code/Day08/rect.py
Day01-15/code/Day08/rect.py
+0
-0
Day01-15/code/Day08/student.py
Day01-15/code/Day08/student.py
+0
-0
Day01-15/code/Day09/association.py
Day01-15/code/Day09/association.py
+0
-0
Day01-15/code/Day09/car1.py
Day01-15/code/Day09/car1.py
+0
-0
Day01-15/code/Day09/car2.py
Day01-15/code/Day09/car2.py
+0
-0
Day01-15/code/Day09/clock.py
Day01-15/code/Day09/clock.py
+0
-0
Day01-15/code/Day09/dependency.py
Day01-15/code/Day09/dependency.py
+0
-0
Day01-15/code/Day09/diamond.py
Day01-15/code/Day09/diamond.py
+0
-0
Day01-15/code/Day09/employee.py
Day01-15/code/Day09/employee.py
+0
-0
Day01-15/code/Day09/multi.py
Day01-15/code/Day09/multi.py
+0
-0
Day01-15/code/Day09/pet.py
Day01-15/code/Day09/pet.py
+0
-0
Day01-15/code/Day09/rational.py
Day01-15/code/Day09/rational.py
+0
-0
Day01-15/code/Day09/shape.py
Day01-15/code/Day09/shape.py
+0
-0
Day01-15/code/Day09/triangle.py
Day01-15/code/Day09/triangle.py
+0
-0
Day01-15/code/Day10/ball.py
Day01-15/code/Day10/ball.py
+0
-0
Day01-15/code/Day10/gui1.py
Day01-15/code/Day10/gui1.py
+0
-0
Day01-15/code/Day10/gui2.py
Day01-15/code/Day10/gui2.py
+0
-0
Day01-15/code/Day10/gui3.py
Day01-15/code/Day10/gui3.py
+0
-0
Day01-15/code/Day10/renju.py
Day01-15/code/Day10/renju.py
+78
-78
Day01-15/code/Day10/snake.py
Day01-15/code/Day10/snake.py
+334
-334
Day01-15/code/Day10/turtle1.py
Day01-15/code/Day10/turtle1.py
+0
-0
Day01-15/code/Day11/csv1.py
Day01-15/code/Day11/csv1.py
+0
-0
Day01-15/code/Day11/csv2.py
Day01-15/code/Day11/csv2.py
+0
-0
Day01-15/code/Day11/ex1.py
Day01-15/code/Day11/ex1.py
+0
-0
Day01-15/code/Day11/ex2.py
Day01-15/code/Day11/ex2.py
+0
-0
Day01-15/code/Day11/ex3.py
Day01-15/code/Day11/ex3.py
+0
-0
Day01-15/code/Day11/ex4.py
Day01-15/code/Day11/ex4.py
+0
-0
Day01-15/code/Day11/example.csv
Day01-15/code/Day11/example.csv
+0
-0
Day01-15/code/Day11/file1.py
Day01-15/code/Day11/file1.py
+0
-0
Day01-15/code/Day11/file2.py
Day01-15/code/Day11/file2.py
+0
-0
Day01-15/code/Day11/file3.py
Day01-15/code/Day11/file3.py
+0
-0
Day01-15/code/Day11/file4.py
Day01-15/code/Day11/file4.py
+0
-0
Day01-15/code/Day11/json1.py
Day01-15/code/Day11/json1.py
+0
-0
Day01-15/code/Day11/json2.py
Day01-15/code/Day11/json2.py
+0
-0
Day01-15/code/Day11/mm.jpg
Day01-15/code/Day11/mm.jpg
+0
-0
Day01-15/code/Day11/pi_million_digits.txt
Day01-15/code/Day11/pi_million_digits.txt
+0
-0
Day01-15/code/Day11/teacher.csv
Day01-15/code/Day11/teacher.csv
+0
-0
Day01-15/code/Day11/致橡树.txt
Day01-15/code/Day11/致橡树.txt
+0
-0
Day01-15/code/Day12/str1.py
Day01-15/code/Day12/str1.py
+0
-0
Day01-15/code/Day12/str2.py
Day01-15/code/Day12/str2.py
+0
-0
Day01-15/code/Day12/test3.py
Day01-15/code/Day12/test3.py
+0
-0
Day01-15/code/Day12/test4.py
Day01-15/code/Day12/test4.py
+0
-0
Day01-15/code/Day12/test5.py
Day01-15/code/Day12/test5.py
+0
-0
Day01-15/code/Day13/asyncio1.py
Day01-15/code/Day13/asyncio1.py
+0
-0
Day01-15/code/Day13/asyncio2.py
Day01-15/code/Day13/asyncio2.py
+0
-0
Day01-15/code/Day13/asyncio3.py
Day01-15/code/Day13/asyncio3.py
+0
-0
Day01-15/code/Day13/coroutine1.py
Day01-15/code/Day13/coroutine1.py
+0
-0
Day01-15/code/Day13/coroutine2.py
Day01-15/code/Day13/coroutine2.py
+0
-0
Day01-15/code/Day13/generator1.py
Day01-15/code/Day13/generator1.py
+0
-0
Day01-15/code/Day13/generator2.py
Day01-15/code/Day13/generator2.py
+0
-0
Day01-15/code/Day13/multiprocess1.py
Day01-15/code/Day13/multiprocess1.py
+0
-0
Day01-15/code/Day13/multiprocess2.py
Day01-15/code/Day13/multiprocess2.py
+0
-0
Day01-15/code/Day13/multiprocess3.py
Day01-15/code/Day13/multiprocess3.py
+0
-0
Day01-15/code/Day13/multiprocess4.py
Day01-15/code/Day13/multiprocess4.py
+0
-0
Day01-15/code/Day13/multithread1.py
Day01-15/code/Day13/multithread1.py
+0
-0
Day01-15/code/Day13/multithread2.py
Day01-15/code/Day13/multithread2.py
+0
-0
Day01-15/code/Day13/multithread3.py
Day01-15/code/Day13/multithread3.py
+0
-0
Day01-15/code/Day13/multithread4.py
Day01-15/code/Day13/multithread4.py
+0
-0
Day01-15/code/Day13/multithread5.py
Day01-15/code/Day13/multithread5.py
+0
-0
Day01-15/code/Day13/multithread6.py
Day01-15/code/Day13/multithread6.py
+0
-0
Day01-15/code/Day13/singlethread1.py
Day01-15/code/Day13/singlethread1.py
+0
-0
Day01-15/code/Day13/singlethread2.py
Day01-15/code/Day13/singlethread2.py
+0
-0
Day01-15/code/Day13/test2.py
Day01-15/code/Day13/test2.py
+0
-0
Day01-15/code/Day13/test3.py
Day01-15/code/Day13/test3.py
+0
-0
Day01-15/code/Day14/chatclient.py
Day01-15/code/Day14/chatclient.py
+0
-0
Day01-15/code/Day14/chatserver.py
Day01-15/code/Day14/chatserver.py
+0
-0
Day01-15/code/Day14/fileclient.py
Day01-15/code/Day14/fileclient.py
+0
-0
Day01-15/code/Day14/fileserver.py
Day01-15/code/Day14/fileserver.py
+0
-0
Day01-15/code/Day14/guido.jpg
Day01-15/code/Day14/guido.jpg
+0
-0
Day01-15/code/Day14/mmdownloader.py
Day01-15/code/Day14/mmdownloader.py
+0
-0
Day01-15/code/Day14/socket1.py
Day01-15/code/Day14/socket1.py
+0
-0
Day01-15/code/Day14/socket2.py
Day01-15/code/Day14/socket2.py
+0
-0
Day01-15/code/Day14/socket3.py
Day01-15/code/Day14/socket3.py
+0
-0
Day01-15/code/Day14/socket4.py
Day01-15/code/Day14/socket4.py
+0
-0
Day01-15/code/Day14/socket5.py
Day01-15/code/Day14/socket5.py
+0
-0
Day01-15/code/Day14/timeclient.py
Day01-15/code/Day14/timeclient.py
+0
-0
Day01-15/code/Day14/timeserver.py
Day01-15/code/Day14/timeserver.py
+0
-0
Day01-15/code/Day15/excel1.py
Day01-15/code/Day15/excel1.py
+0
-0
Day01-15/code/Day15/excel2.py
Day01-15/code/Day15/excel2.py
+0
-0
Day01-15/code/Day15/pdf1.py
Day01-15/code/Day15/pdf1.py
+0
-0
Day01-15/code/Day15/pdf2.py
Day01-15/code/Day15/pdf2.py
+0
-0
Day01-15/code/Day15/pillow1.py
Day01-15/code/Day15/pillow1.py
+0
-0
Day01-15/code/Day15/res/Docker入门教程.pdf
Day01-15/code/Day15/res/Docker入门教程.pdf
+0
-0
Day01-15/code/Day15/res/guido.jpg
Day01-15/code/Day15/res/guido.jpg
+0
-0
Day01-15/code/Day15/res/luohao.png
Day01-15/code/Day15/res/luohao.png
+0
-0
Day01-15/code/Day15/res/学生明细表.xlsx
Day01-15/code/Day15/res/学生明细表.xlsx
+0
-0
Day01-15/code/Day15/res/用函数还是用复杂的表达式.docx
Day01-15/code/Day15/res/用函数还是用复杂的表达式.docx
+0
-0
Day01-15/code/Day15/word1.py
Day01-15/code/Day15/word1.py
+0
-0
Day01-15/code/Day15/word2.py
Day01-15/code/Day15/word2.py
+0
-0
Day01-15/res/TCP-IP-model.png
Day01-15/res/TCP-IP-model.png
+0
-0
Day01-15/res/after-browser.jpg
Day01-15/res/after-browser.jpg
+0
-0
Day01-15/res/arpanet.png
Day01-15/res/arpanet.png
+0
-0
Day01-15/res/ball-game.png
Day01-15/res/ball-game.png
+0
-0
Day01-15/res/ball.png
Day01-15/res/ball.png
+0
-0
Day01-15/res/before-browser.jpg
Day01-15/res/before-browser.jpg
+0
-0
Day01-15/res/browers.jpg
Day01-15/res/browers.jpg
+0
-0
Day01-15/res/browser-market-place.jpeg
Day01-15/res/browser-market-place.jpeg
+0
-0
Day01-15/res/fibonacci-blocks.png
Day01-15/res/fibonacci-blocks.png
+0
-0
Day01-15/res/file-open-mode.png
Day01-15/res/file-open-mode.png
+0
-0
Day01-15/res/formula_1.png
Day01-15/res/formula_1.png
+0
-0
Day01-15/res/formula_2.png
Day01-15/res/formula_2.png
+0
-0
Day01-15/res/formula_3.png
Day01-15/res/formula_3.png
+0
-0
Day01-15/res/formula_4.png
Day01-15/res/formula_4.png
+0
-0
Day01-15/res/formula_5.png
Day01-15/res/formula_5.png
+0
-0
Day01-15/res/formula_6.png
Day01-15/res/formula_6.png
+0
-0
Day01-15/res/formula_7.png
Day01-15/res/formula_7.png
+0
-0
Day01-15/res/formula_8.png
Day01-15/res/formula_8.png
+0
-0
Day01-15/res/how-data-is-processed.jpg
Day01-15/res/how-data-is-processed.jpg
+0
-0
Day01-15/res/image-crop.png
Day01-15/res/image-crop.png
+0
-0
Day01-15/res/image-filter.png
Day01-15/res/image-filter.png
+0
-0
Day01-15/res/image-paste.png
Day01-15/res/image-paste.png
+0
-0
Day01-15/res/image-putpixel.png
Day01-15/res/image-putpixel.png
+0
-0
Day01-15/res/image-rotate.png
Day01-15/res/image-rotate.png
+0
-0
Day01-15/res/image-show.png
Day01-15/res/image-show.png
+0
-0
Day01-15/res/image-thumbnail.png
Day01-15/res/image-thumbnail.png
+0
-0
Day01-15/res/image-transpose.png
Day01-15/res/image-transpose.png
+0
-0
Day01-15/res/ipython-timeit.png
Day01-15/res/ipython-timeit.png
+0
-0
Day01-15/res/macos-monitor.png
Day01-15/res/macos-monitor.png
+0
-0
Day01-15/res/object-feature.png
Day01-15/res/object-feature.png
+0
-0
Day01-15/res/oop-zhihu.png
Day01-15/res/oop-zhihu.png
+0
-0
Day01-15/res/osi_rm.gif
Day01-15/res/osi_rm.gif
+0
-0
Day01-15/res/osimodel.png
Day01-15/res/osimodel.png
+0
-0
Day01-15/res/python-idle.png
Day01-15/res/python-idle.png
+0
-0
Day01-15/res/python-ipython.png
Day01-15/res/python-ipython.png
+0
-0
Day01-15/res/python-jupyter-1.png
Day01-15/res/python-jupyter-1.png
+0
-0
Day01-15/res/python-jupyter-2.png
Day01-15/res/python-jupyter-2.png
+0
-0
Day01-15/res/python-pycharm.png
Day01-15/res/python-pycharm.png
+0
-0
Day01-15/res/python-set.png
Day01-15/res/python-set.png
+0
-0
Day01-15/res/python-sublime.png
Day01-15/res/python-sublime.png
+0
-0
Day01-15/res/tcpipprotocols.png
Day01-15/res/tcpipprotocols.png
+0
-0
Day01-15/res/tel-start-number.png
Day01-15/res/tel-start-number.png
+0
-0
Day01-15/res/telnet.png
Day01-15/res/telnet.png
+0
-0
Day01-15/res/uml-components.png
Day01-15/res/uml-components.png
+0
-0
Day01-15/res/uml-example.png
Day01-15/res/uml-example.png
+0
-0
Day16-20/16.Python语言进阶.md
Day16-20/16.Python语言进阶.md
+0
-0
Day21-30/21.Web前端概述.md
Day21-30/21.Web前端概述.md
+0
-0
Day31-35/31.玩转Linux操作系统.md
Day31-35/31.玩转Linux操作系统.md
+0
-0
Day36-40/36.关系型数据库MySQL.md
Day36-40/36.关系型数据库MySQL.md
+0
-0
Day36-40/39.NoSQL入门.md
Day36-40/39.NoSQL入门.md
+0
-0
Day41-55/41.快速上手.md
Day41-55/41.快速上手.md
+0
-0
Day41-55/42.深入模型.md
Day41-55/42.深入模型.md
+0
-0
Day41-55/43.静态资源和Ajax请求.md
Day41-55/43.静态资源和Ajax请求.md
+0
-0
Day41-55/44.表单的应用.md
Day41-55/44.表单的应用.md
+0
-0
Day41-55/45.Cookie和Session.md
Day41-55/45.Cookie和Session.md
+0
-0
Day41-55/46.中间件的应用.md
Day41-55/46.中间件的应用.md
+0
-0
Day41-55/47.日志和调试.md
Day41-55/47.日志和调试.md
+0
-0
Day41-55/48.文件上传和富文本编辑.md
Day41-55/48.文件上传和富文本编辑.md
+0
-0
Day41-55/49.文件下载和报表.md
Day41-55/49.文件下载和报表.md
+0
-0
Day41-55/50.RESTful架构和DRF入门.md
Day41-55/50.RESTful架构和DRF入门.md
+0
-0
Day41-55/51.RESTful架构和DRF进阶.md
Day41-55/51.RESTful架构和DRF进阶.md
+0
-0
Day41-55/52.使用缓存.md
Day41-55/52.使用缓存.md
+0
-0
Day41-55/53.短信和邮件.md
Day41-55/53.短信和邮件.md
+0
-0
Day41-55/54.异步任务和定时任务.md
Day41-55/54.异步任务和定时任务.md
+0
-0
Day41-55/55.单元测试和项目上线.md
Day41-55/55.单元测试和项目上线.md
+0
-0
Day56-60/56.Flask入门.md
Day56-60/56.Flask入门.md
+0
-0
Day56-60/57.模板的使用.md
Day56-60/57.模板的使用.md
+0
-0
Day56-60/58.表单的处理.md
Day56-60/58.表单的处理.md
+0
-0
Day56-60/59.数据库操作.md
Day56-60/59.数据库操作.md
+0
-0
Day56-60/60.项目实战.md
Day56-60/60.项目实战.md
+0
-0
Day61-65/61.预备知识.md
Day61-65/61.预备知识.md
+0
-0
Day61-65/62.Tornado入门.md
Day61-65/62.Tornado入门.md
+0
-0
Day61-65/63.异步化.md
Day61-65/63.异步化.md
+0
-0
Day61-65/64.WebSocket的应用.md
Day61-65/64.WebSocket的应用.md
+0
-0
Day61-65/65.项目实战.md
Day61-65/65.项目实战.md
+0
-0
Day66-75/66.网络爬虫和相关工具.md
Day66-75/66.网络爬虫和相关工具.md
+0
-0
Day66-75/67.数据采集和解析.md
Day66-75/67.数据采集和解析.md
+0
-0
Day66-75/68.存储数据.md
Day66-75/68.存储数据.md
+0
-0
Day66-75/69.并发下载.md
Day66-75/69.并发下载.md
+0
-0
Day66-75/70.解析动态内容.md
Day66-75/70.解析动态内容.md
+0
-0
Day66-75/71.表单交互和验证码处理.md
Day66-75/71.表单交互和验证码处理.md
+0
-0
Day66-75/72.Scrapy入门.md
Day66-75/72.Scrapy入门.md
+0
-0
Day66-75/73.Scrapy高级应用.md
Day66-75/73.Scrapy高级应用.md
+0
-0
Day66-75/74.Scrapy分布式实现.md
Day66-75/74.Scrapy分布式实现.md
+0
-0
Day66-75/75.爬虫项目实战.md
Day66-75/75.爬虫项目实战.md
+0
-0
Day76-90/76.机器学习基础.md
Day76-90/76.机器学习基础.md
+0
-0
Day76-90/77.Pandas的应用.md
Day76-90/77.Pandas的应用.md
+0
-0
Day76-90/78.NumPy和SciPy的应用.md
Day76-90/78.NumPy和SciPy的应用.md
+0
-0
Day76-90/79.Matplotlib和数据可视化.md
Day76-90/79.Matplotlib和数据可视化.md
+0
-0
Day76-90/80.k最近邻分类.md
Day76-90/80.k最近邻分类.md
+0
-0
Day76-90/81.决策树.md
Day76-90/81.决策树.md
+0
-0
Day76-90/82.贝叶斯分类.md
Day76-90/82.贝叶斯分类.md
+0
-0
Day76-90/83.支持向量机.md
Day76-90/83.支持向量机.md
+0
-0
Day76-90/84.K-均值聚类.md
Day76-90/84.K-均值聚类.md
+0
-0
Day76-90/85.回归分析.md
Day76-90/85.回归分析.md
+0
-0
Day76-90/86.大数据分析入门.md
Day76-90/86.大数据分析入门.md
+0
-0
Day76-90/87.大数据分析进阶.md
Day76-90/87.大数据分析进阶.md
+0
-0
Day76-90/88.Tensorflow入门.md
Day76-90/88.Tensorflow入门.md
+0
-0
Day76-90/89.Tensorflow实战.md
Day76-90/89.Tensorflow实战.md
+0
-0
Day76-90/90.推荐系统实战.md
Day76-90/90.推荐系统实战.md
+0
-0
Day91-100/100.英语面试.md
Day91-100/100.英语面试.md
+0
-0
Day91-100/91.团队项目开发准备.md
Day91-100/91.团队项目开发准备.md
+0
-0
Day91-100/92.Docker在项目中的应用.md
Day91-100/92.Docker在项目中的应用.md
+0
-0
Day91-100/93.数据库设计和OOAD.md
Day91-100/93.数据库设计和OOAD.md
+0
-0
Day91-100/94.网络API接口设计.md
Day91-100/94.网络API接口设计.md
+0
-0
Day91-100/95.使用Django开发项目.md
Day91-100/95.使用Django开发项目.md
+0
-0
Day91-100/96.软件测试和自动化测试.md
Day91-100/96.软件测试和自动化测试.md
+0
-0
Day91-100/97.电商网站技术要点剖析.md
Day91-100/97.电商网站技术要点剖析.md
+0
-0
Day91-100/98.项目部署上线和性能调优.md
Day91-100/98.项目部署上线和性能调优.md
+0
-0
Day91-100/99.面试中的公共问题.md
Day91-100/99.面试中的公共问题.md
+0
-0
README.md
README.md
+86
-90
常见反爬策略及应对方案.md
常见反爬策略及应对方案.md
+0
-0
未找到文件。
Day01-15/
Day01/
初识Python.md
→
Day01-15/
01.
初识Python.md
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day02/
语言元素.md
→
Day01-15/
02.
语言元素.md
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day03/
分支结构.md
→
Day01-15/
03.
分支结构.md
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day04/
循环结构.md
→
Day01-15/
04.
循环结构.md
浏览文件 @
6a7f8602
...
...
@@ -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
"""
...
...
Day01-15/
Day05/
总结和练习.md
→
Day01-15/
05.
总结和练习.md
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day06/
函数和模块的使用.md
→
Day01-15/
06.
函数和模块的使用.md
浏览文件 @
6a7f8602
...
...
@@ -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的程序来计算出这个值,代码如下所示。
...
...
Day01-15/
Day07/
字符串和常用数据结构.md
→
Day01-15/
07.
字符串和常用数据结构.md
浏览文件 @
6a7f8602
...
...
@@ -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
)
...
...
Day01-15/
Day08/
面向对象编程基础.md
→
Day01-15/
08.
面向对象编程基础.md
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day09/
面向对象进阶.md
→
Day01-15/
09.
面向对象进阶.md
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day10/
图形用户界面和游戏开发.md
→
Day01-15/
10.
图形用户界面和游戏开发.md
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day11/
文件和异常.md
→
Day01-15/
11.
文件和异常.md
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day12/
字符串和正则表达式.md
→
Day01-15/
12.
字符串和正则表达式.md
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day13/
进程和线程.md
→
Day01-15/
13.
进程和线程.md
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day14-A/网络编程入门
.md
→
Day01-15/
14.网络编程入门和网络应用开发
.md
浏览文件 @
6a7f8602
...
...
@@ -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
Day01-15/
Day15/
图像和办公文档处理.md
→
Day01-15/
15.
图像和办公文档处理.md
浏览文件 @
6a7f8602
文件已移动
Day01-15/Day09/res/uml-example.gliffy
已删除
100644 → 0
浏览文件 @
36ffd6c2
此差异已折叠。
点击以展开。
Day01-15/Day14-B/网络应用开发.md
已删除
100644 → 0
浏览文件 @
36ffd6c2
## 网络应用开发
### 发送电子邮件
在即时通信软件如此发达的今天,电子邮件仍然是互联网上使用最为广泛的应用之一,公司向应聘者发出录用通知、网站向用户发送一个激活账号的链接、银行向客户推广它们的理财产品等几乎都是通过电子邮件来完成的,而这些任务应该都是由程序自动完成的。
就像我们可以用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()
```
Day01-15/
Day01/code
/hello.py
→
Day01-15/
code/Day01
/hello.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day01/code
/peppa_pig.py
→
Day01-15/
code/Day01
/peppa_pig.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day02/code
/centigrade.py
→
Day01-15/
code/Day02
/centigrade.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day02/code
/circle.py
→
Day01-15/
code/Day02
/circle.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day02/code
/leap.py
→
Day01-15/
code/Day02
/leap.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day02/code
/operator.py
→
Day01-15/
code/Day02
/operator.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day02/code
/strings.py
→
Day01-15/
code/Day02
/strings.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day02/code
/variable1.py
→
Day01-15/
code/Day02
/variable1.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day02/code
/variable2.py
→
Day01-15/
code/Day02
/variable2.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day02/code
/variable3.py
→
Day01-15/
code/Day02
/variable3.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day02/code
/variable4.py
→
Day01-15/
code/Day02
/variable4.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day02/code
/variable5.py
→
Day01-15/
code/Day02
/variable5.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day03/code
/convert.py
→
Day01-15/
code/Day03
/convert.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day03/code
/grade.py
→
Day01-15/
code/Day03
/grade.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day03/code
/piecewise.py
→
Day01-15/
code/Day03
/piecewise.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day03/code
/rolldice.py
→
Day01-15/
code/Day03
/rolldice.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day03/code
/tax.py
→
Day01-15/
code/Day03
/tax.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day03/code
/triangle.py
→
Day01-15/
code/Day03
/triangle.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day03/code
/verify.py
→
Day01-15/
code/Day03
/verify.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day04/code
/for1.py
→
Day01-15/
code/Day04
/for1.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day04/code
/for2.py
→
Day01-15/
code/Day04
/for2.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day04/code
/for3.py
→
Day01-15/
code/Day04
/for3.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day04/code
/for4.py
→
Day01-15/
code/Day04
/for4.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day04/code
/for5.py
→
Day01-15/
code/Day04
/for5.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day04/code
/for6.py
→
Day01-15/
code/Day04
/for6.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day04/code
/while1.py
→
Day01-15/
code/Day04
/while1.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day04/code
/while2.py
→
Day01-15/
code/Day04
/while2.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day05/code
/chicken.py
→
Day01-15/
code/Day05
/chicken.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day05/code
/craps.py
→
Day01-15/
code/Day05
/craps.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day05/code
/fibonacci.py
→
Day01-15/
code/Day05
/fibonacci.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day05/code
/guess.py
→
Day01-15/
code/Day05
/guess.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day05/code
/lily.py
→
Day01-15/
code/Day05
/lily.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day05/code
/palindrome.py
→
Day01-15/
code/Day05
/palindrome.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day05/code
/perfect.py
→
Day01-15/
code/Day05
/perfect.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day05/code
/prime.py
→
Day01-15/
code/Day05
/prime.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day05/code
/table.py
→
Day01-15/
code/Day05
/table.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day06/code
/function1.py
→
Day01-15/
code/Day06
/function1.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day06/code
/function2.py
→
Day01-15/
code/Day06
/function2.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day06/code
/function3.py
→
Day01-15/
code/Day06
/function3.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day06/code
/function4.py
→
Day01-15/
code/Day06
/function4.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day06/code
/function5.py
→
Day01-15/
code/Day06
/function5.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day06/code
/function6.py
→
Day01-15/
code/Day06
/function6.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day07/code
/avgscore.py
→
Day01-15/
code/Day07
/avgscore.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day07/code
/dict1.py
→
Day01-15/
code/Day07
/dict1.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day07/code
/dict2.py
→
Day01-15/
code/Day07
/dict2.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day07/code
/fibonacci.py
→
Day01-15/
code/Day07
/fibonacci.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day07/code
/findmax.py
→
Day01-15/
code/Day07
/findmax.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day07/code
/list1.py
→
Day01-15/
code/Day07
/list1.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day07/code
/list2.py
→
Day01-15/
code/Day07
/list2.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day07/code
/list3.py
→
Day01-15/
code/Day07
/list3.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day07/code
/lottery.py
→
Day01-15/
code/Day07
/lottery.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day07/code
/marquee.py
→
Day01-15/
code/Day07
/marquee.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day07/code
/scoretable.py
→
Day01-15/
code/Day07
/scoretable.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day07/code
/set1.py
→
Day01-15/
code/Day07
/set1.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day07/code
/set2.py
→
Day01-15/
code/Day07
/set2.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day07/code
/tic-tac-toe.py
→
Day01-15/
code/Day07
/tic-tac-toe.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day07/code
/tuple.py
→
Day01-15/
code/Day07
/tuple.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day07/code
/yanghui.py
→
Day01-15/
code/Day07
/yanghui.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day08/code
/access.py
→
Day01-15/
code/Day08
/access.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day08/code
/circle.py
→
Day01-15/
code/Day08
/circle.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day08/code
/clock.py
→
Day01-15/
code/Day08
/clock.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day08/code
/guess.py
→
Day01-15/
code/Day08
/guess.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day08/code
/hack.py
→
Day01-15/
code/Day08
/hack.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day08/code
/rect.py
→
Day01-15/
code/Day08
/rect.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day08/code
/student.py
→
Day01-15/
code/Day08
/student.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day09/code
/association.py
→
Day01-15/
code/Day09
/association.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day09/code
/car1.py
→
Day01-15/
code/Day09
/car1.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day09/code
/car2.py
→
Day01-15/
code/Day09
/car2.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day09/code
/clock.py
→
Day01-15/
code/Day09
/clock.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day09/code
/dependency.py
→
Day01-15/
code/Day09
/dependency.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day09/code
/diamond.py
→
Day01-15/
code/Day09
/diamond.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day09/code
/employee.py
→
Day01-15/
code/Day09
/employee.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day09/code
/multi.py
→
Day01-15/
code/Day09
/multi.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day09/code
/pet.py
→
Day01-15/
code/Day09
/pet.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day09/code
/rational.py
→
Day01-15/
code/Day09
/rational.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day09/code
/shape.py
→
Day01-15/
code/Day09
/shape.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day09/code
/triangle.py
→
Day01-15/
code/Day09
/triangle.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day10/code
/ball.py
→
Day01-15/
code/Day10
/ball.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day10/code
/gui1.py
→
Day01-15/
code/Day10
/gui1.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day10/code
/gui2.py
→
Day01-15/
code/Day10
/gui2.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day10/code
/gui3.py
→
Day01-15/
code/Day10
/gui3.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day10/code
/renju.py
→
Day01-15/
code/Day10
/renju.py
浏览文件 @
6a7f8602
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
()
Day01-15/
Day10/code
/snake.py
→
Day01-15/
code/Day10
/snake.py
浏览文件 @
6a7f8602
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
()
Day01-15/
Day10/code
/turtle1.py
→
Day01-15/
code/Day10
/turtle1.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day11/code
/csv1.py
→
Day01-15/
code/Day11
/csv1.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day11/code
/csv2.py
→
Day01-15/
code/Day11
/csv2.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day11/code
/ex1.py
→
Day01-15/
code/Day11
/ex1.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day11/code
/ex2.py
→
Day01-15/
code/Day11
/ex2.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day11/code
/ex3.py
→
Day01-15/
code/Day11
/ex3.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day11/code
/ex4.py
→
Day01-15/
code/Day11
/ex4.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day11/code
/example.csv
→
Day01-15/
code/Day11
/example.csv
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day11/code
/file1.py
→
Day01-15/
code/Day11
/file1.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day11/code
/file2.py
→
Day01-15/
code/Day11
/file2.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day11/code
/file3.py
→
Day01-15/
code/Day11
/file3.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day11/code
/file4.py
→
Day01-15/
code/Day11
/file4.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day11/code
/json1.py
→
Day01-15/
code/Day11
/json1.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day11/code
/json2.py
→
Day01-15/
code/Day11
/json2.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day11/code
/mm.jpg
→
Day01-15/
code/Day11
/mm.jpg
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day11/code
/pi_million_digits.txt
→
Day01-15/
code/Day11
/pi_million_digits.txt
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day11/code
/teacher.csv
→
Day01-15/
code/Day11
/teacher.csv
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day11/code
/致橡树.txt
→
Day01-15/
code/Day11
/致橡树.txt
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day12/code
/str1.py
→
Day01-15/
code/Day12
/str1.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day12/code
/str2.py
→
Day01-15/
code/Day12
/str2.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day12/code
/test3.py
→
Day01-15/
code/Day12
/test3.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day12/code
/test4.py
→
Day01-15/
code/Day12
/test4.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day12/code
/test5.py
→
Day01-15/
code/Day12
/test5.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day13/code
/asyncio1.py
→
Day01-15/
code/Day13
/asyncio1.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day13/code
/asyncio2.py
→
Day01-15/
code/Day13
/asyncio2.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day13/code
/asyncio3.py
→
Day01-15/
code/Day13
/asyncio3.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day13/code
/coroutine1.py
→
Day01-15/
code/Day13
/coroutine1.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day13/code
/coroutine2.py
→
Day01-15/
code/Day13
/coroutine2.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day13/code
/generator1.py
→
Day01-15/
code/Day13
/generator1.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day13/code
/generator2.py
→
Day01-15/
code/Day13
/generator2.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day13/code
/multiprocess1.py
→
Day01-15/
code/Day13
/multiprocess1.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day13/code
/multiprocess2.py
→
Day01-15/
code/Day13
/multiprocess2.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day13/code
/multiprocess3.py
→
Day01-15/
code/Day13
/multiprocess3.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day13/code
/multiprocess4.py
→
Day01-15/
code/Day13
/multiprocess4.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day13/code
/multithread1.py
→
Day01-15/
code/Day13
/multithread1.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day13/code
/multithread2.py
→
Day01-15/
code/Day13
/multithread2.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day13/code
/multithread3.py
→
Day01-15/
code/Day13
/multithread3.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day13/code
/multithread4.py
→
Day01-15/
code/Day13
/multithread4.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day13/code
/multithread5.py
→
Day01-15/
code/Day13
/multithread5.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day13/code
/multithread6.py
→
Day01-15/
code/Day13
/multithread6.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day13/code
/singlethread1.py
→
Day01-15/
code/Day13
/singlethread1.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day13/code
/singlethread2.py
→
Day01-15/
code/Day13
/singlethread2.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day13/code
/test2.py
→
Day01-15/
code/Day13
/test2.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day13/code
/test3.py
→
Day01-15/
code/Day13
/test3.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day14-A/code
/chatclient.py
→
Day01-15/
code/Day14
/chatclient.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day14-A/code
/chatserver.py
→
Day01-15/
code/Day14
/chatserver.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day14-A/code
/fileclient.py
→
Day01-15/
code/Day14
/fileclient.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day14-A/code
/fileserver.py
→
Day01-15/
code/Day14
/fileserver.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day14-A/code
/guido.jpg
→
Day01-15/
code/Day14
/guido.jpg
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day14-A/code
/mmdownloader.py
→
Day01-15/
code/Day14
/mmdownloader.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day14-A/code
/socket1.py
→
Day01-15/
code/Day14
/socket1.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day14-A/code
/socket2.py
→
Day01-15/
code/Day14
/socket2.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day14-A/code
/socket3.py
→
Day01-15/
code/Day14
/socket3.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day14-A/code
/socket4.py
→
Day01-15/
code/Day14
/socket4.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day14-A/code
/socket5.py
→
Day01-15/
code/Day14
/socket5.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day14-A/code
/timeclient.py
→
Day01-15/
code/Day14
/timeclient.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day14-A/code
/timeserver.py
→
Day01-15/
code/Day14
/timeserver.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day15/code
/excel1.py
→
Day01-15/
code/Day15
/excel1.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day15/code
/excel2.py
→
Day01-15/
code/Day15
/excel2.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day15/code
/pdf1.py
→
Day01-15/
code/Day15
/pdf1.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day15/code
/pdf2.py
→
Day01-15/
code/Day15
/pdf2.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day15/code
/pillow1.py
→
Day01-15/
code/Day15
/pillow1.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day15/code
/res/Docker入门教程.pdf
→
Day01-15/
code/Day15
/res/Docker入门教程.pdf
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day15/code
/res/guido.jpg
→
Day01-15/
code/Day15
/res/guido.jpg
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day15/code
/res/luohao.png
→
Day01-15/
code/Day15
/res/luohao.png
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day15/code
/res/学生明细表.xlsx
→
Day01-15/
code/Day15
/res/学生明细表.xlsx
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day15/code
/res/用函数还是用复杂的表达式.docx
→
Day01-15/
code/Day15
/res/用函数还是用复杂的表达式.docx
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day15/code
/word1.py
→
Day01-15/
code/Day15
/word1.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day15/code
/word2.py
→
Day01-15/
code/Day15
/word2.py
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day14-A/
res/TCP-IP-model.png
→
Day01-15/res/TCP-IP-model.png
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day14-A/
res/after-browser.jpg
→
Day01-15/res/after-browser.jpg
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day14-A/
res/arpanet.png
→
Day01-15/res/arpanet.png
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day10/
res/ball-game.png
→
Day01-15/res/ball-game.png
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day10/
res/ball.png
→
Day01-15/res/ball.png
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day14-A/
res/before-browser.jpg
→
Day01-15/res/before-browser.jpg
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day14-A/
res/browers.jpg
→
Day01-15/res/browers.jpg
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day14-A/
res/browser-market-place.jpeg
→
Day01-15/res/browser-market-place.jpeg
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day07/
res/fibonacci-blocks.png
→
Day01-15/res/fibonacci-blocks.png
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day11/
res/file-open-mode.png
→
Day01-15/res/file-open-mode.png
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day03/
res/formula_1.png
→
Day01-15/res/formula_1.png
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day04/res/formula_1
.png
→
Day01-15/
res/formula_2
.png
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day06/res/formula_1
.png
→
Day01-15/
res/formula_3
.png
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day06/res/formula_2
.png
→
Day01-15/
res/formula_4
.png
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day07/res/formula_1
.png
→
Day01-15/
res/formula_5
.png
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day07/res/formula_2
.png
→
Day01-15/
res/formula_6
.png
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day07/res/formula_3
.png
→
Day01-15/
res/formula_7
.png
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day07/res/formula_4
.png
→
Day01-15/
res/formula_8
.png
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day14-A/
res/how-data-is-processed.jpg
→
Day01-15/res/how-data-is-processed.jpg
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day15/
res/image-crop.png
→
Day01-15/res/image-crop.png
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day15/
res/image-filter.png
→
Day01-15/res/image-filter.png
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day15/
res/image-paste.png
→
Day01-15/res/image-paste.png
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day15/
res/image-putpixel.png
→
Day01-15/res/image-putpixel.png
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day15/
res/image-rotate.png
→
Day01-15/res/image-rotate.png
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day15/
res/image-show.png
→
Day01-15/res/image-show.png
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day15/
res/image-thumbnail.png
→
Day01-15/res/image-thumbnail.png
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day15/
res/image-transpose.png
→
Day01-15/res/image-transpose.png
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day07/
res/ipython-timeit.png
→
Day01-15/res/ipython-timeit.png
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day13/
res/macos-monitor.png
→
Day01-15/res/macos-monitor.png
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day08/
res/object-feature.png
→
Day01-15/res/object-feature.png
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day08/
res/oop-zhihu.png
→
Day01-15/res/oop-zhihu.png
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day14-A/
res/osi_rm.gif
→
Day01-15/res/osi_rm.gif
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day14-A/
res/osimodel.png
→
Day01-15/res/osimodel.png
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day01/
res/python-idle.png
→
Day01-15/res/python-idle.png
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day01/
res/python-ipython.png
→
Day01-15/res/python-ipython.png
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day01/
res/python-jupyter-1.png
→
Day01-15/res/python-jupyter-1.png
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day01/
res/python-jupyter-2.png
→
Day01-15/res/python-jupyter-2.png
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day01/
res/python-pycharm.png
→
Day01-15/res/python-pycharm.png
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day07/
res/python-set.png
→
Day01-15/res/python-set.png
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day01/
res/python-sublime.png
→
Day01-15/res/python-sublime.png
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day14-A/
res/tcpipprotocols.png
→
Day01-15/res/tcpipprotocols.png
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day12/
res/tel-start-number.png
→
Day01-15/res/tel-start-number.png
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day14-A/
res/telnet.png
→
Day01-15/res/telnet.png
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day09/
res/uml-components.png
→
Day01-15/res/uml-components.png
浏览文件 @
6a7f8602
文件已移动
Day01-15/
Day09/
res/uml-example.png
→
Day01-15/res/uml-example.png
浏览文件 @
6a7f8602
文件已移动
Day16-20/Python语言进阶.md
→
Day16-20/
16.
Python语言进阶.md
浏览文件 @
6a7f8602
文件已移动
Day21-30/Web前端概述.md
→
Day21-30/
21.
Web前端概述.md
浏览文件 @
6a7f8602
文件已移动
Day31-35/玩转Linux操作系统.md
→
Day31-35/
31.
玩转Linux操作系统.md
浏览文件 @
6a7f8602
文件已移动
Day36-40/关系型数据库MySQL.md
→
Day36-40/
36.
关系型数据库MySQL.md
浏览文件 @
6a7f8602
文件已移动
Day36-40/NoSQL入门.md
→
Day36-40/
39.
NoSQL入门.md
浏览文件 @
6a7f8602
文件已移动
Day41-55/
0
1.快速上手.md
→
Day41-55/
4
1.快速上手.md
浏览文件 @
6a7f8602
文件已移动
Day41-55/
0
2.深入模型.md
→
Day41-55/
4
2.深入模型.md
浏览文件 @
6a7f8602
文件已移动
Day41-55/
0
3.静态资源和Ajax请求.md
→
Day41-55/
4
3.静态资源和Ajax请求.md
浏览文件 @
6a7f8602
文件已移动
Day41-55/
0
4.表单的应用.md
→
Day41-55/
4
4.表单的应用.md
浏览文件 @
6a7f8602
文件已移动
Day41-55/
0
5.Cookie和Session.md
→
Day41-55/
4
5.Cookie和Session.md
浏览文件 @
6a7f8602
文件已移动
Day41-55/
0
6.中间件的应用.md
→
Day41-55/
4
6.中间件的应用.md
浏览文件 @
6a7f8602
文件已移动
Day41-55/
0
7.日志和调试.md
→
Day41-55/
4
7.日志和调试.md
浏览文件 @
6a7f8602
文件已移动
Day41-55/
0
8.文件上传和富文本编辑.md
→
Day41-55/
4
8.文件上传和富文本编辑.md
浏览文件 @
6a7f8602
文件已移动
Day41-55/
0
9.文件下载和报表.md
→
Day41-55/
4
9.文件下载和报表.md
浏览文件 @
6a7f8602
文件已移动
Day41-55/
1
0.RESTful架构和DRF入门.md
→
Day41-55/
5
0.RESTful架构和DRF入门.md
浏览文件 @
6a7f8602
文件已移动
Day41-55/
1
1.RESTful架构和DRF进阶.md
→
Day41-55/
5
1.RESTful架构和DRF进阶.md
浏览文件 @
6a7f8602
文件已移动
Day41-55/
1
2.使用缓存.md
→
Day41-55/
5
2.使用缓存.md
浏览文件 @
6a7f8602
文件已移动
Day41-55/
1
3.短信和邮件.md
→
Day41-55/
5
3.短信和邮件.md
浏览文件 @
6a7f8602
文件已移动
Day41-55/
1
4.异步任务和定时任务.md
→
Day41-55/
5
4.异步任务和定时任务.md
浏览文件 @
6a7f8602
文件已移动
Day41-55/
1
5.单元测试和项目上线.md
→
Day41-55/
5
5.单元测试和项目上线.md
浏览文件 @
6a7f8602
文件已移动
Day56-60/
01
.Flask入门.md
→
Day56-60/
56
.Flask入门.md
浏览文件 @
6a7f8602
文件已移动
Day56-60/
02
.模板的使用.md
→
Day56-60/
57
.模板的使用.md
浏览文件 @
6a7f8602
文件已移动
Day56-60/
03
.表单的处理.md
→
Day56-60/
58
.表单的处理.md
浏览文件 @
6a7f8602
文件已移动
Day56-60/
04
.数据库操作.md
→
Day56-60/
59
.数据库操作.md
浏览文件 @
6a7f8602
文件已移动
Day56-60/
05
.项目实战.md
→
Day56-60/
60
.项目实战.md
浏览文件 @
6a7f8602
文件已移动
Day61-65/
0
1.预备知识.md
→
Day61-65/
6
1.预备知识.md
浏览文件 @
6a7f8602
文件已移动
Day61-65/
0
2.Tornado入门.md
→
Day61-65/
6
2.Tornado入门.md
浏览文件 @
6a7f8602
文件已移动
Day61-65/
0
3.异步化.md
→
Day61-65/
6
3.异步化.md
浏览文件 @
6a7f8602
文件已移动
Day61-65/
0
4.WebSocket的应用.md
→
Day61-65/
6
4.WebSocket的应用.md
浏览文件 @
6a7f8602
文件已移动
Day61-65/
0
5.项目实战.md
→
Day61-65/
6
5.项目实战.md
浏览文件 @
6a7f8602
文件已移动
Day66-75/
01
.网络爬虫和相关工具.md
→
Day66-75/
66
.网络爬虫和相关工具.md
浏览文件 @
6a7f8602
文件已移动
Day66-75/
02
.数据采集和解析.md
→
Day66-75/
67
.数据采集和解析.md
浏览文件 @
6a7f8602
文件已移动
Day66-75/
03
.存储数据.md
→
Day66-75/
68
.存储数据.md
浏览文件 @
6a7f8602
文件已移动
Day66-75/
04
.并发下载.md
→
Day66-75/
69
.并发下载.md
浏览文件 @
6a7f8602
文件已移动
Day66-75/
05
.解析动态内容.md
→
Day66-75/
70
.解析动态内容.md
浏览文件 @
6a7f8602
文件已移动
Day66-75/
06
.表单交互和验证码处理.md
→
Day66-75/
71
.表单交互和验证码处理.md
浏览文件 @
6a7f8602
文件已移动
Day66-75/
07
.Scrapy入门.md
→
Day66-75/
72
.Scrapy入门.md
浏览文件 @
6a7f8602
文件已移动
Day66-75/
08
.Scrapy高级应用.md
→
Day66-75/
73
.Scrapy高级应用.md
浏览文件 @
6a7f8602
文件已移动
Day66-75/
09
.Scrapy分布式实现.md
→
Day66-75/
74
.Scrapy分布式实现.md
浏览文件 @
6a7f8602
文件已移动
Day66-75/
10
.爬虫项目实战.md
→
Day66-75/
75
.爬虫项目实战.md
浏览文件 @
6a7f8602
文件已移动
Day76-90/
01
.机器学习基础.md
→
Day76-90/
76
.机器学习基础.md
浏览文件 @
6a7f8602
文件已移动
Day76-90/
02
.Pandas的应用.md
→
Day76-90/
77
.Pandas的应用.md
浏览文件 @
6a7f8602
文件已移动
Day76-90/
03
.NumPy和SciPy的应用.md
→
Day76-90/
78
.NumPy和SciPy的应用.md
浏览文件 @
6a7f8602
文件已移动
Day76-90/
04
.Matplotlib和数据可视化.md
→
Day76-90/
79
.Matplotlib和数据可视化.md
浏览文件 @
6a7f8602
文件已移动
Day76-90/
05
.k最近邻分类.md
→
Day76-90/
80
.k最近邻分类.md
浏览文件 @
6a7f8602
文件已移动
Day76-90/
06
.决策树.md
→
Day76-90/
81
.决策树.md
浏览文件 @
6a7f8602
文件已移动
Day76-90/
07
.贝叶斯分类.md
→
Day76-90/
82
.贝叶斯分类.md
浏览文件 @
6a7f8602
文件已移动
Day76-90/
08
.支持向量机.md
→
Day76-90/
83
.支持向量机.md
浏览文件 @
6a7f8602
文件已移动
Day76-90/
09
.K-均值聚类.md
→
Day76-90/
84
.K-均值聚类.md
浏览文件 @
6a7f8602
文件已移动
Day76-90/
10
.回归分析.md
→
Day76-90/
85
.回归分析.md
浏览文件 @
6a7f8602
文件已移动
Day76-90/
11
.大数据分析入门.md
→
Day76-90/
86
.大数据分析入门.md
浏览文件 @
6a7f8602
文件已移动
Day76-90/
12
.大数据分析进阶.md
→
Day76-90/
87
.大数据分析进阶.md
浏览文件 @
6a7f8602
文件已移动
Day76-90/
13
.Tensorflow入门.md
→
Day76-90/
88
.Tensorflow入门.md
浏览文件 @
6a7f8602
文件已移动
Day76-90/
14
.Tensorflow实战.md
→
Day76-90/
89
.Tensorflow实战.md
浏览文件 @
6a7f8602
文件已移动
Day76-90/
15
.推荐系统实战.md
→
Day76-90/
90
.推荐系统实战.md
浏览文件 @
6a7f8602
文件已移动
Day91-100/英语面试.md
→
Day91-100/
100.
英语面试.md
浏览文件 @
6a7f8602
文件已移动
Day91-100/
团队项目开发
.md
→
Day91-100/
91.团队项目开发准备
.md
浏览文件 @
6a7f8602
此差异已折叠。
点击以展开。
Day91-100/
Docker简易上手指南
.md
→
Day91-100/
92.Docker在项目中的应用
.md
浏览文件 @
6a7f8602
此差异已折叠。
点击以展开。
Day91-100/
MySQL相关知识
.md
→
Day91-100/
93.数据库设计和OOAD
.md
浏览文件 @
6a7f8602
此差异已折叠。
点击以展开。
Day91-100/网络API接口设计.md
→
Day91-100/
94.
网络API接口设计.md
浏览文件 @
6a7f8602
文件已移动
Day91-100/
Django知识点概述
.md
→
Day91-100/
95.使用Django开发项目
.md
浏览文件 @
6a7f8602
文件已移动
Day91-100/
关于
测试和自动化测试.md
→
Day91-100/
96.软件
测试和自动化测试.md
浏览文件 @
6a7f8602
文件已移动
Day91-100/电商网站技术要点剖析.md
→
Day91-100/
97.
电商网站技术要点剖析.md
浏览文件 @
6a7f8602
文件已移动
Day91-100/
项目部署上线指南
.md
→
Day91-100/
98.项目部署上线和性能调优
.md
浏览文件 @
6a7f8602
文件已移动
Day91-100/面试中的公共问题.md
→
Day91-100/
99.
面试中的公共问题.md
浏览文件 @
6a7f8602
文件已移动
README.md
浏览文件 @
6a7f8602
此差异已折叠。
点击以展开。
Day66-75/
常见反爬策略及应对方案.md
→
常见反爬策略及应对方案.md
浏览文件 @
6a7f8602
文件已移动
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录