diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..24b30fa Binary files /dev/null and b/.DS_Store differ diff --git a/2012-12-13.png b/2012-12-13.png new file mode 100644 index 0000000..2096fad Binary files /dev/null and b/2012-12-13.png differ diff --git a/2019/ProblemSolvingwithAlgorithmsandDataStructuresusingPython.md b/2019/ProblemSolvingwithAlgorithmsandDataStructuresusingPython.md new file mode 100644 index 0000000..7273470 --- /dev/null +++ b/2019/ProblemSolvingwithAlgorithmsandDataStructuresusingPython.md @@ -0,0 +1,33 @@ +# 黄哥Python: 在本地看数据结构和算法书 + +按照下面这样做,可以像我一样,在本地看 + +《Problem Solving with Algorithms and Data Structures using Python》这本电子书 + +![](datastructures.jpg) + + + +第一步:git clone 到本地 + +git clone [https://github.com/RunestoneInteractive/pythonds](https://link.zhihu.com/?target=https%3A//github.com/RunestoneInteractive/pythonds) + +第二步:安装库 + +pip install -r requirements.txt + +第三步: 生成html 文件 + +``` +runestone build +``` + +will build the html and put it in `./build/pythonds` + +第四步:runestone serve + +will start a webserver and serve the pages locally from `./build/pythonds` + +第五步: 在浏览器输入127.0.0.1:8000, 就可以浏览该书的内容。 + +[黄哥Python:提醒要转行当程序员的朋友,学习要分先后主次](https://github.com/pythonpeixun/article/blob/master/2019/learninghaspriority.md) \ No newline at end of file diff --git a/2019/datastructures.jpg b/2019/datastructures.jpg new file mode 100644 index 0000000..c06c6cd Binary files /dev/null and b/2019/datastructures.jpg differ diff --git a/2019/learninghaspriority.md b/2019/learninghaspriority.md new file mode 100644 index 0000000..17ce000 --- /dev/null +++ b/2019/learninghaspriority.md @@ -0,0 +1,17 @@ +## 黄哥Python:提醒要转行当程序员的朋友,学习要分先后主次 + +#### 很多要转行当程序员的朋友,被所谓的项目所迷惑,认为自己照着葫芦画瓢学了几个项目开发,认为自己就能转行成功,下面听黄哥细细道来。 + + +##### 1、黄哥提醒:短时间内你开发项目的能力不可能达到有多年编程经验程序员的水平。用力不要用错方向。先要确保转行成功。 + +##### 2、黄哥提醒:找工作时,公司一般都要做面试题,面试题考啥?一般都是算法题。所以重点先要通过** 语言学会编程,再学数据结构和算法,再刷题,顺利通过面试。 + +##### 3、黄哥提醒:很多朋友热衷于所谓的项目训练,忽视基本功的训练,到面试时就挂。如果在面试过程中,让在白板上手写一个冒泡排序,归并排序,二叉树的遍历等都写不出来代码,你能证明你会编程? +##### 4、黄哥提醒:等找到工作后,在牛逼leader的push下,有三到四个月时间,会成长很快的,会承担部分需求的开发。 + +##### 5、黄哥提醒:在学习过程中,项目开发,能写出一个项目即可,重点要学数据结构和算法,再刷题。等转行成功后,在工作中成长。 + +##### 黄哥提醒:学习千万不要搞错方向,不然找不到工作时,抱怨工作难找,为啥别人能找到,而你找不到程序员的工作,有反思吗? + +[黄哥谈转行当程序员](https://www.bilibili.com/video/av22524233) \ No newline at end of file diff --git "a/2021/\351\200\232\350\277\207Python\345\255\246\344\274\232\347\274\226\347\250\213\350\256\255\347\273\203\347\217\255.md" "b/2021/\351\200\232\350\277\207Python\345\255\246\344\274\232\347\274\226\347\250\213\350\256\255\347\273\203\347\217\255.md" new file mode 100644 index 0000000..a826071 --- /dev/null +++ "b/2021/\351\200\232\350\277\207Python\345\255\246\344\274\232\347\274\226\347\250\213\350\256\255\347\273\203\347\217\255.md" @@ -0,0 +1,89 @@ +# 通过Python学会编程训练班(第一期) + +## 唯一目的,训练学员通过学习Python学会编程。训练学员养成独立思考、独立解决问题的能力。 +# 上课形式 + + 每周六上午通过腾讯会议共享视频上课(上午8点到12点),连续上课二个月。 + +# 学员要求,大专以上学历,有英语和高中以上数学基础,非叶公好龙,能及时完成作业,能积极提问者。叶公好龙,不按时写作业,不下功夫者,请不要浪费钱参加。 + +# 授课内容: +先训练变量、表达式、判断,循环,再学过程抽象(函数抽象),再学习数据抽象(类抽象)。 + +重点训练算法:递归,排序、搜索,二分查找,树的dfs,bfs。 + +数据结构:链表,栈,队列、树。 + +补充教材上没有的内容:单元测试, 爬虫案例。 + +Textbook : 《**How to Think Like a Computer Scientist: Learning with Python 3**》 + +[Chapter 1](https://openbookproject.net/thinkcs/python/english3e/way_of_the_program.html) *The way of the program* + +[Chapter 2](https://openbookproject.net/thinkcs/python/english3e/variables_expressions_statements.html) *Variables, expressions, and statements* + +[Chapter 3](https://openbookproject.net/thinkcs/python/english3e/hello_little_turtles.html) *Hello, little turtles!* + +[Chapter 4](https://openbookproject.net/thinkcs/python/english3e/functions.html) *Functions* + +[Chapter 5](https://openbookproject.net/thinkcs/python/english3e/conditionals.html) *Conditionals* + +[Chapter 6](https://openbookproject.net/thinkcs/python/english3e/fruitful_functions.html) *Fruitful functions* + +[Chapter 7](https://openbookproject.net/thinkcs/python/english3e/iteration.html) *Iteration* + +[Chapter 8](https://openbookproject.net/thinkcs/python/english3e/strings.html) *Strings* + +[Chapter 9](https://openbookproject.net/thinkcs/python/english3e/tuples.html) *Tuples* + +[Chapter 10](https://openbookproject.net/thinkcs/python/english3e/events.html) *Event handling* + +[Chapter 11](https://openbookproject.net/thinkcs/python/english3e/lists.html) *Lists* + +[Chapter 12](https://openbookproject.net/thinkcs/python/english3e/modules.html) *Modules* + +[Chapter 13](https://openbookproject.net/thinkcs/python/english3e/files.html) *Files* + +[Chapter 14](https://openbookproject.net/thinkcs/python/english3e/list_algorithms.html) *List Algorithms* + +[Chapter 15](https://openbookproject.net/thinkcs/python/english3e/classes_and_objects_I.html) *Classes and Objects - the Basics* + +[Chapter 16](https://openbookproject.net/thinkcs/python/english3e/classes_and_objects_II.html) *Classes and Objects - Digging a little deeper* + +[Chapter 17](https://openbookproject.net/thinkcs/python/english3e/pygame.html) *PyGame* + +[Chapter 18](https://openbookproject.net/thinkcs/python/english3e/recursion.html) *Recursion* + +[Chapter 19](https://openbookproject.net/thinkcs/python/english3e/exceptions.html) *Exceptions* + +[Chapter 20](https://openbookproject.net/thinkcs/python/english3e/dictionaries.html) *Dictionaries* + +[Chapter 21](https://openbookproject.net/thinkcs/python/english3e/even_more_oop.html) *Even more OOP* + +[Chapter 22](https://openbookproject.net/thinkcs/python/english3e/collections.html) *Collections of Objects* + +[Chapter 23](https://openbookproject.net/thinkcs/python/english3e/inheritance.html) *Inheritance* + +[Chapter 24](https://openbookproject.net/thinkcs/python/english3e/linked_lists.html) *Linked Lists* + +[Chapter 25](https://openbookproject.net/thinkcs/python/english3e/stacks.html) *Stacks* + +[Chapter 26](https://openbookproject.net/thinkcs/python/english3e/queues.html) *Queues* + +[Chapter 27](https://openbookproject.net/thinkcs/python/english3e/trees.html) *Trees* + + + +费用:6800 元 + +咨询qq:1465376564 + +试看视频 + +https://www.ixigua.com/6796493204129579533/ + +https://www.ixigua.com/6798762208579813891/ + +https://www.ixigua.com/6804611724319130125/ + +[如何训练自己的编程思路](https://github.com/pythonpeixun/article/blob/master/python/how_to_learn_program2.md) diff --git a/2022/linearalgebra/ch1.md b/2022/linearalgebra/ch1.md new file mode 100644 index 0000000..a5eccda --- /dev/null +++ b/2022/linearalgebra/ch1.md @@ -0,0 +1,2 @@ +# 第1讲 向量 + diff --git "a/42\344\270\207.jpg" "b/42\344\270\207.jpg" new file mode 100644 index 0000000..c60be5b Binary files /dev/null and "b/42\344\270\207.jpg" differ diff --git a/README.md b/README.md new file mode 100644 index 0000000..a5d20a6 --- /dev/null +++ b/README.md @@ -0,0 +1,29 @@ +# 黄哥Python培训 qq:1465376564 + + +## [黄哥Python远程视频培训班](https://github.com/pythonpeixun/article/blob/master/index.md) + +## [如何训练自己的编程思路](https://github.com/pythonpeixun/article/blob/master/python/how_to_learn_program2.md) + +## [部分免费Python免费视频](https://github.com/pythonpeixun/article/blob/master/python_shiping.md) + +## [参加编程培训(Python、Java)面授到底值不值?](https://pythonpeixun.github.io/2017/01/06/%E9%9D%A2%E6%8E%88%E5%88%B0%E5%BA%95%E5%80%BC%E4%B8%8D%E5%80%BC/) + +## [Python类的静态方法和类方法区别](https://github.com/pythonpeixun/article/blob/master/python/python_classmethod_staticmethod.md) + +## [跟黄哥学python序列文章之python方法链(method chaining)](https://github.com/pythonpeixun/article/blob/master/python/pythonmethodchaining.md) +## [黄哥漫谈Python 生成器](https://github.com/pythonpeixun/article/blob/master/python/talk_about_generator.md) +## [黄哥漫谈Python 闭包](https://github.com/pythonpeixun/article/blob/master/python/talk_about_Closure.md) +## [Python 类组合(composition)和聚合(aggregation)](https://github.com/pythonpeixun/article/blob/master/python/class_composition_aggregation.md) +## [216小时学会Python](https://github.com/pythonpeixun/article/blob/master/python/hours_216.md) + +## [跟黄哥学习python第一章](https://github.com/pythonpeixun/article/blob/master/python/learn_python_follow_brother_huang_1.md) + +## [跟黄哥学习python第二章](https://github.com/pythonpeixun/article/blob/master/python/learn_python_follow_brother_huang_2.md) + +## [跟黄哥学习python第三章](https://github.com/pythonpeixun/article/blob/master/python/learn_python_follow_brother_huang_3.md) + + +## [跟黄哥学习python第四章](https://github.com/pythonpeixun/article/blob/master/python/learn_python_follow_brother_huang_4.md) + +## [跟黄哥学习python第五章](https://github.com/pythonpeixun/article/blob/master/python/learn_python_follow_brother_huang_5.md) diff --git a/beijing_weekend.md b/beijing_weekend.md index c0a0168..4f6c908 100644 --- a/beijing_weekend.md +++ b/beijing_weekend.md @@ -1,24 +1,73 @@ -#2016年黄哥python北京周末培训班第四期招生 -##第四期开课时间:2016年6月12起 +# 2019年黄哥python北京周末培训班招生 +## 开课时间:2019年10月8号起 -##第三期开课时间:2016年5月14起 正在上课中 +## 学习周期:连续2个月周末,每周上课1天(每天课时8到10小时)。 -##第二期开课时间:2016年3月27起 正在上课中 +## 报名方式:请将姓名 + 电话 + qq号码 + 所在城市 + 职业(根据自己的情况写,运维、测试、软件开发或学生) 发邮件到:1465376564@qq.com + +## 上课地址:北京石景山 +# 培训内容请看[黄哥python远程视频培训班](https://github.com/pythonpeixun/article/blob/master/index.md) + +## 费用: 8800元 + +# 咨询:qq:1465376564 电话:18610508486 黄老师 + +# [点击黄哥python培训试看视频播放地址](https://github.com/pythonpeixun/article/blob/master/python_shiping.md) + + +# 2017年黄哥python北京周末培训班招生 +## 开课时间:2017年5月20起 + +## 学习周期:连续2个月周末,每周上课1天(每天课时8到10小时)。 + +## 报名方式:请将姓名 + 电话 + qq号码 + 所在城市 + 职业(根据自己的情况写,运维、测试、软件开发或学生) 发邮件到:1465376564@qq.com + +## 上课地址:北京石景山 +# 培训内容请看[黄哥python远程视频培训班](https://github.com/pythonpeixun/article/blob/master/index.md) + +## 费用: + +# 咨询:qq:1465376564 电话:18610508486 黄老师 + +# [点击黄哥python培训试看视频播放地址](https://github.com/pythonpeixun/article/blob/master/python_shiping.md) + + + +# 2017年黄哥python深圳周末培训班第一期招生 + +# 面授时间: 有10人报名即可开课 面授2个月,每周六或日上课,其它时间自己写作业和答疑 +# 价格: +# 地点:深圳 +## 报名方式:请将姓名 + 电话 + qq号码 + 所在城市 + 职业(根据自己的情况写,运维、测试、软件开发或学生) 发邮件到:1465376564@qq.com + +# 培训内容请看[黄哥python远程视频培训班](https://github.com/pythonpeixun/article/blob/master/index.md) + + +# 咨询:qq:1465376564 电话:18610508486 黄老师 + + + +# 2016年黄哥python北京周末培训班第四期招生 +## 第四期开课时间:2016年6月12起 已经完美完成! + +## 第三期开课时间:2016年5月14起 已经完美完成! + +## 第二期开课时间:2016年3月27起 已经完美完成! ![](second.JPG) ##第一期开课时间:2016年2月27起 已经完美完成! ![](pythonpeixun.JPG) -##学习周期:连续2个月周末,每周上课1天(每天课时8到10小时)。 +## 学习周期:连续2个月周末,每周上课1天(每天课时8到10小时)。 -##报名方式:请将姓名 + 电话 + qq号码 + 所在城市 + 职业(根据自己的情况写,运维、测试、软件开发或学生) 发邮件到:1465376564@qq.com +## 报名方式:请将姓名 + 电话 + qq号码 + 所在城市 + 职业(根据自己的情况写,运维、测试、软件开发或学生) 发邮件到:1465376564@qq.com ## 上课地址:北京石景山 -#培训内容请看[黄哥python远程视频培训班](https://github.com/pythonpeixun/article/blob/master/index.md) +# 培训内容请看[黄哥python远程视频培训班](https://github.com/pythonpeixun/article/blob/master/index.md) -#费用: 面授6800 元 +# 费用: -#咨询:qq:1465376564 电话:18610508486 黄老师 +# 咨询:qq:1465376564 电话:18610508486 黄老师 -#[点击黄哥python培训试看视频播放地址](https://github.com/pythonpeixun/article/blob/master/python_shiping.md) +# [点击黄哥python培训试看视频播放地址](https://github.com/pythonpeixun/article/blob/master/python_shiping.md) diff --git "a/books/How to Think Like a Computer Scientist- Learning with Python 3 \351\273\204\345\223\245Python\345\237\271\350\256\255\346\216\250\350\215\220\346\235\220pdf.pdf" "b/books/How to Think Like a Computer Scientist- Learning with Python 3 \351\273\204\345\223\245Python\345\237\271\350\256\255\346\216\250\350\215\220\346\235\220pdf.pdf" new file mode 100644 index 0000000..c1e952e Binary files /dev/null and "b/books/How to Think Like a Computer Scientist- Learning with Python 3 \351\273\204\345\223\245Python\345\237\271\350\256\255\346\216\250\350\215\220\346\235\220pdf.pdf" differ diff --git "a/books/Problem Solving with Algorithms and Data Structures \351\273\204\345\223\245Python\345\237\271\350\256\255\346\216\250\350\215\220\346\235\220.pdf" "b/books/Problem Solving with Algorithms and Data Structures \351\273\204\345\223\245Python\345\237\271\350\256\255\346\216\250\350\215\220\346\235\220.pdf" new file mode 100644 index 0000000..1194562 Binary files /dev/null and "b/books/Problem Solving with Algorithms and Data Structures \351\273\204\345\223\245Python\345\237\271\350\256\255\346\216\250\350\215\220\346\235\220.pdf" differ diff --git a/brother_huang.md b/brother_huang.md index 21209ba..2c0edac 100644 --- a/brother_huang.md +++ b/brother_huang.md @@ -1,14 +1,90 @@ -#简历 -#姓名:黄家政 -#学历:本科 毕业于北方交通大学 -#开发经验:有10多年开发经验。 -#精通用:delphi、python,golang,php,熟练用c语言。有web.py、tornado、django后台开发经验。 -#黄老师从一个土木工程师转行到计算机科学专业,知道初学者的痛点。 -#黄老师讲课特色:既讲语法,又重点讲编程思路。 -#电话:18610508486 -#上面都不是最重要的,可以看黄老师写的文章和试看视频 - -请看黄老师本人写的文章 +# 2017 年即将过去,黄哥对自己做一个全面的介绍 + +黄哥,这个名字是怎么来的,因为黄哥姓黄,在北京生活,北方习惯叫哥和姐的,所以也很 + +世俗的自称哥。 + +## 1、黄哥毕业于北交大,生活在北京,有破房一套,破车一辆,但有一颗上进的心。 + + 黄哥的价值观,帮助他人,也是帮助自己。 + + 对待学习编程的态度,是能自学,就自学,自学搞不定的,欢迎联系黄哥。 + + 初中学历,高中学历并且年龄32岁以上的朋友,转程序员要慎重! + + 黄哥新录制的视频:谈转行当程序员的事 + + 黄哥培训的目标,培养学员养成独立思考,独立解决问题的能力,帮你完成从0到1的转换。 + + + +## 2、黄哥能力问题 + + 黄哥不吹牛,也不是特牛逼的程序员(不然也在bta拿年薪百万,人贵有自知之明,黄哥也在不断学习中。) + 但黄哥能帮助学员快速的完成0到1(从零基础到自己会写代码解决问题。)的这个过程。黄哥如果没有一定的水平,企业不可能请我去讲课, + 黄哥教会完全小白通过学习Python学会编程一点问题没有。 + 特别提示:外出讲课不是那么好讲的,有的企业听课者达上百人,各种技术背景的都有,讲不好课,会被轰下台。 + 每次讲完课,有一个调查表,要填写满意度,如果低于一个约定的满意度,是拿不到讲课费的。 + 黄哥每次顺利拿到讲课费。欢迎提供内训的公司,邀请黄哥去为你的客户服务。 + + +![](武汉学员.jpg) + +![](上夜班学员.jpg) + + + +2013年北京外资企业请我讲课的情况 + +![](外资讲课.jpg) + + + + 照片为黄哥本人,为四川知名企业提供内训,摄于2016年9月,成都天府四街。 + + +![](黄哥近照.jpg) + + +## 3、很多学员在黄哥的训练下顺利学会编程,下面是一些学员对黄哥的真实评价。 + +下面的图片,黄哥对天发誓,如有造假,必遭天谴! + +年薪42万的运维学员。 + +![](42万.jpg) + +东北学员评价 + + +![](东北学员.jpg) + + +深圳测试女测试学员的评价 + + +![](测试学员.jpg) + +运维学员的评价 + + +![](运维学员.jpg) + + +![](转行学员.jpg) + + +## 4、网上有那么几个小人,对他们的言语,本人表示不接收,做人不要太嚣张,总有你哭的那么一天。 + + + +## 5、黄哥本人每天花大量时间为网友免费答疑,是有证据可查的。 + +[黄哥知乎答疑集](https://www.zhihu.com/people/pythonpeixun/answers) + + +## 请看黄老师本人写的文章 + [如何捅破python编程的那层纸] (https://github.com/pythonpeixun/article/blob/master/pythonstudy.md) diff --git a/corepython2ndsourcecode/.DS_Store b/corepython2ndsourcecode/.DS_Store new file mode 100644 index 0000000..dd819ca Binary files /dev/null and b/corepython2ndsourcecode/.DS_Store differ diff --git a/corepython2ndsourcecode/ch03/makeTextFile.py b/corepython2ndsourcecode/ch03/makeTextFile.py new file mode 100644 index 0000000..c411764 --- /dev/null +++ b/corepython2ndsourcecode/ch03/makeTextFile.py @@ -0,0 +1,44 @@ +#!/usr/bin/env python +# coding:utf-8 +''' +欢迎参加黄哥python远程视频培训, +帮你完成从不会写代码到会写代码解决问题的过渡。 +https://github.com/pythonpeixun/article/blob/master/index.md +咨询qq:1465376564 +黄哥Python培训 黄哥改写 +Python 3 +'makeTextFile.py -- create text file' +P52页 中文版书上错误点 +1、少一个变量fname = input('Enter file name: ') +2、书上11-14行(下面的代码22-26) 行代码没有缩进 +''' + + +import os +ls = os.linesep + +# get filename +while True: + fname = input('Enter file name: ') + if os.path.exists(fname): + print("ERROR: '%s' already exists" % fname) + else: + break + +# get file content (text) lines +all = [] +print("\nEnter lines ('.' by itself to quit).\n") + +# loop until user terminates input +while True: + entry = input('> ') + if entry == '.': + break + else: + all.append(entry) + +# write lines to file with proper line-ending +fobj = open(fname, 'w') +fobj.writelines(['%s%s' % (x, ls) for x in all]) +fobj.close() +print('DONE!') diff --git a/corepython2ndsourcecode/ch03/readTextFile.py b/corepython2ndsourcecode/ch03/readTextFile.py new file mode 100644 index 0000000..1228bf0 --- /dev/null +++ b/corepython2ndsourcecode/ch03/readTextFile.py @@ -0,0 +1,27 @@ +#!/usr/bin/env python +# coding:utf-8 +''' +欢迎参加黄哥python远程视频培训, +帮你完成从不会写代码到会写代码解决问题的过渡。 +https://github.com/pythonpeixun/article/blob/master/index.md +咨询qq:1465376564 +黄哥Python培训 黄哥改写 +Python 3 +'readTextFile.py -- read and display text file' +''' + + +# get filename +fname = input('Enter file name: ') +print() + +# attempt to open file for reading +try: + fobj = open(fname, 'r') +except IOError as e: + print("*** file open error:", e) +else: + # display contents to the screen + for eachLine in fobj: + print(eachLine, end=",") + fobj.close() diff --git a/corepython2ndsourcecode/ch04/typechk.py b/corepython2ndsourcecode/ch04/typechk.py new file mode 100644 index 0000000..2e4f3bb --- /dev/null +++ b/corepython2ndsourcecode/ch04/typechk.py @@ -0,0 +1,29 @@ +#!/usr/bin/env python +# coding:utf-8 +''' +欢迎参加黄哥python远程视频培训, +帮你完成从不会写代码到会写代码解决问题的过渡。 +https://github.com/pythonpeixun/article/blob/master/index.md +咨询qq:1465376564 +黄哥Python培训 黄哥改写 +Python 3 +PEP 0237: Essentially, long renamed to int. That is, +there is only one built-in integral type, named int; +but it behaves mostly like the old long type. +Python3 long这个数据类型取消了 +''' + + +def displayNumType(num): + print(num, 'is', end=",") + if isinstance(num, (int, float, complex)): + print('a number of type:', type(num).__name__) + else: + print('not a number at all!!') + + +displayNumType(-69) +displayNumType(9999999999999999999999) +displayNumType(98.6) +displayNumType(-5.2 + 1.9j) +displayNumType('xxx') diff --git a/corepython2ndsourcecode/ch06/idcheck.py b/corepython2ndsourcecode/ch06/idcheck.py new file mode 100644 index 0000000..46240dc --- /dev/null +++ b/corepython2ndsourcecode/ch06/idcheck.py @@ -0,0 +1,33 @@ +#!/usr/bin/env python +# coding:utf-8 +''' +欢迎参加黄哥python远程视频培训, +帮你完成从不会写代码到会写代码解决问题的过渡。 +https://github.com/pythonpeixun/article/blob/master/index.md +咨询qq:1465376564 +黄哥Python培训 黄哥改写 +Python 3 +P111 页 +string.letters 修改为 string.ascii_letters +''' + +import string + +alphas = string.ascii_letters + '_' +nums = string.digits + +print('Welcome to the Identifier Checker v1.0') +print('Testees must be at least 2 chars long.') +myInput = input('Identifier to test? ') + +if len(myInput) > 1: + + if myInput[0] not in alphas: + print('''invalid: first symbol must be alphabetic''') + else: + for otherChar in myInput[1:]: + if otherChar not in alphas + nums: + print('''invalid: remaining symbols must be alphanumeric''') + break + else: + print("okay as an identifier") diff --git a/corepython2ndsourcecode/ch06/queue.py b/corepython2ndsourcecode/ch06/queue.py new file mode 100644 index 0000000..3dc4828 --- /dev/null +++ b/corepython2ndsourcecode/ch06/queue.py @@ -0,0 +1,66 @@ +#!/usr/bin/env python +# coding:utf-8 +''' +欢迎参加黄哥python远程视频培训, +帮你完成从不会写代码到会写代码解决问题的过渡。 +https://github.com/pythonpeixun/article/blob/master/index.md +咨询qq:1465376564 +黄哥Python培训 黄哥改写 +Python 3 +P148页代码 +''' + +queue = [] + + +def enQ(): + queue.append(input('Enter new queue element: ')) + + +def deQ(): + if len(queue) == 0: + print('Cannot dequeue from empty queue!') + else: + print('Removed [', queue.pop(0), ']') + + +def viewQ(): + print(str(queue)) + + +def showmenu(): + prompt = """ +(E)nqueue +(D)equeue +(V)iew +(Q)uit + +Enter choice: """ + + done = 0 + while not done: + + chosen = 0 + while not chosen: + try: + choice = input(prompt)[0] + except (IndexError, EOFError, KeyboardInterrupt): + choice = 'q' + print('\nYou picked: [%s]' % choice) + if choice not in 'devq': + print('invalid option, try again') + else: + chosen = 1 + + if choice == 'q': + done = 1 + if choice == 'e': + enQ() + if choice == 'd': + deQ() + if choice == 'v': + viewQ() + + +if __name__ == '__main__': + showmenu() diff --git a/corepython2ndsourcecode/ch06/stack.py b/corepython2ndsourcecode/ch06/stack.py new file mode 100644 index 0000000..fa00c8b --- /dev/null +++ b/corepython2ndsourcecode/ch06/stack.py @@ -0,0 +1,66 @@ +#!/usr/bin/env python +# coding:utf-8 +''' +欢迎参加黄哥python远程视频培训, +帮你完成从不会写代码到会写代码解决问题的过渡。 +https://github.com/pythonpeixun/article/blob/master/index.md +咨询qq:1465376564 +黄哥Python培训 黄哥改写 +Python 3 +P145页代码 +''' + +stack = [] + + +def pushit(): + stack.append(input('Enter new string: ')) + + +def popit(): + if len(stack) == 0: + print('Cannot pop from an empty stack!') + else: + print('Removed [', stack.pop(), ']') + + +def viewstack(): + print(str(stack)) + + +def showmenu(): + prompt = """ +p(U)sh +p(O)p +(V)iew +(Q)uit + +Enter choice: """ + + done = 0 + while not done: + + chosen = 0 + while not chosen: + try: + choice = input(prompt)[0] + except (IndexError, EOFError, KeyboardInterrupt): + choice = 'q' + print('\nYou picked: [%s]' % choice) + if choice not in 'uovq': + print('invalid option, try again') + else: + chosen = 1 + + if choice == 'q': + done = 1 + if choice == 'u': + pushit() + if choice == 'o': + popit() + if choice == 'v': + viewstack() + + +if __name__ == '__main__': + showmenu() diff --git a/corepython2ndsourcecode/ch07/userpw.py b/corepython2ndsourcecode/ch07/userpw.py new file mode 100644 index 0000000..3ffec2d --- /dev/null +++ b/corepython2ndsourcecode/ch07/userpw.py @@ -0,0 +1,75 @@ +#!/usr/bin/env python +# coding:utf-8 +''' +欢迎参加黄哥python远程视频培训, +帮你完成从不会写代码到会写代码解决问题的过渡。 +https://github.com/pythonpeixun/article/blob/master/index.md +咨询qq:1465376564 +黄哥Python培训 黄哥改写 +Python 3 +P175页代码 +Python3 Removed dict.has_key() – use the in operator instead. +''' + +db = {} + + +def newuser(): + prompt = 'login desired: ' + while True: + name = input(prompt) + if name in db: + prompt = 'name taken, try another: ' + continue + else: + break + pwd = input('passwd: ') + db[name] = pwd + + +def olduser(): + name = input('login: ') + pwd = input('passwd: ') + passwd = db.get(name) + if passwd == pwd: + pass + else: + print('login incorrect') + return + + print('welcome back', name) + + +def showmenu(): + prompt = """ +(N)ew User Login +(E)xisting User Login +(Q)uit + +Enter choice: """ + + done = False + while not done: + chosen = False + while not chosen: + try: + choice = input(prompt).strip()[0].lower() + except (EOFError, KeyboardInterrupt): + choice = 'q' + print('\nYou picked: [%s]' % choice) + + if choice not in 'neq': + print('invalid menu option, try again') + else: + chosen = True + + if choice == 'q': + done = True + if choice == 'n': + newuser() + if choice == 'e': + olduser() + + +if __name__ == '__main__': + showmenu() diff --git a/corepython2ndsourcecode/ch08/maxFact.py b/corepython2ndsourcecode/ch08/maxFact.py new file mode 100644 index 0000000..b3f2e0c --- /dev/null +++ b/corepython2ndsourcecode/ch08/maxFact.py @@ -0,0 +1,26 @@ +#!/usr/bin/env python +# coding:utf-8 +''' +欢迎参加黄哥python远程视频培训, +帮你完成从不会写代码到会写代码解决问题的过渡。 +https://github.com/pythonpeixun/article/blob/master/index.md +咨询qq:1465376564 +黄哥Python培训 黄哥改写 +Python 3 +P201页代码 +''' + + +def showMaxFactor(num): + count = num // 2 + while count > 1: + if num % count == 0: + print('largest factor of %d is %d' % (num, count)) + break + count -= 1 + else: + print(eachNum, 'is prime') + + +for eachNum in range(10, 21): + showMaxFactor(eachNum) diff --git a/corepython2ndsourcecode/ch09/ospathex.py b/corepython2ndsourcecode/ch09/ospathex.py new file mode 100644 index 0000000..7f86d5d --- /dev/null +++ b/corepython2ndsourcecode/ch09/ospathex.py @@ -0,0 +1,72 @@ +#!/usr/bin/env python +# coding:utf-8 +''' +欢迎参加黄哥python远程视频培训, +帮你完成从不会写代码到会写代码解决问题的过渡。 +https://github.com/pythonpeixun/article/blob/master/index.md +咨询qq:1465376564 +黄哥Python培训 黄哥改写 +Python 3 +P201页代码 +''' + +import os + +for tmpdir in ('/tmp', 'c:/windows/temp'): + if os.path.isdir(tmpdir): + break +else: + print('no temp directory available') + tmpdir = '' + +if tmpdir: + os.chdir(tmpdir) + cwd = os.getcwd() + print('*** current temporary directory') + print(cwd) + + print('*** creating example directory...') + os.mkdir('example') + os.chdir('example') + cwd = os.getcwd() + print('*** new working directory:') + print(cwd) + print('*** original directory listing:') + print(os.listdir(cwd)) + + print('*** creating test file...') + file = open('test', 'w') + file.write('foo\n') + file.write('bar\n') + file.close() + print('*** updated directory listing:') + print(os.listdir(cwd)) + + print("*** renaming 'test' to 'filetest.txt'") + os.rename('test', 'filetest.txt') + print('*** updated directory listing:') + print(os.listdir(cwd)) + + path = os.path.join(cwd, os.listdir(cwd)[0]) + print('*** full file pathname:') + print(path) + print('*** (pathname, basename) == ') + print(os.path.split(path)) + print('*** (filename, extension) == ') + print(os.path.splitext(os.path.basename(path))) + + print('*** displaying file contents:') + file = open(path) + allLines = file.readlines() + file.close() + for eachLine in allLines: + print(eachLine, end=",") + + print('*** deleting test file') + os.remove(path) + print('*** updated directory listing:') + print(os.listdir(cwd)) + os.chdir(os.pardir) + print('*** deleting test directory') + os.rmdir('example') + print('*** DONE') diff --git a/corepython2ndsourcecode/ch10/carddata.txt b/corepython2ndsourcecode/ch10/carddata.txt new file mode 100644 index 0000000..4dd061b --- /dev/null +++ b/corepython2ndsourcecode/ch10/carddata.txt @@ -0,0 +1,13 @@ +# carddata.txt +previous balance +25 +debits +21.64 +541.24 +25 +credits +-25 +-541.24 +finance charge/late fees +7.30 +5 diff --git a/corepython2ndsourcecode/ch10/cardlog.txt b/corepython2ndsourcecode/ch10/cardlog.txt new file mode 100644 index 0000000..3ded32b --- /dev/null +++ b/corepython2ndsourcecode/ch10/cardlog.txt @@ -0,0 +1,9 @@ +account log: +ignored: could not convert string to float: '# carddata.txt\n'ignored: could not convert string to float: 'previous balance\n'data... processed +ignored: could not convert string to float: 'debits\n'data... processed +data... processed +data... processed +ignored: could not convert string to float: 'credits\n'data... processed +data... processed +ignored: could not convert string to float: 'finance charge/late fees\n'data... processed +data... processed diff --git a/corepython2ndsourcecode/ch10/cardrun.py b/corepython2ndsourcecode/ch10/cardrun.py new file mode 100644 index 0000000..43697bc --- /dev/null +++ b/corepython2ndsourcecode/ch10/cardrun.py @@ -0,0 +1,50 @@ +#!/usr/bin/env python +# coding:utf-8 +''' +欢迎参加黄哥python远程视频培训, +帮你完成从不会写代码到会写代码解决问题的过渡。 +https://github.com/pythonpeixun/article/blob/master/index.md +咨询qq:1465376564 +黄哥Python培训 黄哥改写 +Python 3 +P246页代码 +''' + + +def safe_float(object): + 'safe version of float()' + try: + retval = float(object) + except (TypeError, ValueError) as diag: + retval = str(diag) + return retval + + +def main(): + 'handles all the data processing' + log = open('cardlog.txt', 'w') + try: + ccfile = open('carddata.txt', 'r') + except IOError as e: + log.write('no txns this month\n') + log.close() + return + + txns = ccfile.readlines() + ccfile.close() + total = 0.00 + log.write('account log:\n') + + for eachTxn in txns: + result = safe_float(eachTxn) + if isinstance(result, float): + total += result + log.write('data... processed\n') + else: + log.write('ignored: %s' % result) + print('$%.2f (new balance)' % (total)) + log.close() + + +if __name__ == '__main__': + main() diff --git a/corepython2ndsourcecode/ch10/myexc.py b/corepython2ndsourcecode/ch10/myexc.py new file mode 100644 index 0000000..2088939 --- /dev/null +++ b/corepython2ndsourcecode/ch10/myexc.py @@ -0,0 +1,129 @@ +#!/usr/bin/env python +# coding:utf-8 +''' +欢迎参加黄哥python远程视频培训, +帮你完成从不会写代码到会写代码解决问题的过渡。 +https://github.com/pythonpeixun/article/blob/master/index.md +咨询qq:1465376564 +黄哥Python培训 黄哥改写 +Python 3 +P258页代码 +八进制0 改为0o +''' + +import os +import socket +import errno +import tempfile + + +class NetworkError(IOError): + pass + + +class FileError(IOError): + pass + + +def updArgs(args, newarg=None): + if isinstance(args, IOError): + myargs = [] + myargs.extend([arg for arg in args]) + else: + myargs = list(args) + + if newarg: + myargs.append(newarg) + + return tuple(myargs) + + +def fileArgs(fn, mode, args): + if args[0] == errno.EACCES and \ + 'access' in dir(os): + perms = '' + permd = {'r': os.R_OK, 'w': os.W_OK, + 'x': os.X_OK} + pkeys = permd.keys() + pkeys.sort() + pkeys.reverse() + + for eachPerm in 'rwx': + if os.access(fn, permd[eachPerm]): + perms = perms + eachPerm + else: + perms = perms + '-' + + if isinstance(args, IOError): + myargs = [] + myargs.extend([arg for arg in args]) + else: + myargs = list(args) + + myargs[1] = "'%s' %s (perms: '%s')" % \ + (mode, myargs[1], perms) + + myargs.append(args.filename) + + else: + myargs = args + + return tuple(myargs) + + +def myconnect(sock, host, port): + try: + sock.connect((host, port)) + + except socket.error as inst: + myargs = updArgs(inst.args) # convert inst to tuple + if len(myargs) == 1: # no #s on some errors + myargs = (errno.ENXIO, myargs[0]) + + raise Exception(NetworkError, updArgs(myargs, host + ':' + str(port))) + + +def myopen(fn, mode='r'): + try: + fo = open(fn, mode) + except IOError as args: + raise Exception(FileError, fileArgs(fn, mode, args)) + + return fo + + +def testfile(): + + fn = tempfile.mktemp() + f = open(fn, 'w') + f.close() + + for eachTest in ((0o0, 'r'), (0o100, 'r'), (0o400, 'w'), (0o500, 'w')): + try: + os.chmod(fn, eachTest[0]) + f = myopen(fn, eachTest[1]) + + except FileError as args: + print("%s: %s" % (args.__class__.__name__, args)) + else: + print(fn, "opened ok... perms ignored") + f.close() + + os.chmod(fn, 0o777) # enable all perms + os.unlink(fn) + + +def testnet(): + s = socket.socket(socket.AF_INET, + socket.SOCK_STREAM) + + for eachHost in ('deli', 'www'): + try: + myconnect(s, eachHost, 80) + except Exception as args: + print("%s: %s" % (args.__class__.__name__, args)) + + +if __name__ == '__main__': + testfile() + testnet() diff --git a/corepython2ndsourcecode/ch10/myexc2.py b/corepython2ndsourcecode/ch10/myexc2.py new file mode 100644 index 0000000..392b4b6 --- /dev/null +++ b/corepython2ndsourcecode/ch10/myexc2.py @@ -0,0 +1,112 @@ +#!/usr/bin/env python + +import os, socket, errno, types, tempfile + +class NetworkError(IOError): + pass + +class FileError(IOError): + pass + +def updArgs(args, newarg=None): + if isinstance(args, IOError): + myargs = [] + myargs.extend([arg for arg in args]) + else: + myargs = list(args) + + if newarg: + myargs.append(newarg) + + return tuple(myargs) + +def fileArgs(fn, mode, args): + if args[0] == errno.EACCES and \ + 'access' in dir(os): + perms = '' + permd = {'r': os.R_OK, 'w': os.W_OK, + 'x': os.X_OK} + pkeys = permd.keys() + pkeys.sort() + pkeys.reverse() + + for eachPerm in 'rwx': + if os.access(fn, permd[eachPerm]): + perms = perms + eachPerm + else: + perms = perms + '-' + + if isinstance(args, IOError): + myargs = [] + myargs.extend([arg for arg in args]) + else: + myargs = list(args) + + myargs[1] = "'%s' %s (perms: '%s')" % \ + (mode, myargs[1], perms) + + myargs.append(args.filename) + + else: + myargs = args + + return tuple(myargs) + +def myconnect(sock, host, port): + try: + sock.connect((host, port)) + + except socket.error, args: + print "****************", args, "**********\n" + print type(args) + myargs = updArgs(args) # convert inst to tuple + if len(myargs) == 1: # no #s on some errors + myargs = (errno.ENXIO, myargs[0]) + + raise NetworkError, \ + updArgs(myargs, host + ':' + str(port)) + +def myopen(fn, mode='r'): + try: + fo = open(fn, mode) + except IOError, args: + raise FileError, fileArgs(fn, mode, args) + + return fo + +def testfile(): + + fn = tempfile.mktemp() + f = open(fn, 'w') + f.close() + + for eachTest in ((0, 'r'), (0100, 'r'), \ + (0400, 'w'), (0500, 'w')): + try: + os.chmod(fn, eachTest[0]) + f = myopen(fn, eachTest[1]) + + except FileError, args: + print "%s: %s" % \ + (args.__class__.__name__, args) + else: + print fn, "opened ok... perms ignored" + f.close() + + os.chmod(fn, 0777) # enable all perms + os.unlink(fn) + +def testnet(): + s = socket.socket(socket.AF_INET, + socket.SOCK_STREAM) + + for eachHost in ('deli', 'www'): + try: + myconnect(s, eachHost, 80) + except NetworkError, args: + print "%s: %s" % \ + (args.__class__.__name__, args) + +if __name__ == '__main__': + testfile() + testnet() diff --git a/datastructures/datastructuresandalgorithms/go.mod b/datastructures/datastructuresandalgorithms/go.mod new file mode 100644 index 0000000..7766f51 --- /dev/null +++ b/datastructures/datastructuresandalgorithms/go.mod @@ -0,0 +1,3 @@ +module datastructuresandalgorithms + +go 1.17 diff --git a/datastructures/datastructuresandalgorithms/linkedlist/Singlylinkedlist/Singlylinkedlist.go b/datastructures/datastructuresandalgorithms/linkedlist/Singlylinkedlist/Singlylinkedlist.go new file mode 100644 index 0000000..351e2d4 --- /dev/null +++ b/datastructures/datastructuresandalgorithms/linkedlist/Singlylinkedlist/Singlylinkedlist.go @@ -0,0 +1,75 @@ +package Singlylinkedlist + +import "fmt" + +type Node struct { + data int + next *Node +} + +type SLinkedList struct { + head *Node + length int +} + +func (l *SLinkedList) IsEmpty() bool { + return l.length == 0 +} + +// 新创建单链表 增删改查 + +func (l *SLinkedList) AddHead(value int) { + l.head = &Node{data: value, next: l.head} + l.length++ +} + +func (l *SLinkedList) AddTail(value int) { + newNode := &Node{value, nil} + if l.head == nil { + l.head = newNode + return + } + currNode := l.head + + for currNode.next != nil { + currNode = currNode.next + } + currNode.next = newNode +} + +// 删除第一次出现该值的Node +func (l *SLinkedList) DeleteNode(value int) bool { + currNode := l.head + if l.IsEmpty() { + fmt.Println("EmptyListError") + return false + } + if value == l.head.data { + l.head = l.head.next + l.length-- + } + for currNode.next != nil { + if currNode.next.data == value { + currNode.next = currNode.next.next + l.length-- + return true + } + currNode = currNode.next + } + return false +} + +func (l *SLinkedList) Traverse() { + currNode := l.head + if currNode == nil { + return + } + for currNode.next != nil { + fmt.Println(currNode.data) + currNode = currNode.next + } +} + +func New() *SLinkedList { + return &SLinkedList{} +} diff --git a/datastructures/datastructuresandalgorithms/linkedlist/Singlylinkedlist/Singlylinkedlist_test.go b/datastructures/datastructuresandalgorithms/linkedlist/Singlylinkedlist/Singlylinkedlist_test.go new file mode 100644 index 0000000..ecf05b1 --- /dev/null +++ b/datastructures/datastructuresandalgorithms/linkedlist/Singlylinkedlist/Singlylinkedlist_test.go @@ -0,0 +1,59 @@ +package Singlylinkedlist + +import ( + "testing" +) + +func TestSLinkedList_IsEmpty(t *testing.T) { + type fields struct { + head *Node + length int + } + tests := []struct { + name string + fields fields + want bool + }{ + // TODO: Add test cases. + {"TestCase1", fields{nil, 0}, true}, + {"TestCase2", fields{&Node{data: 2, next: &Node{3, nil}}, 2}, false}, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + l := &SLinkedList{ + head: tt.fields.head, + length: tt.fields.length, + } + if got := l.IsEmpty(); got != tt.want { + t.Errorf("SLinkedList.IsEmpty() = %v, want %v", got, tt.want) + } + }) + } +} + +func TestSLinkedList_AddHead(t *testing.T) { + type fields struct { + head *Node + length int + } + type args struct { + value int + } + tests := []struct { + name string + fields fields + args args + }{ + // TODO: Add test cases. + {"TestCase1", fields{&Node{data: 1, next: &Node{data: 2, next: nil}}, 2}, args{3}}, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + l := &SLinkedList{ + head: tt.fields.head, + length: tt.fields.length, + } + l.AddHead(tt.args.value) + }) + } +} diff --git a/datastructures/image-20210218205147393.png b/datastructures/image-20210218205147393.png new file mode 100644 index 0000000..382f578 Binary files /dev/null and b/datastructures/image-20210218205147393.png differ diff --git "a/datastructures/\351\273\204\345\223\245\346\225\260\346\215\256\347\273\223\346\236\204\345\222\214\347\256\227\346\263\225(Python\346\217\217\350\277\260)\345\237\271\350\256\255\345\244\247\347\272\262.md" "b/datastructures/\351\273\204\345\223\245\346\225\260\346\215\256\347\273\223\346\236\204\345\222\214\347\256\227\346\263\225(Python\346\217\217\350\277\260)\345\237\271\350\256\255\345\244\247\347\272\262.md" new file mode 100644 index 0000000..630399e --- /dev/null +++ "b/datastructures/\351\273\204\345\223\245\346\225\260\346\215\256\347\273\223\346\236\204\345\222\214\347\256\227\346\263\225(Python\346\217\217\350\277\260)\345\237\271\350\256\255\345\244\247\347\272\262.md" @@ -0,0 +1,154 @@ +# 数据结构与算法及LeetCode刷题班(第一期) + +小班上课,有10人报名,就开始上课 + + + +# 参加培训要求 +1、已经会写代码解决一般问题。 +2、英语四级以上或者原因查字典学习英语的朋友。 +3、非叶公好龙,肯下功夫者。 +报名前测验:先完成下面几道题,将代码发到1465376564@qq.com邮箱。 + + 1、给出任何整数,用函数写出个位,十位,百位,千位... 之和 + 例子:7896 6 + 9 + 8 + 7 = 30 + 2、自己写代码求一个列表的最大值,不能用max. + 3、用代码实现冒泡排序、插入排序。 + 4、递归习题, 元素乘一个数并数组反转 + 请用 Python 代码实现(要求用递归) + 测试用例: + 数组[1, 2, 3] ,数字3 输出数组[9, 6, 3] + 5、顺时针螺旋输出二维数组的元素 + +![顺时针螺旋输出二维数组的元素](https://github.com/pythonpeixun/article/blob/master/datastructures/image-20210218205147393.png) + +# 训练目标 + +在计算机科学中,数据结构是在计算机中存储和组织数据的特定方式,以便可以有效地使用它。 +不同类型的数据结构适用于不同类型的应用程序,有些数据结构高度专用于特定任务。 +例如,B树特别适合实现数据库,而编译器实现通常使用哈希表来查找标识符。几乎每个程序或软件系统都使用数据结构。 +特定的数据结构是许多高效算法的基本要素,可以管理大量数据,例如大型数据库的集成集合。 +数据结构很重要,因为它们提供了定义我们可以对数据做什么的机制。 + +1、熟悉数据和信息。 +2、各种数据结构的实时应用。 +3、基本操作插入,删除,搜索,遍历,排序,计数,反转等。 +4、如何选择最佳解决方案。 +5、学习如何编写算法来解决最常见的问题。 +6、为求职准备必要的数据结构和算法训练。 + + +## Python 编程基础 +1、抽象和分析。 +2、函数抽象。 +3、数据抽象。 +4、面向对象编程。 +5、数学知识。 +6、算法分析。 + +## 递归算法 +很多人递归算法不过关,我准备录制数据结构和算法的视频,花6到8小时来训练递归基础薄弱的学员。 +网上很多饱汉(会编程的)讲的几分钟一段视频,另一个饱汉看到,会心一笑,原来可以这样做。 +网上这样的视频大把,对初学者来说,基本没有用。 +所谓的饱汉不知饿汉饥,会编程的不清楚初学者的苦。 + +## 数据结构课程 + +### 数据结构简介 + +1、什么是数据结构。 +2、抽象数据类型。 +3、数据结构的分类。 +4、数据结构的操作。 + +### 搜索和排序搜索 +1、线性搜索和二分搜索。 +2、冒泡排序。 +3、选择排序。 +4、插入排序。 +5、快速排序。 +6、归并排序。 + +### 链表 +1、什么是链表。 +2、为什么我们需要链表。 +3、数组中的问题。 +4、链表的优缺点。 +5、创建链表。 +6、链表中的插入,删除,搜索,反向,排序和遍历。 +7、链表上的其他操作。 +8、在链表上使用递归的操作。 +9、双向链表。 +10、双向链表上的操作。 +11、循环链表。 + +### 栈(stack) +1、什么是栈? +2、堆栈的数组表示。 +3、使用链表的堆栈。 +4、栈的应用。 +5、反转数据。 +6、使用堆栈的十进制到二进制转换。 +7、中缀、前缀和后缀符号转换。 +8、解析。 +9、堆栈的其他应用。 + +### 队列 +1、什么是队列。 +2、队列的数组表示。 +3、使用链表的队列。 +4、队列类型。 +5、队列的应用。 + +### 树 +1、树的基本概念。 +2、树的用途。 +3、不同类型的树。 +4、二叉树。 +5、二叉树遍历(有序、前序和后序)。 +6、对树的不同操作(插入、删除、搜索、计数)。 + +### 搜索树 +1、二叉搜索树(Binary Search Trees)。 +2、二叉搜索树的操作。 +3、AVL Trees。 +4、平衡因子(Balancing Factor)。 +5、AVL Tree Operations。 +6、红黑树。 +7、B树。 + +### 堆 +1、堆的基础。 +2、ReheapUp。 +3、ReheapDown。 +4、构建、插入和删除堆。 +5、堆的应用。 + +### 图(Graphs) +1、词汇和定义。 +2、图抽象数据类型。 +3、图存储结构(邻接矩阵、邻接表)。 +4、深度优先遍历(Depth-First Traversal)。 +5、广度优先遍历(Breadth-First Traversal)。 +6、骑士之旅问题。 +7、拓扑排序。 +8、强连通分量。 +9、最短路径问题。 +10、dijkstra 算法。 +11、最小生成树Prim算法。 + +## 算法 +1、回溯算法。 +2、暴力算法(Brute Force)。 +3、减治法。 +4、分治算法。 +5、贪心算法。 +6、动态规划。 + +# 培训方式: +1、每周一、五 晚上腾讯会议共享屏幕上课2小时( 晚8:00到10点),时间二个月 + +2、要积极完成作业。 +3、费用:6800元。 +4、TextBook: 《Problem Solving with Algorithms and Data Structures》。 +4、联系方式:qq:1465376564 手机:18610508486。 \ No newline at end of file diff --git a/golang/.DS_Store b/golang/.DS_Store new file mode 100644 index 0000000..058ce68 Binary files /dev/null and b/golang/.DS_Store differ diff --git a/golang/book/chapter4.md b/golang/book/chapter4.md new file mode 100644 index 0000000..714d872 --- /dev/null +++ b/golang/book/chapter4.md @@ -0,0 +1,55 @@ +# 第四章 函数 + +## 函数的概念引入 + +假设要设计一段代码,分别对1 到100,100 到200 分别求和,按照前面学的知识,用累加算法。代码如下: + +```go +package main + +import "fmt" + +func main(){ + sum1 := 0 + for i := 1; i <=100;i++ { + sum1 += i + } + fmt.Printf("sum1 = %d\n", sum1) + + sum2 := 0 + for i := 100; i <=200;i++ { + sum2 += i + } + fmt.Printf("sum2 = %d\n", sum2) +} + +``` + +有没有发现上面的代码,for 循环中除了i的开始值和结束值不同,其它代码相似。这样可以抽取共同的代码,封装成一个整体,编程语言用函数来表示,以达到代码重用的目的。 + +```go +package main + +import "fmt" + +func main(){ + fmt.Printf("sum1 = %d\n", sumOfNumber(1, 100)) + fmt.Printf("sum2 = %d\n", sumOfNumber(100, 200)) +} + + +func sumOfNumber(begin, end int) int { + var res int + for i := begin; i <= end; i++ { + res += i + } + return res +} +``` + +## 函数定义 + +在编程中,函数是指用于进行特定计算的一序列语言的有名称的组合,定义一个函数时,需要指定函数的名称(匿名函数除外)并写下一序列语句,之后可以用这个名称来调用这个函数。 + +初学编程时,要养成习惯将一个大的问题分解为多个小的问题,每一个小的问题用函数来封装。函数就像一个黑箱子一样,设计者对使用者隐藏了实现细节。 + diff --git a/golang/golang.md b/golang/golang.md new file mode 100644 index 0000000..52ea029 --- /dev/null +++ b/golang/golang.md @@ -0,0 +1,84 @@ +# 黄哥Go 语言培训大纲 + +培训之目的,训练学员通过学习Go 语言学会编程,转行当程序员、运维开发等。 +培训形式:腾讯会议视频共享屏幕授课 +培训时间:3个月 每周2,4 上课,晚8点到10点 +费用:8800元 咨询qq:1465376564 + +# 培训模块 + +1. 通过学习Go 语言学会编程 +2. 训练一些常见算法 +3. 项目训练 + +刷题,去找工作。(特别提示,这个不是培训内容,学完前面三项内容,自己去刷题) + +# 内容 +**学习环境搭建** +1. Linux 安装 +2. Linux 常用命令 +3. Go 语言学习环境准备 + +**顺序编程** +4. 变量、语句、表达式。 +5. 基本数据类型:布尔类型、整型、浮点型、字符串、常量。 +6. 复合数据类型:数组、slice、map。 +7. 循环和判断。 +8. 大量的编程思路的训练。 +9. 函数:函数定义、递归、多返回值、错误、函数是第一类对象、匿名函数、变长函数、延迟函数调用、panic、recover +重点训练:如何正确的写函数,递归,大问题如何分解为小问题,函数单元测试、排序算法训练。 + +**面向对象编程** +10. 类型系统:为类型添加方法、指针、结构体。 +11. 方法:方法声明、指针接收者的方法、组合、方法变量和表达式。 +12. 接口 + +**数据结构** + +1. 链表 +2. 栈 +3. 队列 +4. 二叉搜索树 + +**并发编程** +1. 并发不是并行 +2. goroutine +3. 竞争状态 +4. 锁住共享资源 +5. 通道 +6. 并发模式 + +**反射** + +**包和 Go工具** + +**测试** + + +**网络编程** +1. socket 编程 +2. http 编程,爬虫训练 +3. RPC 编程 + +**工程管理** + +**网站开发** +1. html5 +2. css +3. Javascript +4. mysql、Nosql +5. net/http 网站开发 + + +# 项目训练 +1. 博客系统 +2. 基本websocket 聊天系统 +3. 基于RPC、restful api等分布式微服务系统。 + + + + + + + + diff --git a/index.md b/index.md index 50f9e09..df0c019 100644 --- a/index.md +++ b/index.md @@ -1,6 +1,15 @@ -# 黄哥python远程视频培训班 +# 黄哥Python远程视频培训班 + +## 2020 年课程全面升级,请咨询qq:1465376564 + +## 特别提示: + 2018年全新出发,只为有缘的朋友提供服务,扭扭捏捏,叶公好龙者,请请不要参加这个培训。 + 不喜欢做题,不喜欢动脑,不喜欢敲代码。请不要参加这个培训。 + 不接收这样的人参加黄哥Python培训:初中学历,年龄超32岁并且高中学历以下想转程序员的朋友,运维、测试除外。 + 叶公好龙者特征:东折腾一下、西折腾一下、好高骛远、急于求成、不肯下功夫、不喜欢做习题等等。 + + 服务对象:为想转行程序员、运维转运维自动化,测试转测试自动化的、数据挖掘想学编程的朋友服务。 -特别提示:不喜欢做题,不喜欢动脑,不喜欢敲代码。请不要参加这个培训。 ## 形式:自己看视频+作业+答疑,利用业余时间学习。视频50讲,视频中详细的讲解解题思路,课后大量习题 @@ -8,7 +17,7 @@ # 目标: -第一目标是:通过学习python学会编程 。 +第一目标是:通过学习Python学会编程 。 第二目标:会写爬虫,网页采集。 @@ -52,7 +61,7 @@ - 闭包、装饰器精讲、类的属性精讲(@property,__getattr__,__setattr__,__getattribute__,__slots__等特殊应用)。 -## 7、网络编程,urllib2的使用,正则表达式,字符处理,utf-8和gb2312互换。群发邮件如何实现。
 +## 7、网络编程,urllib的使用,正则表达式,字符处理,utf-8和gb2312互换。群发邮件如何实现。
 ## 8、爬虫(采集网页)实战 
 @@ -88,7 +97,7 @@ python测试:doctest和UnitTest Paramiko和fabric等的应用。 -# 案例:
 +## 案例:
 1、群发邮件系统的实现. @@ -104,14 +113,60 @@ Paramiko和fabric等的应用。 Python 核心编程 第二版 -# 提供培训形式: 
 视频+作业+答疑。
 +## 提供培训形式: 
 视频+作业+答疑。
 
 -# 费用: 5000元 (专业程序员为学员服务6个月,何贵之有!学习英文需要几万,这个大家都知道吧!) +## 费用: 8800元 (专业程序员为学员服务6个月,答疑可以延长到1年,何贵之有!学习英文需要几万,这个大家都知道吧!。拿出1个月或二个月工资学习编程,一点不贵。) + +## *咨询:qq:1465376564 电话:18610508486 黄老师* + +## [点击黄哥python培训试看视频播放地址](https://github.com/pythonpeixun/article/blob/master/python_shiping.md) + +## 有一些朋友对课程的顾虑问题。 +1、黄哥有10多年开发经验,被多家企业邀请去内训,如果没有水平,企业不可能请我去讲课。 + 2013年外资企业测试团队请我讲课的情况。 + ![](外企讲课.png) + +下面照片为黄哥本人,为四川知名企业提供内训,摄于2016年9月,成都天府四街。 +![](黄哥近照.jpg) + +2、信誉问题 + + 请看图片,黄哥qq空间,2012-12-13开始从事Python培训。 + ![](2012-12-13.png) + + 黄哥微博有几千粉丝 + ![](黄哥微博.png) + + 知乎有几千专注者 + ![](知乎.png) + + 上面的信息都是真实存在,大家都可以查看。 + +3、几个问题 + +(1)上视频培训,还是上面授的问题。 + +[参加编程培训(Python、Java)面授到底值不值?](https://pythonpeixun.github.io/2017/01/06/%E9%9D%A2%E6%8E%88%E5%88%B0%E5%BA%95%E5%80%BC%E4%B8%8D%E5%80%BC/) + +(2)上周末班的问题。 + 很多在职的朋友,平时上班够累的,还要抽时间去面授,很累。有的时候还需要加班, + 周末班费用高、时间短。 + 参加黄哥Python培训(看视频+写作业+qq答疑)效果等于面授。 + + +(3)答疑由黄哥亲自答疑,有的朋友疑问是能服务得过来吗? + 黄哥的回答是:一般都能及时回复,不能及时回复的,24小时内回复。 + 学员提问不是同一时间提问,所以不存在答疑忙不过来的问题。 + +(4) 请看学员的评价 + [感恩!感谢黄哥Python培训学员的支持和肯定。](https://github.com/pythonpeixun/article/blob/master/python/thanks.md) + + + + -# *咨询:qq:1465376564 电话:18610508486 黄老师* -# [点击黄哥python培训试看视频播放地址](https://github.com/pythonpeixun/article/blob/master/python_shiping.md) diff --git a/learn_programming_by_exercise/learn_python_programming_by_exercise.md b/learn_programming_by_exercise/learn_python_programming_by_exercise.md new file mode 100644 index 0000000..aa565da --- /dev/null +++ b/learn_programming_by_exercise/learn_python_programming_by_exercise.md @@ -0,0 +1,23 @@ +# 欢迎参加黄哥Python作业题训练和答疑服务 + +### 本服务为收费服务项目 + +提供的服务: + +1. 提供150道题目以上的视频讲解,来训练编程思路。 + +2. 提供一年时间的Python 编程的答疑服务(不包括写项目代码、写作业服务)。 + + +黄哥讲解的习题视频,试看如下: + +1. [黄哥Python培训猜数字游戏](https://www.ixigua.com/i6796493204129579533/) + +2. [黄哥Python培训一道小学奥数题](https://www.ixigua.com/i6798762208579813891/) + +3. [图深度优先搜素(dfs)](https://www.ixigua.com/i6804611724319130125/) + + + +费用:2000元. 咨询qq:1465376564 + diff --git a/php_education.md b/php_education.md index 3d1a687..3f423e9 100644 --- a/php_education.md +++ b/php_education.md @@ -1,26 +1,25 @@ -#php培训提纲 -#培训的目标:培训学员能自己写代码解决问题、能独立开发web网站。 -#第一期招生人数:30人 开课时间 2016年4月12日 -#前言: +# 黄哥PHP视频培训大纲 +# 培训的目标:培训学员能自己写代码解决问题、能独立开发web网站。 +# 前言: >黄哥见过部分朋友,会用PHP开发web应用,但不能自学会其它编程语言(python),为啥? >部份php程序员过重的着力于web的流程开发,web的MVC框架的学习。没有将php当成一门开发语言来学习, >说得严重点,就是编程没有完全学会。 -#黄哥PHP培训特色: +# 黄哥PHP培训特色: ## 将PHP当一门语言来教学,不是纯写web的工具。 >1、第一个阶段:训练学员通过学习php学会编程,既讲语法,又重点训练计算思维、编程思路。 以达到学员自己能动手写代码解决问题,换一种编程语言也能很快上手的目的。 >2、第二个阶段:按照web开发的规律,快速掌握web开发,熟悉一种框架的使用。 -# 费用:5000元 培训形式:qq群视频在线直播 课后作业 qq答疑 -#学习周期4个月:每周2次课,每次2小时。 -#联系方式 qq:1465376564 电话:18610508486 黄老师 +# 费用:6800元 培训形式:80讲视频+作业训练+项目训练+qq答疑 交费即可参加 +# 学习周期6个月:答疑1年。 +# 联系方式 qq:1465376564 电话:18610508486 黄老师 -#授课内容: -#面向过程的训练 +# 授课内容: +# 面向过程的训练 ## PHP 基础语法 PHP Basics Syntax >1、Source Files and PHP Tags 2、Newline Characters @@ -30,7 +29,7 @@ 6、Code Blocks 7、Language Constructs -##数据类型 Data Types +## 数据类型 Data Types >1、Numeric Values 2、Strings 3、Booleans @@ -58,55 +57,55 @@ 8、Other Operators 9、Operator Precedence and Associativity ->Control Structures -1、Conditional Structures -2、Iterative Constructs -3、Breaking and Continuing +## Control Structures +>1、Conditional Structures +>2、Iterative Constructs +>3、Breaking and Continuing ->Namespaces -1、Sub-Namespaces -2、Using Namespaces -3、Aliasing -4、Importing Functions and Constants +## 命名空间(Namespaces) 依赖管理(Composer) +>1、Sub-Namespaces +>2、Using Namespaces +>3、Aliasing +>4、Importing Functions and Constants -##函数抽象 Functions +## 函数抽象 Functions >Basic Syntax >Returning Values >Variable Scope -##字符串和正则表达式 Strings and Patterns +## 字符串和正则表达式 Strings and Patterns >String Basics Escaping Literal Values Working with Strings Comparing, Searching and Replacing Strings Formatting Strings Perl Compatible Regular Expressions -##数组 Arrays -###Array Basics +## 数组 Arrays +### Array Basics >Short Array Syntax Printing Arrays Enumerative vs. Associative Multi-dimensional Arrays Unravelling Arrays -##Array Operations +## Array Operations >Comparing Arrays Counting, Searching and Deleting Elements Flipping and Reversing -##Array Iteration +## Array Iteration >The Array Pointer An Easier Way to Iterate Passive Iteration -##Sorting Arrays +## Sorting Arrays >Other Sorting Options The Anti-Sort -##Arrays as Stacks, Queues and Sets +## Arrays as Stacks, Queues and Sets >Set Functionality -##Dereferencing Arrays +## Dereferencing Arrays -#html css javascript 基础知识介绍 +# html css javascript 基础知识介绍 ## web编程 Web Programming >Anatomy of a Web Page @@ -115,7 +114,7 @@ HTTP Headers Sessions Built-in HTTP Server -#PHP文件处理和网络编程 +# PHP文件处理和网络编程 swoole 异步并发编程 >目录操作 文件操作 http协议 @@ -124,7 +123,7 @@ socket curl库和爬虫 -#数据库编程 Database Programming +# 数据库编程 Database Programming >数据库介绍 关系数据库 NOSQL数据库介绍 >设计和创建数据库(mysql) >存储和检索数据 @@ -136,7 +135,7 @@ curl库和爬虫 >redis 简介 -#Data Formats and Types +# Data Formats and Types >JSON 180 Dates and Times Extensible Markup Language (XML) ##SimpleXML @@ -145,8 +144,8 @@ Extensible Markup Language (XML) XPath Queries Modifying XML Documents -#面向对象的训练 -#Object-Oriented Programming in PHP +# 面向对象的训练 +# Object-Oriented Programming in PHP > 面向对象编程的理论 >定义类 创建对象 @@ -165,21 +164,21 @@ traits 类型提示 命名空间 -#设计模式 +# 设计模式 >Design Pattern Theory The Singleton Pattern The Factory Pattern The Registry Pattern The Model-View-Controller Pattern -#PHP标准库 (SPL) +# PHP标准库 (SPL) -#错误和异常 Errors and Exceptions +# 错误和异常 Errors and Exceptions >PHP Errors and Error Managemen Exceptions -#安全 Security +# 安全 Security >Concepts and Practices Password Security Website Security @@ -190,8 +189,8 @@ Shared Hosting -#调试、测试、测试驱动开发 -##调试 +# 调试、测试、测试驱动开发 +## 调试 >安装Xdebug 使用Xdebug ##测试 @@ -200,12 +199,12 @@ Shared Hosting 创建测试用例 运行测试 建立测试 -##测试驱动开发 +## 测试驱动开发 -#基于文本的blog系统 -#面向对象cms系统实例 +# 基于文本的blog系统 +# 面向对象cms系统实例 # Laravel 5 框架学习 -#需求分析和版本控制(git) -#restful api 的开发 +# 需求分析和版本控制(git) +# restful api 的开发 diff --git a/python/Python_word_txt.md b/python/Python_word_txt.md new file mode 100644 index 0000000..378f9c6 --- /dev/null +++ b/python/Python_word_txt.md @@ -0,0 +1,43 @@ +# Python 抽取word文档中的文本。 + +## 引言 + 一个付费答疑的会员,咨询我如何将word文档中的文本用Python抽取。 + 在一个星期前问我,因为本人没有处理过这个问题,搜到一些解决方案给他。 + 1、[python-docx](http://python-docx.readthedocs.io/en/latest/user/documents.html) + 2、windows下的win32com + python-docx 只能处理docx的文件,他的word文件是doc格式。 + win32com,他没有搞定,我没有windows,也没有打算用这个库。 + 本来答疑没有帮助写代码的服务,但他搞一个星期没有搞定,黄哥基于职业道德, + 来帮助他搞定这个事。 + +## 下面来分享一下是怎么在10分钟内搞定他一个星期搞不定的问题。 + + 归功于google 和独立思考,既然现有的库只支持docx文档,那么我就思考,linux下有不有工具软件 + 处理这个事情,搜索一下,还真找到了这个[antiword](http://www.winfield.demon.nl) + 在mac下brew install antiword + 安装后再在终端antiword 出院记录.doc 文件,文本输出了,到这里就有谱了。 + +## Python 代码就只有几行。 + + #!/usr/bin/env python + # coding:utf-8 + '''黄哥Python''' + + import subprocess + word = "出院记录.doc" + output = subprocess.check_output(["antiword", word]) + print output + + +![](word.png) + +## 总结 + 程序员要养成独立解决问题的习惯,快速利用google解决问题的能力。 + + +[如何训练自己的编程思路](https://github.com/pythonpeixun/article/blob/master/python/how_to_learn_program2.md) + + +[部分免费Python免费视频](https://github.com/pythonpeixun/article/blob/master/python_shiping.md) + +[感恩!感谢黄哥Python培训学员的支持和肯定](https://zhuanlan.zhihu.com/p/21548489?refer=pythonpx) diff --git a/python/hours_216.md b/python/hours_216.md index 336008f..25d0be6 100644 --- a/python/hours_216.md +++ b/python/hours_216.md @@ -24,3 +24,5 @@ [部分免费Python免费视频](https://github.com/pythonpeixun/article/blob/master/python_shiping.md) [感恩!感谢黄哥Python培训学员的支持和肯定。](https://github.com/pythonpeixun/article/blob/master/python/thanks.md) + +![](答疑价值.png) diff --git a/python/how_to_learn_program2.md b/python/how_to_learn_program2.md index 2615157..d4230dc 100644 --- a/python/how_to_learn_program2.md +++ b/python/how_to_learn_program2.md @@ -2,7 +2,7 @@ 最近一个周末班的学员,问黄哥你在讲解编程思路训练时,如何想到这个思路的。 -#首先要解决一个问题,学习编程是学习啥?是纯学习语法吗? +# 首先要解决一个问题,学习编程是学习啥?是纯学习语法吗? # 不是,是要学习计算思维,编程思路。 diff --git a/python/learn_python_follow_brother_huang_1.md b/python/learn_python_follow_brother_huang_1.md index 49a32d4..c634449 100644 --- a/python/learn_python_follow_brother_huang_1.md +++ b/python/learn_python_follow_brother_huang_1.md @@ -160,7 +160,7 @@ python默认安装目录在/usr/local/lib/python2.7,终端shell下python -V 2、[如何通过学习python学会编程](https://github.com/pythonpeixun/article/blob/master/python/how_to_learn_python.md) -如果你感觉黄哥的文章对你有帮助请打赏,支付宝账号:18610508486@163.com + [跟黄哥学习python第二章](learn_python_follow_brother_huang_2.md) diff --git a/python/learn_python_follow_brother_huang_2.md b/python/learn_python_follow_brother_huang_2.md index b89ed0d..26f9c2d 100644 --- a/python/learn_python_follow_brother_huang_2.md +++ b/python/learn_python_follow_brother_huang_2.md @@ -89,7 +89,7 @@ 报错信息,体验一下python 友好的报错提示。你也可以字符串只输入一个引号,试试,总之要动手。 只有动手才会找到感觉。 -如果你感觉黄哥的文章对你有帮助请打赏,支付宝账号:18610508486@163.com + [跟黄哥学习python第三章](learn_python_follow_brother_huang_3.md) diff --git a/python/learn_python_follow_brother_huang_3.md b/python/learn_python_follow_brother_huang_3.md index 23548fc..7547f52 100644 --- a/python/learn_python_follow_brother_huang_3.md +++ b/python/learn_python_follow_brother_huang_3.md @@ -126,7 +126,6 @@ -如果你感觉黄哥的文章对你有帮助请打赏,支付宝账号:18610508486@163.com [跟黄哥学习python第四章](learn_python_follow_brother_huang_4.md) diff --git a/python/learn_python_follow_brother_huang_4.md b/python/learn_python_follow_brother_huang_4.md index a528d61..cdda05c 100644 --- a/python/learn_python_follow_brother_huang_4.md +++ b/python/learn_python_follow_brother_huang_4.md @@ -1,36 +1,40 @@ # 跟黄哥学习python第四章 -# 表达式和语句(环境python 3.5) +# 表达式和语句(环境python 3.9) 黄哥箴言:过渡沉迷于语法,容易陷入钻牛角尖,学习编程要适当不求甚解一下。 -## 表达式是值、变量和操作符(或叫运算符)的组合。单独的一个值是一个 - 表达式,单独的变量也是一个表达式。 - 表达式都有一个值,最简单的一个表达式为一个值,如3,3.9。 - 复杂的表达式由一些复杂的值和运算符组合起来的。 - 在python if 语句中 if 后面跟单一变量,这个变量也是一个表达式。 +## 表达式是值、变量和操作符(运算符)的组合。 - >>> n = 3 - >>> if n: - ... print("n > 0") - ... - n > 0 - >>> +单独的一个值是一个 表达式,单独的变量也是一个表达式。 +表达式都有一个值,最简单的一个表达式为一个值,如3,3.9。 +复杂的表达式由一些复杂的值和运算符组合起来的。 +在python if 语句中 if 后面跟单一变量,这个变量也是一个表达式。 +``` +>>> n = 3 +>>> if n: +... print("n > 0") +... +n > 0 +>>> +``` - -## 运算符是一种特殊的符号(如,+,-,*等),用来对一个值或多个数值的特殊运算。 +## 运算符是一种特殊的符号(如,+,-,*等) + 用来对一个值或多个数值的特殊运算。分算术运算符、关系(比较)运算符、 + 逻辑(布尔)运算符 算术运算符 + 进行加法运算 - >>> 3 + 5 + >>> 3 + 5 - 减法 35 - 20 * 乘法 3 * 3 / 除法 python 3 中 9 / 3 结果为 3.0 如果想和python 2 一样进行地板除(建议搜索一下何为地板除),那么需要这样, 9 // 3 // 地板除 9 // 2 结果为4 - ** 乘方 2 ** 3 结果为 8。相当于import math math.pow(2, 3)。 + ** 幂运算 2 ** 3 结果为 8。 + 相当于import math math.pow(2, 3)。 % 取余或取模运算符,即求出除法后的余数。 ![](operator.png) @@ -41,14 +45,14 @@ (3 + 20 * x) / 2 - 12 * ((x + y) * 2) * (a + b) 计算顺序: (1)、首先执行括号内的运算符,括号内还可以有括号,内层括号内的表达式优先被执行。 - (2)、第二,计算指数运算(**)。 - (3)、第三,计算乘法(*),浮点数除法(/),整数除法(//),求余运算(%),如果一个表达式中包含多个乘法、除法、 + (2)、第二,计算幂运算(**)。 + (3)、第三,计算乘法(*),除法(/),整除(//),求余运算(%),如果一个表达式中包含多个乘法、除法、 和求余运算,它们从左到右运算。 (4)、最后计算加法(+) 和减法。如果一个表达式中包含多个加法和减法,它们从左到右运算。 ## 语句 - python语句是一段可执行代码。常见的有赋值语句,if 语句, while 语句,for 语句,return, import 语句等等。 + Python语句是一段可执行代码。常见的有赋值语句,if 语句, while 语句,for 语句,return, import 语句等等。 >>> x = 3 # 赋值语句 >>> y = 3 @@ -63,46 +67,52 @@ >>> x 3 - -赋值语句 x = 3 是这样理解的,内存中为对象3,分配一段内置地址,将整型对象3的引用赋值给x。 -x中保存对象3的应用。可以用type()函数,取得变量y引用的对象的类型。 -id()函数取得变量y引用的对象的内存地址。 +赋值语句 x = 3 是这样理解的,内存中为对象3,分配一段内存地址,将整型对象3的引用赋值给x。 +x中保存对象3的引用。可以用type()函数,取得变量x引用的对象的类型。 +id()函数取得变量x引用的对象的内存地址。 常用id()取得的地址是不是相同,来判断不同的变量是不是对同一个对象的引用。 print(x) 可以输出变量x引用对象的值。 至于语言是怎么设计的,就需要不求甚解一下。 总结一下:对象有3个属性,身份,用id()取得;类型,用type()取得,值,print()输出取得。 -## 多重赋值语句的形式 - - (1)、增量赋值 - x = x + 1 可以写成 x += 1 - 其它的类似有: -= *= /= %= **= 等。 - (2)、多重赋值 - >>> x = y = z = 1 - >>> x - 1 - >>> y - 1 - >>> z - 1 - (3)、多元赋值 - >>> x, y, z = 1, 2, "黄哥" - >>> x - 1 - >>> y - 2 - >>> z - '黄哥' +## 多种赋值语句的形式 +- 增量赋值 +``` + x = x + 1 可以写成 x += 1 + 其它的类似有: -= *= /= %= **= 等。 +``` +- 多重赋值 +``` +>>> x = y = z = 1 +>>> x +1 +>>> y +1 +>>> z +1 +``` +- 多元赋值 +``` +>>> x, y, z = 1, 2, "黄哥" +>>> x +1 +>>> y +2 +>>> z +'黄哥' +``` -# python 语句特征 +# Python 语句特征 +``` +# 表示之后的字符为注释,不被执行。 +一行代码超过80个字符,可以用反斜杠(\) 续行。 +冒号(:) 表示下一行或多行要缩进4个空格的语句块(复合语句)。 +语句块用不同的缩进来表示。 +python 文件以模块的形式来组织。 +``` - (1)、 # 表示之后的字符为注释,不被执行。 - (2)、 一行代码超过80个字符,可以用反斜杠(\) 续行。 - (3)、冒号(:) 表示下一行或多行要缩进4个空格的语句块(复合语句)。 - (4)、语句块用不同的缩进来表示。 - (5)、python 文件以模块的形式来组织。 @@ -111,7 +121,6 @@ print(x) 可以输出变量x引用对象的值。 -如果你感觉黄哥的文章对你有帮助请打赏,支付宝账号:18610508486@163.com [跟黄哥学习python第五章](learn_python_follow_brother_huang_5.md) @@ -121,4 +130,4 @@ print(x) 可以输出变量x引用对象的值。 [黄哥python远程视频培训班](https://github.com/pythonpeixun/article/blob/master/index.md) - \ No newline at end of file +​ \ No newline at end of file diff --git a/python/learn_python_follow_brother_huang_5.md b/python/learn_python_follow_brother_huang_5.md index 7b86db6..764bac6 100644 --- a/python/learn_python_follow_brother_huang_5.md +++ b/python/learn_python_follow_brother_huang_5.md @@ -1,12 +1,24 @@ -# 跟黄哥学习python第五章 +# 跟黄哥学习Python第五章 # 顺序结构、判断结构 -#顺序结构 顺序结构的程序设计是最简单的,只要按照解决问题的顺序写出相应的语句就行,它的执行顺序是自上而下,依次执行。 通俗一点的说法,就是代码从上到下一行一行的执行。 -请看下面求圆面积代码,代码中,请注意,乘法的优先级高于乘法,所以乘法放前面后面都可以。 -![](ch5_1.png) +请看下面求圆面积代码,代码中,请注意,幂运算的优先级高于乘法,所以乘法放前面后面都可以。 +``` +''' +python 3 代码演示顺序结构 +''' + +PI = 3.14159 +radius = 3 +area1 = PI * radius ** 2 +area2 = radius ** 2 * PI +print("area = {0}".format(area1)) +print("area = {0}".format(area2)) +# area = 28.27431 +# area = 28.27431 +``` 如果只有顺序结构,这样程序的灵活性不够,能解决的问题太少,计算机科学家设计编程语言的时候,设计了可以做选择的判断结构 和可以反复做一件事儿的循环结构。 @@ -16,28 +28,50 @@ 布尔表达式是一个能计算出一个布尔值True或False的表达式。 ## 布尔类型 -布尔类型的类型名是bool类,这个类型只有两个字面量 True 和 False(注意大小写形式), +布尔类型的类型名是bool类,这个类型只有两个[常量](https://www.python.org/dev/peps/pep-0285/) True 和 False(注意大小写形式), 它们表示两个逻辑常量,True 计算出 True(表示逻辑值“真”), False 计算出 False(表示逻辑值“假”)。 -python中任何对象,在if 语句,while 语句,或逻辑操作符中,都可以检测出真假值。 +Python中任何对象,在if 语句,while 语句,或逻辑操作符中,都可以检测出真假值。 下面的值,都会被检测出一个为假的值。 None,False,0, 0.0,空字符串'', 空元组(), 空列表[], 空字典{}。 instances of user-defined classes, if the class defines a __bool__() or __len__() method, when that method returns the integer zero or bool value False. 除上面的以外,都为真。 是真还是假,用bool类检测一下,就知道! -![](ch5_2.png) - -## 逻辑运算符 +``` +''' +逻辑真假值 +''' +print(bool(None)) +print(bool(0)) +print(bool(0.0)) +print(bool('')) +print(bool(())) +print(bool([])) +print(bool({})) + +print(bool('黄哥python培训')) + +#False +#False +#False +#False +#False +#False +#False +#True +``` + +## 逻辑运算符 (布尔运算符) Boolean Operations — and, or, not - + 运算符(Operation) 计算结果(Result) 优先级 x or y if x is false, then y, else x (1) x and y if x is false, then x, else y (2) not x if x is false, then True, else False (3) - + 逻辑运算符优先级,not 最高,and 第二, or 第三。 not 运算符优先级低于其它非逻辑运算符,not a == b 相当于 not (a == b), 如果写成 a == not b 就会报语法错误。 @@ -45,36 +79,62 @@ instances of user-defined classes, if the class defines a __bool__() or __len__( x or y 只有当 bool(x) 为False时,才会计算后面的y,否则直接得出表达式的值。 下面的代码发生短路情况,0为除数不合法,但发生短路,3/0没有被计算。 >>> 1 or 3 / 0 - 1 + 1 x and y 只有当 bool(x) 为True时,才会计算后面的y。 下面的代码发生短路情况 >>> 0 and 3 / 0 - 0 - - 特别提示:初学者在布尔表达式中,有几个纠结。 - 有的朋友说,下面这样的表达式为啥不发生短路。为啥结果不是0,而是[] - >>> 0 and 3 / 0 or None and 1 or [] - [] - 黄哥的解答是,逻辑短路,计算2个值和一个逻辑运算符组成的表达式,0 and 3 / 0 发生了短路, - 0 and 3 / 0计算结果为0,但整个表达式求值没有完,要继续计算 0 and 3 / 0 or None and 1 or [] 变为 - 0 or None and 1 or [],前面说了and 优先级高于or,0 or None and 1 or []相当于 - 0 or (None and 1) or [],进一步简化,0 or None or [],再看上面 - x or y if x is false, then y, else x, 所以0 or None or [] 计算为None or [] - 最后结果为[] - - 第二个纠结是: - >>> 3 and 4 - 4 - - 结果为4,有的朋友纠结说,为啥不是True。 - 文档上说了x and y if x is false, then x, else y。 + 0 + + 特别提示:初学者在布尔表达式中,有几个纠结。 + 有的朋友说,下面这样的表达式为啥不发生短路。为啥结果不是0,而是[] + >>> 0 and 3 / 0 or None and 1 or [] + [] + 黄哥的解答是,逻辑短路,计算2个值和一个逻辑运算符组成的表达式,0 and 3 / 0 发生了短路, + 0 and 3 / 0计算结果为0,但整个表达式求值没有完,要继续计算 0 and 3 / 0 or None and 1 or [] 变为 + 0 or None and 1 or [],前面说了and 优先级高于or,0 or None and 1 or []相当于 + 0 or (None and 1) or [],进一步简化,0 or None or [],再看上面 + x or y if x is false, then y, else x, 所以0 or None or [] 计算为None or [] + 最后结果为[] + + 第二个纠结是: + >>> 3 and 4 + 4 + + 结果为4,有的朋友纠结说,为啥不是True。 + 文档上说了x and y if x is false, then x, else y。 真值表 - -![](ch5_3.png) +``` +''' +演示 and or 的八种组合运算 +''' + +print("----------------------真值表------------------") +print("True and True 结果为:{0}".format(True and True)) +print("True and False 结果为:{0}".format(True and False)) +print("False and True 结果为:{0}".format(False and True)) +print("False and False 结果为:{0}".format(False and False)) +print("True or True 结果为:{0}".format(True or True)) +print("True or False 结果为:{0}".format(True or False)) +print("False and True 结果为:{0}".format(False and True)) +print("False and False 结果为:{0}".format(False and False)) +print("----------------------over------------------") + +# ----------------------真值表------------------ +# True and True 结果为:True +# True and False 结果为:False +# False and True 结果为:False +# False and False 结果为:False +# True or True 结果为:True +# True or False 结果为:True +# False and True 结果为:False +# False and False 结果为:False +# ----------------------over------------------ +``` ## 关系运算符(也称比较运算符) + in, not in, is, is not, <, <=, >, >=, !=, == 运算符 含义 < 小于 <= 小于等于 @@ -84,7 +144,8 @@ instances of user-defined classes, if the class defines a __bool__() or __len__( != 不想等 is 是不是同一个对象 is not negated object identity - + in 在 + not in 不在 x < y < z 想当于 x < y and y < z 关系运算符的结果有一个真假值。 >>> 3 < 4 @@ -93,12 +154,33 @@ instances of user-defined classes, if the class defines a __bool__() or __len__( False -## 运算符的结合和优先级 +## 运算符优先级 前面学习的算术运算符,逻辑运算符, 关系运算符可以结合起来,组成表达式。 表达式可以为变量赋值,也可以作为if 语句,while 语句后面的布尔表达式使用,所谓的条件判断。 -下面的图片,展示了python所有的运算符的优先级,从上往下优先级热来热高,同一个行运算符从左到右运算(除乘方外)。 -乘方是从右往左计算。 -![](ch5_4.png) +下表对 Python 中运算符的优先顺序进行了总结,从最低优先级(最后绑定)到最高优先级(最先绑定)。 相同单元格内的运算符具有相同优先级。 除非句法显式地给出,否则运算符均指二元运算。 相同单元格内的运算符均从左至右分组(除了幂运算是从右至左分组)。 +请注意比较、成员检测和标识号检测均为相同优先级,并具有如 比较运算 一节所描述的从左至右串连特性。 + + +| 运算符 | 描述 | +| :----------------------------------------------------------- | :----------------------------------------------------------- | +| := | 赋值表达式 | +| [`lambda`](https://docs.python.org/zh-cn/3/reference/expressions.html#lambda) | lambda 表达式 | +| [`if`](https://docs.python.org/zh-cn/3/reference/expressions.html#if-expr) -- `else` | 条件表达式 | +| [`or`](https://docs.python.org/zh-cn/3/reference/expressions.html#or) | 布尔逻辑或 OR | +| [`and`](https://docs.python.org/zh-cn/3/reference/expressions.html#and) | 布尔逻辑与 AND | +| [`not`](https://docs.python.org/zh-cn/3/reference/expressions.html#not) `x` | 布尔逻辑非 NOT | +| [`in`](https://docs.python.org/zh-cn/3/reference/expressions.html#in), [`not in`](https://docs.python.org/zh-cn/3/reference/expressions.html#not-in), [`is`](https://docs.python.org/zh-cn/3/reference/expressions.html#is), [`is not`](https://docs.python.org/zh-cn/3/reference/expressions.html#is-not), `<`, `<=`, `>`, `>=`, `!=`, `==` | 比较运算,包括成员检测和标识号检测 | +| `|` | 按位或 OR | +| `^` | 按位异或 XOR | +| `&` | 按位与 AND | +| `<<`, `>>` | 移位 | +| `+`, `-` | 加和减 | +| `*`, `@`, `/`, `//`, `%` | 乘,矩阵乘,除,整除,取余 [5](https://docs.python.org/zh-cn/3/reference/expressions.html#id21) | +| `+x`, `-x`, `~x` | 正,负,按位非 NOT | +| `**` | 乘方 [6](https://docs.python.org/zh-cn/3/reference/expressions.html#id22) | +| [`await`](https://docs.python.org/zh-cn/3/reference/expressions.html#await) `x` | await 表达式 | +| `x[index]`, `x[index:index]`, `x(arguments...)`, `x.attribute` | 抽取,切片,调用,属性引用 | +| `(expressions...)`,`[expressions...]`, `{key: value...}`, `{expressions...}` | 绑定或加圆括号的表达式,列表显示,字典显示,集合显示 | 请看一面表达式。 @@ -112,7 +194,8 @@ instances of user-defined classes, if the class defines a __bool__() or __len__( 特别提醒:如果自己写复杂表达式,可以用括号。 -#判断结构(也叫选择结构) + +# 判断结构(也叫选择结构) 人生充满着选择,重要时刻,判断准确,选择着正确的方向,会少走很多弯路。 很多朋友,学习编程,选择了python,是不是经过比较选择的结果。 @@ -121,12 +204,12 @@ instances of user-defined classes, if the class defines a __bool__() or __len__( 1、if 布尔表达式: 语句块 - + 2、if 布尔表达式: 语句块 else: 语句块 - + 3、if 布尔表达式: 语句块 elif 布尔表达式: @@ -136,7 +219,7 @@ instances of user-defined classes, if the class defines a __bool__() or __len__( ........ else: 语句块 - + 4、if嵌套 if 布尔表达式: 语句块 @@ -152,7 +235,13 @@ if之后的布尔表达式俗称条件,如果它为真,如果为真,则执 (或称为复合语句)。一般语句块以4个空格为习惯的缩进(相当于c语言的{})。如果 语句块暂时不写语句,可以用pass语句暂占位置,pass语句是啥也不做的意思。 -![](ch5_5.png) +``` +salary = 9000 +if salary < 10000: + print("那是因为你还没有学会编程") + +# 那是因为你还没有学会编程 +``` 两路分支判断 @@ -162,7 +251,14 @@ if之后的布尔表达式俗称条件,如果它为真,如果为真,则执 语句块 这个是if 语句后面的条件为真,则执行下面的语句块,否则执行else下面的语句块。 -![](ch5_6.png) +``` +salary = 9000 +if salary > 10000: + print("那是因为你还没有学会编程") +else: + print("需要好好通过学习python学会编程") +#需要好好通过学习python学会编程 +``` 多路分支判断 @@ -179,7 +275,20 @@ if之后的布尔表达式俗称条件,如果它为真,如果为真,则执 如果if 语句后面条件为假,就不执行if下面的语句块,转到elif 判断,如果有一个elif 后面的条件为真,则执行下面的语句,执行完,就跳出判断结构,继续下面的语句执行。 如果if elif 语句后面的条件都为假,则执行else 下面的语句块。 -![](ch5_7.png) +``` +score = float(input("请输入你的分数:\n")) +if 60 <= score < 70.0: + print("及格") +elif 70.0 < score <= 80.0: + print("一般") +elif 80.0 < score <= 90.0: + print("优秀") +elif score > 90.0: + print("超级棒") +else: + print("不及格") + +``` 代码解释:上图中,第三行代码,input()函数为python内置函数,直接可以调用, input()函数可以传递一个参数,一般是传递字符串,提示输入信息。input作用是 @@ -190,7 +299,7 @@ input()函数可以传递一个参数,一般是传递字符串,提示输入 if 嵌套 if 或 if-else 语句中可以是任意语句,当然也可以是if或if-else语句。 如果if 或if-esle 中再包含if 或if-else语句,则称为if 嵌套。 - + if 布尔表达式: 语句块 if 布尔表达式: @@ -200,7 +309,22 @@ if 或 if-else 语句中可以是任意语句,当然也可以是if或if-else else: 语句块 -![](ch5_8.png) +``` +x = 3 +y = 5 + +if x == y: + print("x 等于 y") +else: + if x < y: + print("x 小于 y") + else: + print("x 等于 y") + + +# x 小于 y + +``` # 判断结构实例: @@ -212,14 +336,36 @@ if 或 if-else 语句中可以是任意语句,当然也可以是if或if-else year % 4 == 0 and year % 100 != 0 or year % 400 == 0 前面说过,关系运算符优先逻辑运算符,逻辑运算符and优先or,所以可以写成上面的表达式。 为了清晰,可以写成(year % 4 == 0 and year % 100 != 0) or (year % 400 == 0) -![](ch5_9.png) +``` +# User enters the year +year = int(input("Enter Year: ")) + +# Leap Year Check +if year % 4 == 0 and year % 100 != 0: + print(year, "is a Leap Year") +elif year % 100 == 0: + print(year, "is not a Leap Year") +elif year % 400 ==0: + print(year, "is a Leap Year") +else: + print(year, "is not a Leap Year") + +# 上面的多个分支可以修改为一个表达式 + +year = int(input("请输入年份:\n")) + +if year % 4 == 0 and year % 100 != 0 or year % 400 == 0: + print("{0}年是闰年".format(year)) +else: + print("{0}年不是闰年".format(year)) + +``` # 习题: 特别提示:只有参加[黄哥python远程视频培训班](https://github.com/pythonpeixun/article/blob/master/index.md) 或参加黄哥收费答疑群,才能得到习题和辅导。 -如果你感觉黄哥的文章对你有帮助请打赏,支付宝账号:18610508486@163.com [跟黄哥学习python第六章](learn_python_follow_brother_huang_6.md) @@ -229,4 +375,4 @@ if 或 if-else 语句中可以是任意语句,当然也可以是if或if-else - \ No newline at end of file +​ diff --git a/python/learn_python_follow_brother_huang_6.md b/python/learn_python_follow_brother_huang_6.md index 7969c89..f4a3338 100644 --- a/python/learn_python_follow_brother_huang_6.md +++ b/python/learn_python_follow_brother_huang_6.md @@ -9,8 +9,6 @@ 特别提示:只有参加[黄哥python远程视频培训班](https://github.com/pythonpeixun/article/blob/master/index.md) 或参加黄哥收费答疑群,才能得到习题和辅导。 -如果你感觉黄哥的文章对你有帮助请打赏,支付宝账号:18610508486@163.com - [跟黄哥学习python第六章](learn_python_follow_brother_huang_6.md) diff --git a/python/word.png b/python/word.png new file mode 100644 index 0000000..821f768 Binary files /dev/null and b/python/word.png differ diff --git "a/python/\347\255\224\347\226\221\344\273\267\345\200\274.png" "b/python/\347\255\224\347\226\221\344\273\267\345\200\274.png" new file mode 100644 index 0000000..96b2fad Binary files /dev/null and "b/python/\347\255\224\347\226\221\344\273\267\345\200\274.png" differ diff --git a/python_shiping.md b/python_shiping.md index 9509f67..d73b8ee 100644 --- a/python_shiping.md +++ b/python_shiping.md @@ -1,43 +1,44 @@ -#迪艾姆python培训试看视频播放地址 +# 黄哥python培训试看视频播放地址 + +[高清晰度播放地址](https://space.bilibili.com/50009562) -[迪艾姆python远程视频培训班] (https://github.com/pythonpeixun/article/blob/master/index.md) -[黄哥python培训_python编程思路之四](http://www.tudou.com/programs/view/Z4IClY5Wj-g/) -[迪艾姆python培训_python编程思路1.flv ](http://www.tudou.com/programs/view/UJAiXBoakWM/) +[黄哥python远程视频培训班] (https://github.com/pythonpeixun/article/blob/master/index.md) +[黄哥python培训_python编程思路之四](http://www.tudou.com/programs/view/Z4IClY5Wj-g/) -[迪艾姆python培训_python编程思路2.flv ](http://www.tudou.com/programs/view/C2z57OT8GZk/) +[黄哥python培训_python编程思路1.flv ](http://v.youku.com/v_show/id_XNTY0MDA5MDMy.html?spm=a2hzp.8253869.0.0) -[迪艾姆python培训_python培训_python爬虫.flv ](http://www.tudou.com/programs/view/SXgshk-sYbw/) +[黄哥python培训_python编程思路2.flv ](http://v.youku.com/v_show/id_XNTY0MDE1NzA0.html?spm=a2hzp.8253869.0.0) -[迪艾姆python培训_python培训_while循环.flv](http://www.tudou.com/programs/view/hKW7VEmTDKg) +[黄哥python培训_python培训_python爬虫.flv ](http://v.youku.com/v_show/id_XNjgxNjc5NjAw.html?spm=a2hzp.8253869.0.0) -[迪艾姆python培训_python培训_编程思路三.flv](http://www.tudou.com/programs/view/q9X8jE3SwzA/) +[黄哥python培训_python培训_while循环.flv](http://v.youku.com/v_show/id_XNTIzODM1Njcy.html?spm=a2hzp.8253869.0.0) -[迪艾姆python培训_python培训_函数抽象.flv](http://v.youku.com/v_show/id_XNTI1NTIyODE2.html) +[黄哥python培训_python培训_函数抽象.flv](http://v.youku.com/v_show/id_XNTI1NTIyODE2.html) -[迪艾姆python培训_python培训_类抽象.flv](http://www.tudou.com/programs/view/o4j54LUxnqY/) +[黄哥python培训_python培训_类抽象.flv](http://v.youku.com/v_show/id_XMzA3Nzg1MjAxMg==.html?spm=a2hzp.8253869.0.0) -[迪艾姆python培训_python培训_嵌套函数.flv](http://www.tudou.com/programs/view/rhY9GCpr1cc) +[黄哥python培训_python培训_嵌套函数.flv](http://www.tudou.com/programs/view/rhY9GCpr1cc) -[迪艾姆python培训_python培训_实例对象.flv ](http://v.youku.com/v_show/id_XNjgxNjgxMTE2.html) +[黄哥python培训_python培训_实例对象.flv ](http://v.youku.com/v_show/id_XNjgxNjgxMTE2.html) -[迪艾姆python培训_sublime text配置.flv](http://v.youku.com/v_show/id_XNjgxNjgwNDU2.html) +[黄哥python培训_sublime text配置.flv](http://v.youku.com/v_show/id_XNjgxNjgwNDU2.html) -[迪艾姆python培训_tornado之hello world.flv](http://v.youku.com/v_show/id_XNjgxNjgxOTA0.html) +[黄哥python培训_tornado之hello world.flv](http://v.youku.com/v_show/id_XNjgxNjgxOTA0.html) -[迪艾姆python培训_web.py之hello world.flv](http://v.youku.com/v_show/id_XNjgxNjgyNTMy.html) +[黄哥python培训_web.py之hello world.flv](http://v.youku.com/v_show/id_XNjgxNjgyNTMy.html) [黄哥python培训_python初学者的第一步 ](http://www.tudou.com/programs/view/pZvrOt9RlmE/) [如何捅破python编程的那层纸视频](http://www.tudou.com/programs/view/ppJv6Kf08Ac/) -[迪艾姆python远程视频培训班] (https://github.com/pythonpeixun/article/blob/master/index.md) +[黄哥python远程视频培训班] (https://github.com/pythonpeixun/article/blob/master/index.md) diff --git a/pythonstudy.md b/pythonstudy.md index 8256183..80eee68 100644 --- a/pythonstudy.md +++ b/pythonstudy.md @@ -9,7 +9,7 @@ #编程思路一: 经常有人问,一个文本文件,要抽取多少行以后的文本。 - 相信计数循环,大家都看得懂,也会写。下面的代码就是利用记数循环来解决这个问题。 + 相信计数循环,大家都看得懂,也会写。下面的代码就是利用计数循环来解决这个问题。 代码一: 一个几M的文本文件,需要每隔100行写到新的文件中。 @@ -52,7 +52,7 @@ #编程思路二: #coding:utf-8 """ - 本代码由迪艾姆公司黄老师所写,思路大家自己看代码。 + 本代码由黄哥Python培训,黄老师所写,思路大家自己看代码。 抓了a,b,c,d4名犯罪嫌疑人.其中有一名是小偷,审讯中: a说我不是小偷 @@ -78,13 +78,13 @@ 这个需要一个过程,也不要操之过急。 看一下这些视频,可能对你有些帮助。 -[迪艾姆python培训_python编程思路- ] +[黄哥python培训_python编程思路- ] (http://v.youku.com/v_show/id_XNTY0MDA5MDMy.html) -[迪艾姆python培训_python编程思路二 ] +[黄哥python培训_python编程思路二 ] (http://v.youku.com/v_show/id_XNTY0MDE1NzA0.html) [python爬虫之采集搜素引擎联想词 ] (http://www.tudou.com/programs/view/SXgshk-sYbw/) -[广告:如果自学有困难,建议参加迪艾姆python培训,可以节省学习成本。](https://github.com/pythonpeixun/article/blob/master/index.md) +[广告:如果自学有困难,建议参加黄哥Python培训,可以节省学习成本。](https://github.com/pythonpeixun/article/blob/master/index.md) diff --git a/shanghai_weekend.md b/shanghai_weekend.md index 4533958..1f57ed7 100644 --- a/shanghai_weekend.md +++ b/shanghai_weekend.md @@ -1,7 +1,8 @@ #python上海周末培训班 -##开课时间:报名人数达10人即开课。 -##学习周期:开课时间:2016年9月11日 连续2个月星期天上课(每天8小时)。 +##培训形式:2天面授 + [视频培训(50讲视频+作业训练+qq答疑)](https://github.com/pythonpeixun/article/blob/master/index.md)。 +#费用: 6800元 +##开课时间:2016年9月15-17日(任意选二天)。 ##上课地址:徐汇区古美路1515号19号楼凤凰大厦 ##报名方式:请将姓名+电话+qq号码+所在城市+ 职业(根据自己的情况写,运维、测试、软件开发或学生) 发邮件到:1465376564@qq.com diff --git "a/\344\270\212\345\244\234\347\217\255\345\255\246\345\221\230.jpg" "b/\344\270\212\345\244\234\347\217\255\345\255\246\345\221\230.jpg" new file mode 100644 index 0000000..59914f0 Binary files /dev/null and "b/\344\270\212\345\244\234\347\217\255\345\255\246\345\221\230.jpg" differ diff --git "a/\344\270\234\345\214\227\345\255\246\345\221\230.jpg" "b/\344\270\234\345\214\227\345\255\246\345\221\230.jpg" new file mode 100644 index 0000000..7a8d23e Binary files /dev/null and "b/\344\270\234\345\214\227\345\255\246\345\221\230.jpg" differ diff --git "a/\345\244\226\344\274\201\350\256\262\350\257\276.png" "b/\345\244\226\344\274\201\350\256\262\350\257\276.png" new file mode 100644 index 0000000..eb376af Binary files /dev/null and "b/\345\244\226\344\274\201\350\256\262\350\257\276.png" differ diff --git "a/\345\244\226\350\265\204\350\256\262\350\257\276.jpg" "b/\345\244\226\350\265\204\350\256\262\350\257\276.jpg" new file mode 100644 index 0000000..9b82f92 Binary files /dev/null and "b/\345\244\226\350\265\204\350\256\262\350\257\276.jpg" differ diff --git "a/\346\255\246\346\261\211\345\255\246\345\221\230.jpg" "b/\346\255\246\346\261\211\345\255\246\345\221\230.jpg" new file mode 100644 index 0000000..9e1d507 Binary files /dev/null and "b/\346\255\246\346\261\211\345\255\246\345\221\230.jpg" differ diff --git "a/\346\265\213\350\257\225\345\255\246\345\221\230.jpg" "b/\346\265\213\350\257\225\345\255\246\345\221\230.jpg" new file mode 100644 index 0000000..fa26558 Binary files /dev/null and "b/\346\265\213\350\257\225\345\255\246\345\221\230.jpg" differ diff --git "a/\347\237\245\344\271\216.png" "b/\347\237\245\344\271\216.png" new file mode 100644 index 0000000..1b23da2 Binary files /dev/null and "b/\347\237\245\344\271\216.png" differ diff --git "a/\350\275\254\350\241\214\345\255\246\345\221\230.jpg" "b/\350\275\254\350\241\214\345\255\246\345\221\230.jpg" new file mode 100644 index 0000000..1bceddd Binary files /dev/null and "b/\350\275\254\350\241\214\345\255\246\345\221\230.jpg" differ diff --git "a/\350\277\220\347\273\264\345\255\246\345\221\230.jpg" "b/\350\277\220\347\273\264\345\255\246\345\221\230.jpg" new file mode 100644 index 0000000..9a99ecc Binary files /dev/null and "b/\350\277\220\347\273\264\345\255\246\345\221\230.jpg" differ diff --git "a/\351\273\204\345\223\245Python\345\237\271\350\256\255\344\271\240\351\242\230\346\240\267\346\234\254.pdf" "b/\351\273\204\345\223\245Python\345\237\271\350\256\255\344\271\240\351\242\230\346\240\267\346\234\254.pdf" new file mode 100644 index 0000000..a9ff27a Binary files /dev/null and "b/\351\273\204\345\223\245Python\345\237\271\350\256\255\344\271\240\351\242\230\346\240\267\346\234\254.pdf" differ diff --git "a/\351\273\204\345\223\245Python\345\237\271\350\256\255\344\275\234\344\270\232\351\242\230\346\240\267\346\234\254.pdf" "b/\351\273\204\345\223\245Python\345\237\271\350\256\255\344\275\234\344\270\232\351\242\230\346\240\267\346\234\254.pdf" new file mode 100644 index 0000000..a9ff27a Binary files /dev/null and "b/\351\273\204\345\223\245Python\345\237\271\350\256\255\344\275\234\344\270\232\351\242\230\346\240\267\346\234\254.pdf" differ diff --git "a/\351\273\204\345\223\245\345\276\256\345\215\232.png" "b/\351\273\204\345\223\245\345\276\256\345\215\232.png" new file mode 100644 index 0000000..88470df Binary files /dev/null and "b/\351\273\204\345\223\245\345\276\256\345\215\232.png" differ diff --git "a/\351\273\204\345\223\245\350\277\221\347\205\247.jpg" "b/\351\273\204\345\223\245\350\277\221\347\205\247.jpg" new file mode 100644 index 0000000..eef78b8 Binary files /dev/null and "b/\351\273\204\345\223\245\350\277\221\347\205\247.jpg" differ