副本为什么不要我不思议炎魔之手,求吧主莫手滑,真心求

&p&Python 其实挺简单的,也挺强大的。&/p&&p&我用 Python 做科学计算,自学一年,也记了一年的笔记。&/p&&p&笔记链接:&/p&&ul&&li&Github:&a href=&///?target=https%3A///lijin-THU/notes-python& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&lijin-THU/notes-python&i class=&icon-external&&&/i&&/a&&/li&&li&Nbviewer:&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/index.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&Jupyter Notebook Viewer&i class=&icon-external&&&/i&&/a&&/li&&li&网页:&a href=&///?target=http%3A//lijin-thu.github.io/& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&lijin-thu.github.io&i class=&icon-external&&&/i&&/a& &/li&&/ul&&p&笔记目录:&/p&&ul&&li&&u&01. Python 工具&/u&&/li&&ul&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/01-python-tools/01.01-python-overview.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&01.01 Python 简介&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/01-python-tools/01.02-ipython-interpreter.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&01.02 Ipython 解释器&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/01-python-tools/01.03-ipython-notebook.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&01.03 Ipython notebook&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/01-python-tools/01.04-use-anaconda.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&01.04 使用 Anaconda&i class=&icon-external&&&/i&&/a&&/u&&/li&&/ul&&li&&u&02. Python 基础&/u&&/li&&ul&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/02-python-essentials/02.01-a-tour-of-python.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&02.01 Python 入门演示&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/02-python-essentials/02.02-python-data-types.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&02.02 Python 数据类型&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/02-python-essentials/02.03-numbers.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&02.03 数字&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/02-python-essentials/02.04-strings.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&02.04 字符串&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/02-python-essentials/02.05-indexing-and-slicing.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&02.05 索引和分片&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/02-python-essentials/02.06-lists.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&02.06 列表&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/02-python-essentials/02.07-mutable-and-immutable-data-types.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&02.07 可变和不可变类型&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/02-python-essentials/02.08-tuples.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&02.08 元组&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/02-python-essentials/02.09-speed-comparison-between-list-%26-tuple.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&02.09 列表与元组的速度比较&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/02-python-essentials/02.10-dictionaries.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&02.10 字典&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/02-python-essentials/02.11-sets.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&02.11 集合&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/02-python-essentials/02.12-frozen-sets.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&02.12 不可变集合&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/02-python-essentials/02.13-how-python-assignment-works.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&02.13 Python 赋值机制&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/02-python-essentials/02.14-if-statement.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&02.14 判断语句&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/02-python-essentials/02.15-loops.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&02.15 循环&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/02-python-essentials/02.16-list-comprehension.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&02.16 列表推导式&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/02-python-essentials/02.17-functions.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&02.17 函数&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/02-python-essentials/02.18-modules-and-packages.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&02.18 模块和包&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/02-python-essentials/02.19-exceptions.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&02.19 异常&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/02-python-essentials/02.20-warnings.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&02.20 警告&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/02-python-essentials/02.21-file-IO.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&02.21 文件读写&i class=&icon-external&&&/i&&/a&&/u&&/li&&/ul&&li&&u&03. Numpy&/u&&/li&&ul&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/03-numpy/03.01-numpy-overview.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&03.01 Numpy 简介&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/03-numpy/03.02-matplotlib-basics.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&03.02 Matplotlib 基础&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/03-numpy/03.03-numpy-arrays.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&03.03 Numpy 数组及其索引&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/03-numpy/03.04-array-types.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&03.04 数组类型&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/03-numpy/03.05-array-calculation-method.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&03.05 数组方法&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/03-numpy/03.06-sorting-numpy-arrays.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&03.06 数组排序&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/03-numpy/03.07-array-shapes.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&03.07 数组形状&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/03-numpy/03.08-diagonals.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&03.08 对角线&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/03-numpy/03.09-data-to-%26-from-string.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&03.09 数组与字符串的转换&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/03-numpy/03.10-array-attribute-%26-method-overview-.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&03.10 数组属性方法总结&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/03-numpy/03.11-array-creation-functions.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&03.11 生成数组的函数&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/03-numpy/03.12-matrix-object.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&03.12 矩阵&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/03-numpy/03.13-general-functions.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&03.13 一般函数&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/03-numpy/03.14-vectorizing-functions.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&03.14 向量化函数&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/03-numpy/03.15-binary-operators.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&03.15 二元运算&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/03-numpy/03.16-universal-functions.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&03.16 ufunc 对象&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/03-numpy/03.17-choose.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&03.17 choose 函数实现条件筛选&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/03-numpy/03.18-array-broadcasting.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&03.18 数组广播机制&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/03-numpy/03.19-reading-and-writing-arrays.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&03.19 数组读写&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/03-numpy/03.20-structured-arrays.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&03.20 结构化数组&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/03-numpy/03.21-record-arrays.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&03.21 记录数组&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/03-numpy/03.22-memory-maps.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&03.22 内存映射&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/03-numpy/03.23-from-matlab-to-numpy.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&03.23 从 Matlab 到 Numpy&i class=&icon-external&&&/i&&/a&&/u&&/li&&/ul&&li&&u&04. Scipy&/u&&/li&&ul&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/04-scipy/04.01-scienticfic-python-overview.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&04.01 SCIentific PYthon 简介&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/04-scipy/04.02-interpolation-with-scipy.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&04.02 插值&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/04-scipy/04.03-statistics-with-scipy.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&04.03 概率统计方法&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/04-scipy/04.04-curve-fitting.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&04.04 曲线拟合&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/04-scipy/04.05-minimization-in-python.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&04.05 最小化函数&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/04-scipy/04.06-integration-in-python.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&04.06 积分&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/04-scipy/04.07-ODEs.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&04.07 解微分方程&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/04-scipy/04.08-sparse-matrix.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&04.08 稀疏矩阵&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/04-scipy/04.09-linear-algbra.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&04.09 线性代数&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/04-scipy/04.10-sparse-linear-algebra.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&04.10 稀疏矩阵的线性代数&i class=&icon-external&&&/i&&/a&&/u&&/li&&/ul&&li&&u&05. Python 进阶&/u&&/li&&ul&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/05-advanced-python/05.01-overview-of-the-sys-module.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&05.01 sys 模块简介&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/05-advanced-python/05.02-interacting-with-the-OS---os.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&05.02 与操作系统进行交互:os 模块&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/05-advanced-python/05.03-comma-separated-values.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&05.03 CSV 文件和 csv 模块&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/05-advanced-python/05.04-regular-expression.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&05.04 正则表达式和 re 模块&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/05-advanced-python/05.05-datetime.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&05.05 datetime 模块&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/05-advanced-python/05.06-sql-databases.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&05.06 SQL 数据库&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/05-advanced-python/05.07-object-relational-mappers.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&05.07 对象关系映射&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/05-advanced-python/05.08-functions.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&05.08 函数进阶:参数传递,高阶函数,lambda 匿名函数,global 变量,递归&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/05-advanced-python/05.09-iterators.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&05.09 迭代器&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/05-advanced-python/05.10-generators.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&05.10 生成器&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/05-advanced-python/05.11-context-managers-and-the-with-statement.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&05.11 with 语句和上下文管理器&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/05-advanced-python/05.12-decorators.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&05.12 修饰符&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/05-advanced-python/05.13-decorator-usage.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&05.13 修饰符的使用&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/05-advanced-python/05.14-the-operator-functools-itertools-toolz-fn-funcy-module.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&05.14 operator, functools, itertools, toolz, fn, funcy 模块&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/05-advanced-python/05.15-scope.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&05.15 作用域&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/05-advanced-python/05.16-dynamic-code-execution.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&05.16 动态编译&i class=&icon-external&&&/i&&/a&&/u&&/li&&/ul&&li&&u&h&b&ref=&http:&/b&//&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/06-matplotlib& class=& external& target=&_blank& rel=&nofollow noreferrer&&&span class=&invisible&&http://&/span&&span class=&visible&&nbviewer.jupyter.org/gi&/span&&span class=&invisible&&thub/lijin-THU/notes-python/blob/master/06-matplotlib&/span&&span class=&ellipsis&&&/span&&i class=&icon-external&&&/i&&/a&&&06. Matplotlib&/u&&/li&&ul&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/06-matplotlib/06.01-pyplot-tutorial.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&06.01 Pyplot 教程&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/06-matplotlib/06.02-customizing-plots-with-style-sheets.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&06.02 使用 style 来配置 pyplot 风格&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/06-matplotlib/06.03-working-with-text---basic.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&06.03 处理文本(基础)&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/06-matplotlib/06.04-working-with-text---math-expression.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&06.04 处理文本(数学表达式)&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/06-matplotlib/06.05-image-tutorial.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&06.05 图像基础&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/06-matplotlib/06.06-annotating-axes.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&06.06 注释&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/06-matplotlib/06.07-legend.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&06.07 标签&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/06-matplotlib/06.08-figures%2C-subplots%2C-axes-and-ticks.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&06.08 figures, subplots, axes 和 ticks 对象&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/06-matplotlib/06.09-do-not-trust-the-defaults.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&06.09 不要迷信默认设置&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/06-matplotlib/06.10-different-plots.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&06.10 各种绘图实例&i class=&icon-external&&&/i&&/a&&/u&&/li&&/ul&&li&&u&07. 使用其他语言进行扩展&/u&&/li&&ul&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/07-interfacing-with-other-languages/07.01-introduction.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&07.01 简介&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/07-interfacing-with-other-languages/07.02-python-extension-modules.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&07.02 Python 扩展模块&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/07-interfacing-with-other-languages/07.03-cython-part-1.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&07.03 Cython:Cython 基础,将源代码转换成扩展模块&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/07-interfacing-with-other-languages/07.04-cython-part-2.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&07.04 Cython:Cython 语法,调用其他C库&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/07-interfacing-with-other-languages/07.05-cython-part-3.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&07.05 Cython:class 和 cdef class,使用 C++&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/07-interfacing-with-other-languages/07.06-cython-part-4.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&07.06 Cython:Typed memoryviews&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/07-interfacing-with-other-languages/07.07-profiling-with-annotations.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&07.07 生成编译注释&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/07-interfacing-with-other-languages/07.08-ctypes.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&07.08 ctypes&i class=&icon-external&&&/i&&/a&&/u&&/li&&/ul&&li&&u&08. 面向对象编程&/u&&/li&&ul&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/08-object-oriented-programming/08.01-oop-introduction.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&08.01 简介&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/08-object-oriented-programming/08.02-using-oop-model-a-forest-fire.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&08.02 使用 OOP 对森林火灾建模&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/08-object-oriented-programming/08.03-what-is-a-object.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&08.03 什么是对象?&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/08-object-oriented-programming/08.04-writing-classes.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&08.04 定义 class&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/08-object-oriented-programming/08.05-special-method.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&08.05 特殊方法&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/08-object-oriented-programming/08.06-properties.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&08.06 属性&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/08-object-oriented-programming/08.07-forest-fire-simulation.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&08.07 森林火灾模拟&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/08-object-oriented-programming/08.08-inheritance.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&08.08 继承&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/08-object-oriented-programming/08.09-super.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&08.09 super() 函数&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/08-object-oriented-programming/08.10-refactoring-the-forest-fire-simutation.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&08.10 重定义森林火灾模拟&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/08-object-oriented-programming/08.11-interfaces.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&08.11 接口&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/08-object-oriented-programming/08.12-public-private-special-in-python.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&08.12 共有,私有和特殊方法和属性&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/08-object-oriented-programming/08.13-multiple-inheritance.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&08.13 多重继承&i class=&icon-external&&&/i&&/a&&/u&&/li&&/ul&&li&&u&09. Theano 基础&/u&&/li&&ul&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/09-theano/09.01-introduction-and-installation.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&09.01 Theano 简介及其安装&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/09-theano/09.02-theano-basics.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&09.02 Theano 基础&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/09-theano/09.03-gpu-on-windows.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&09.03 Theano 在 Windows 上的配置&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/09-theano/09.04-graph-structures.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&09.04 Theano 符号图结构&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/09-theano/09.05-configuration-settings-and-compiling-modes.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&09.05 Theano 配置和编译模式&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/09-theano/09.06-conditions-in-theano.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&09.06 Theano 条件语句&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/09-theano/09.07-loop-with-scan.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&09.07 Theano 循环:scan(详解)&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/09-theano/09.08-linear-regression.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&09.08 Theano 实例:线性回归&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/09-theano/09.09-logistic-regression-.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&09.09 Theano 实例:Logistic 回归&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/09-theano/09.10-softmax-on-mnist.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&09.10 Theano 实例:Softmax 回归&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/09-theano/09.11-net-on-mnist.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&09.11 Theano 实例:人工神经网络&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/09-theano/09.12-random-streams.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&09.12 Theano 随机数流变量&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/09-theano/09.13-modern-net-on-mnist.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&09.13 Theano 实例:更复杂的网络&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/09-theano/09.14-convolutional-net-on-mnist.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&09.14 Theano 实例:卷积神经网络&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/09-theano/09.15-tensor-basics.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&09.15 Theano tensor 模块:基础&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/09-theano/09.16-tensor-indexing.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&09.16 Theano tensor 模块:索引&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/09-theano/09.17-tensor-operator-and-elementwise-operations.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&09.17 Theano tensor 模块:操作符和逐元素操作&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/09-theano/09.18-tensor-nnet-.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&09.18 Theano tensor 模块:nnet 子模块&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/09-theano/09.19-tensor-conv.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&09.19 Theano tensor 模块:conv 子模块&i class=&icon-external&&&/i&&/a&&/u&&/li&&/ul&&li&&u&10. 有趣的第三方模块&/u&&/li&&ul&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/10-something-interesting/10.01-maps-using-basemap.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&10.01 使用 basemap 画地图&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/10-something-interesting/10.02-maps-using-cartopy.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&10.02 使用 cartopy 画地图&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/10-something-interesting/10.03-nba-data.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&10.03 探索 NBA 数据&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/10-something-interesting/10.04-louis-cha%27s-kungfu-world.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&10.04 金庸的武侠世界&i class=&icon-external&&&/i&&/a&&/u&&/li&&/ul&&li&&u&11. 有用的工具&/u&&/li&&ul&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/11-useful-tools/11.01-pprint.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&11.01 pprint 模块:打印 Python 对象&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/11-useful-tools/11.02-pickle-and-cPickle.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&11.02 pickle, cPickle 模块:序列化 Python 对象&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/11-useful-tools/11.03-json.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&11.03 json 模块:处理 JSON 数据&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/11-useful-tools/11.04-glob.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&11.04 glob 模块:文件模式匹配&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/11-useful-tools/11.05-shutil.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&11.05 shutil 模块:高级文件操作&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/11-useful-tools/11.06-gzip%2C-zipfile%2C-tarfile.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&11.06 gzip, zipfile, tarfile 模块:处理压缩文件&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/11-useful-tools/11.07-logging.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&11.07 logging 模块:记录日志&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/11-useful-tools/11.08-string.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&11.08 string 模块:字符串处理&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/11-useful-tools/11.09-collections.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&11.09 collections 模块:更多数据结构&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/11-useful-tools/11.10-requests.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&11.10 requests 模块:HTTP for Human&i class=&icon-external&&&/i&&/a&&/u&&/li&&/ul&&li&&u&12. Pandas&/u&&/li&&ul&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/12-pandas/12.01-ten-minutes-to-pandas.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&12.01 十分钟上手 Pandas&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/12-pandas/12.02-series-in-pandas.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&12.02 一维数据结构:Series&i class=&icon-external&&&/i&&/a&&/u&&/li&&li&&u&&a href=&///?target=http%3A//nbviewer.jupyter.org/github/lijin-THU/notes-python/blob/master/12-pandas/12.03-dataframe-in-pandas.ipynb& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&12.03 二维数据结构:DataFrame&i class=&icon-external&&&/i&&/a&&/u&&/li&&/ul&&/ul&
Python 其实挺简单的,也挺强大的。我用 Python 做科学计算,自学一年,也记了一年的笔记。笔记链接:Github:Nbviewer:网页: 笔记目录:01. Python 工具
作为一个文科妹子,我在看过几乎所有热门 github 教程之后依旧一头雾水,在近半年的摸索中终于明白啦~新年初,把自己纯小白的学习经验分享一下吧!&br&&br&&b&#什么是 Github ?&br&&/b&必须要放这张图了!!!&br&&figure&&img src=&/7c9d63fb_b.png& data-rawwidth=&600& data-rawheight=&412& class=&origin_image zh-lightbox-thumb& width=&600& data-original=&/7c9d63fb_r.png&&&/figure&(图片来源&a href=&/question//answer/& class=&internal&&GitHub 是怎样的一个存在? - Deep Reader 的回答&/a&)&br&&blockquote&&p&Git 是由 Linux 之父 Linus Tovalds 为了更好地管理linux内核开发而创立的分布式版本控制/软件配置管理软件。&/p&&/blockquote&好吧,我相信看到这里你已经晕了,这也是我一开始看那些所谓经典教程的感受。写这些教程的人都是几年以上的程序员呀,他们往往直接就告诉你所有命令的含义或者整个体系。&br&&blockquote&专家盲点(expert blind spot)就是对一个事物知道的越多,就越发不记得“不知道这个事”的情形。&/blockquote&&br&&b&简单来说,Git 是一个管理你的「代码的历史记录」的工具。&br&&/b&&figure&&img src=&/cd910ad32ac_b.jpg& data-rawwidth=&214& data-rawheight=&164& class=&content_image& width=&214&&&/figure&我不是程序员为什么要学这个啊啊啊!又不要管理代码们!&br&&br&别急,虽然 github 学习门槛高,一会你就知道为什么人人都应该会这个啦!&br&&br&----------------------------&br&&b&学习步骤&/b&&br&&br&##注册安装&br&去官网注册一个账号(这个你应该会,恩就不放链接了)&br&然后,下载一个&a href=&///?target=https%3A///& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&GitHub Desktop&i class=&icon-external&&&/i&&/a& mac客户端是最方便的啦!(命令行什么的真的是会越来越晕!先别管他们!)&br&&br&假设33(珊姗就是我啦)、小四和你三个人一起写一本小说(澄清一下,并没有黑任何人的意思,恩!),暂且叫做...《梦里花落爱吃土时代》&br&--&br&图(脑补)&br&--&br&(⊙v⊙)嗯!终于可以正式开始了!&br&&br&&b&#step1:创建新项目&/b&&br&我们三个人在不同的城市要远程共同写一本书,要有一个漂亮的笔记本吧?&br&&figure&&img src=&/fa17ad198ae_b.png& data-rawwidth=&895& data-rawheight=&334& class=&origin_image zh-lightbox-thumb& width=&895& data-original=&/fa17ad198ae_r.png&&&/figure&&br&「repositories」就是你的笔记本们。你只需知道 Repository 是个放项目的地方就行。有时候会出现 Repositories,是多个 Repository 的意思。&br&&br&**fork**&br&如果你不想新建一个笔记本,看到小四之前写过一个好到炸裂的文章,想把他的直接全部偷过来,修改修改就成你自己的文章了,这应该怎么办呢?&br&github 还提供了一个很赞的功能叫做 fork ,你只需要点击这个神奇的按钮,就可以把他的「笔记本」变成你自己的啦!任意修改都可以哦~&br&&figure&&img src=&/ed6d6fdc68fbfa829997b_b.png& data-rawwidth=&808& data-rawheight=&201& class=&origin_image zh-lightbox-thumb& width=&808& data-original=&/ed6d6fdc68fbfa829997b_r.png&&&/figure&&br&&br&&b&#step2:把「笔记本」克隆到本地&/b&&br&「笔记本」在云端,你要把它摘下来放到自己的电脑上写小说才方便呀,在这里我们叫「clone」是不是很形象?步骤如图:&br&&figure&&img src=&/b5d537f10af3_b.png& data-rawwidth=&838& data-rawheight=&309& class=&origin_image zh-lightbox-thumb& width=&838& data-original=&/b5d537f10af3_r.png&&&/figure&或者是直接去我们的客户端&br&&figure&&img src=&/cde6dbb8be6_b.png& data-rawwidth=&1112& data-rawheight=&773& class=&origin_image zh-lightbox-thumb& width=&1112& data-original=&/cde6dbb8be6_r.png&&&/figure&&br&&b&#step3:可以开始写作啦!&/b&&br&你的笔记本里已经自动有一个文档了,这个时候让我们回到网页版[微笑脸]&br&你只需要在 web 端点开这个README.md可以开始在里面写你的小说了。&br&&figure&&img src=&/5cff90f3bd0cd5e400bcc637_b.png& data-rawwidth=&1024& data-rawheight=&335& class=&origin_image zh-lightbox-thumb& width=&1024& data-original=&/5cff90f3bd0cd5e400bcc637_r.png&&&/figure&或者直接点开刚刚 clone 到电脑上的文件夹直接在里面写。&br&ps:需要注意的是,文本支持 markdown 格式,可以先参考这个&a href=&///?target=http%3A///p/q81RER& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&献给写作者的 Markdown 新手指南&i class=&icon-external&&&/i&&/a&。&br&&br&&b&#step4:上传你写的小说&/b&&br&在本地写完之后你要上传到云端让我和小四都能看见你写出什么幺蛾子了吧?&br&回到客户端,你发现有变化!!!&br&&figure&&img src=&/2e2d2a0da9ef8005ee01f_b.png& data-rawwidth=&517& data-rawheight=&542& class=&origin_image zh-lightbox-thumb& width=&517& data-original=&/2e2d2a0da9ef8005ee01f_r.png&&&/figure&没错,在你头像旁边给你这次提交内容起一个名字,以后如果再次寻找的时候会很方便。然后点下面的 Commit to master,还有右上角的 Sync 就好啦!&br&&br&&b&#step5:回退到之前的版本&/b&&br&夜深人静的时候,我趁着你们都在睡觉把小说的结局偷偷地改成女主死掉了!&br&你醒来觉得我这结局改的也太悲伤了,完全不能接受!结局必须要和之前那样王子公主幸福的生活在一起的 happy ending!&br&问题又来了,怎么退回到我修改结局之前的 happy ending?&br&&br&还是刚刚那个客户端,选择History 然后点击小齿轮,选择潇洒地点 roll back to this commit!&br&你又回到happy ending的状态啦!!&br&&figure&&img src=&/e2b413faf67ea77b36c93_b.png& data-rawwidth=&301& data-rawheight=&223& class=&content_image& width=&301&&&/figure&&br&&b&#step6:&/b&&br&小四写了一章华丽无比的番外,你要更新本地的小说和他写的保持一致怎么办?&br&git pull&br&&figure&&img src=&/f5c5c0b43d1f9f7ab27267fbcc16d9fd_b.png& data-rawwidth=&279& data-rawheight=&354& class=&content_image& width=&279&&&/figure&&br&-----------&br&好了,知道这些基本操作入门应该够了,我们来回顾一下(不要嫌弃我的画工啊喂!)&br&&figure&&img src=&/6c22d708defbc7df2240b_b.png& data-rawwidth=&800& data-rawheight=&600& class=&origin_image zh-lightbox-thumb& width=&800& data-original=&/6c22d708defbc7df2240b_r.png&&&/figure&&br&入门初期迅速得到一些正反馈对于学习一门新技能来说实在是太重要了!尤其是编程这么炫酷的事情!&br&所以先不要管什么复杂的 issue 呀 wiki 呀乱七八糟的操作,按照上面的一步一步来,如果遇到什么问题 google 之,一般都会解决的。&br&&br&有一个段子不就是说,当你遇到问题去找最高级的工程师,他们一般都会直接 google 吗?而且自带的帮助手册也是解决问题的好办法,比如你要新建一个 branch=》&a href=&///?target=https%3A///Kunena/Kunena-Forum/wiki/Create-a-new-branch-with-git-and-manage-branches& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&Create a new branch with git and manage branches · Kunena/Kunena-Forum Wiki · GitHub&i class=&icon-external&&&/i&&/a&&br&&br&&b&这种遇到问题先自己尝试解决的小技巧,也是我自从学编程以来最大的收获。&/b&&br&&br&------------------------&br&&br&&b&#除了写代码你还可以用 github 做什么?&br&&/b&&br&回到文章开头,我又不是程序猿不用写代码玩这个干啥?&br&&br&你有没有碰到过团队里几个人共同协作写一个文档的时候?或者说需要反复修改的东西?比如最简单的写论文,用 word 保存一个一个版本 e-mail 给 boss?下次再找上次修改了什么地方简直要死啊有木有!!!&br&&br&相信你看了我的远程协作写小说的例子应该已经明白了, github 说白了就是一个「版本控制工具」。我们所谓的「回退」到历史记录,随时查看更改了什么地方,利用这个功能可以做的事情简直太多啦!&br&&br&就像 github 其中一位创始人[Chris](&a href=&///?target=https%3A///defunkt& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&defunkt (Chris Wanstrath) · GitHub&i class=&icon-external&&&/i&&/a&)也详细描述了[GitHub初创的前因后果](&a href=&///?target=https%3A///67060& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&Startup Riot 2009 Keynote 路 GitHub&i class=&icon-external&&&/i&&/a&),他说道:&br&&blockquote&&p&Do whatever you want.&/p&&/blockquote&所以不是程序猿可以用这个来做什么呢?&br&&b&1、写书&br&&/b&和 33 一起写小说的例子,还记得吧?几个人你一章我一章共同修改一本书,或是几个出版社的编辑对新书进行校对,利用这个神器就可以随时看到哪里出现了问题和更改。如果想自己写书的话 gitbook 也是不错的选择(又是一个坑。。)&br&&br&&b&2、写文档神器&br&&/b&身为科研狗、产品狗、射鸡湿的你,是不是经常写文档?一个成熟的文档可能会有好几个版本,需要不断地迭代,然后不断提交给老板看哪里需要修改。在不同版本间自如切换就要用到git branch和git rebase了。&br&想想看,用 git 的分支管理不比拷贝粘贴更方便吗?&br&&br&&b&3、健身&br&&/b&有个哥们为了激励自己健身把每日计划都放上去了,还可以邀请其他人一起来相互监督!(我才不会说我自己也开了一个呢哈哈哈)&br&&a href=&///?target=https%3A///hoosin/EveryDaySport& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&hoosin/EveryDaySport · GitHub&i class=&icon-external&&&/i&&/a&&br&&br&&b&4、找男票&br&&/b&没错,看这个项目!利用众包的形式一起罗列男友条件的 list 然后试图自己开发出一个男票233333&br&&a href=&///?target=https%3A///YixuanFranco/YourBoyfriend& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&YixuanFranco/YourBoyfriend · GitHub&i class=&icon-external&&&/i&&/a&&br&有人评论问我用这个找到男票了吗?&br&统一回复:&br&并!没!有!&br&&br&&b&5、用GitHub搭建博客、个人网站或者公司官网&/b&&p&一个有自己域名的独立博客,是不是很帅?!&/p&&p&GitHub本身提供免费的托管服务,又提供了贴心的 Pages 功能,可以绑定你自己的域名,免费、高效、不限流量,做一个个人页面绰绰有余。&/p&&p&Jekyll 的教程和我自己的博客会稍后放出。。(先给自己挖个坑)&/p&&br&&p&&b&6、用GitHub协作翻译&/b&&/p&&p&苹果官方发布的各种官方手册,比如最近开源的 Swift &a href=&///?target=https%3A///numbbbbb/the-swift-programming-language-in-chinese& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&numbbbbb/the-swift-programming-language-in-chinese · GitHub&i class=&icon-external&&&/i&&/a& 就是国内一个自发组织起来的团队,30多个人用9天时间即将翻译和校对工作全部完成,他们每人都还有自己的事情,上班、上线、创业,这么大的工作量在以往简直是不可能完成的任务!&/p&&br&&p&&b&7、项目管理&/b&&/p&&p&GitHub最初是为了开发的管理而生,当然也就具备了项目管理的潜质,特别是与开发密切联系的项目中,它的优势尽显。比如这篇文章介绍了如何使用GitHub结合 Trello 等其它工具进行项目管理:&a href=&///?target=http%3A//xiaocong.github.io/blog//team-collaboration-with-github/& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&使用GitHub进行团队合作&i class=&icon-external&&&/i&&/a&。当然,GitHub还是很偏重开发的管理,一般的项目管理还是适合使用 wortile 之类的产品。&/p&&br&&b&7、政府文件?&/b&&br&之前看到一个知乎回答说:日本政府把宪法放上去了,德国政府也做过类似的事:German Federal Law Now on GitHub。除了德日之外,英美在 GitHub 上也有很多公众服务:英国政府多达 10 页的项目目录:&a href=&///?target=https%3A///alphagov& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&Government Digital Service · GitHub&i class=&icon-external&&&/i&&/a& 其中很多是政府项目的源代码或者设计原则之类。芝加哥的公开地理信息:Forking your CityNew York Open City: City of New York 路 &br&(原谅我找不到这个回答了,欢迎补充)&br&&br&&b&8、科研项目及数据&br&&/b&较早的&a href=&///?target=http%3A//arxiv.org/& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&arXiv&i class=&icon-external&&&/i&&/a&、&a href=&///?target=http%3A//plos.org/& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&PLoS&i class=&icon-external&&&/i&&/a&之外,较有气象的可以推荐&a href=&///?target=http%3A///& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&mendeley&i class=&icon-external&&&/i&&/a&、&a href=&///?target=http%3A//www.doaj.org/& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&开放期刊目录&i class=&icon-external&&&/i&&/a&&br&教育方面:&br&&ul&&li&&a href=&///?target=http%3A///& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&OpenStudy&i class=&icon-external&&&/i&&/a&:一个社会性学习网络,通过互助来更好地学习,主题涉及到计算机、数学、写作等。&/li&&li&&a href=&///?target=http%3A//openhatch.org/& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&openhatch&i class=&icon-external&&&/i&&/a&: 通过练习、任务等帮助新手更好地进入开源社区&/li&&/ul&&b&9、个人简历&br&&/b&&p&GitHub上的代码无法造假,也容易通过你关注的项目来了解你的知识面的宽度与深度。现在越来越多知名公司活跃在GitHub,发布开源库并招募各类人才,例如:&a href=&///?target=https%3A///facebook& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&Facebook&i class=&icon-external&&&/i&&/a&、&a href=&///?target=https%3A///twitter& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&Twitter&i class=&icon-external&&&/i&&/a&、&a href=&///?target=https%3A///yahoo& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&Yahoo&i class=&icon-external&&&/i&&/a& ...&/p&&p&开始有了第三方网站提供基于GitHub的人才招聘服务,例如:&/p&&ul&&li&&a href=&///?target=http%3A///& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&GitHire&i class=&icon-external&&&/i&&/a&:通过它,可以找出你所在地区的程序员。&/li&&li&&a href=&///?target=http%3A///& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&&i class=&icon-external&&&/i&&/a&:通过它,能评估某位程序员在GitHub、LinkedIn、StackOverflow、hackernews等多个网站的影响力。&/li&&/ul&甚至专门有一个项目就是自动根据你的 GtiHub 公开项目创建个人简历:&br&&a href=&/question//answer/& class=&internal&&我们可以使用 Git 以及 GitHub 做哪些事情? - Kane Blueriver 的回答&/a&&br&&br&&b&10、设计资源库(重点来了!!!)&br&&/b&做 ppt 不知道到哪里去找高质量美图?&br&最近半年初入设计圈,收集了不少 bookmark 想在年底来一个总结。 于是自己创建了这个Design- Resource List 项目,旨在让更多的设计师找资源变得有章可循。&br&&br& 先更新一部分,大概还有200多个还没放过来。。(吐血) 所以,欢迎大家也推荐自己收藏的资源,加入这个项目并一起持续更新么么哒 :)&br&&a href=&///?target=https%3A///timmy3131/design-resource& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&timmy3131/design-resource · GitHub&i class=&icon-external&&&/i&&/a&&br&&br&11、&a href=&///?target=https%3A///explore& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&Explore · GitHub&i class=&icon-external&&&/i&&/a& 更多好玩的内容等你自己发现哦&br&&a href=&/question/& class=&internal&&你在 GitHub 上看到过的最有意思的项目是什么? - 调查类问题&/a&&br&&br&-------------------------------------&br&&b&#更多高阶教程:&/b&&br&&b&如果你已经不满足于上面的基础知识了,欢迎探索更高级的玩法!&br&&/b&1、&a href=&///?target=https%3A///GitCafe& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&GitCafe&i class=&icon-external&&&/i&&/a& / &a href=&///?target=https%3A///GitCafe/Help& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&Help&i class=&icon-external&&&/i&&/a&&br&2、[git简明指南](&a href=&///?target=http%3A//rogerdudler.github.io/git-guide/index.zh.html& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&git - the simple guide&i class=&icon-external&&&/i&&/a&)墙裂推荐!漫画的形式很形象(恩我承认比我画的好看多了)&br&&p&3、在线交互学习 github 的网站&a href=&///?target=http%3A//pcottle.github.io/learnGitBranching/%3FNODEMO& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&Learn Git Branching&i class=&icon-external&&&/i&&/a& 这个也很好玩~&/p&&p&4、[GitHub自身的官方博客](&a href=&///?target=https%3A///blog& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&The GitHub Blog · GitHub&i class=&icon-external&&&/i&&/a&)&/p&5、&a href=&///?target=http%3A//danielkummer.github.io/git-flow-cheatsheet/index.zh_CN.html& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&git-flow 备忘清单&i class=&icon-external&&&/i&&/a&&br&&br&&b&入门书籍推荐:&br&&/b&&a href=&///?target=http%3A///subject//& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&GitHub入门与实践 (豆瓣)&i class=&icon-external&&&/i&&/a&比较基础&br&&a href=&///?target=http%3A///subject/3420144/& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&Pro Git (豆瓣)&i class=&icon-external&&&/i&&/a& 更高级的教程,很全面!&br&&br&对了对了,还有阳志平老师的两篇非常全面的旧文(这么称呼好生疏啊2333)&br&&a href=&///?target=http%3A///tech/github.html& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&如何高效利用GitHub&i class=&icon-external&&&/i&&/a&&br&&a href=&///?target=http%3A///tech/git.html& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&Git与Github入门资料&i class=&icon-external&&&/i&&/a&&br&&br&------------------------&br&( ⊙ o ⊙ )啊!知乎居然还不支持 markdown 心好累。。&br&&br&祝大家新年快乐。&br&ps:有朋友问我真的用 github 来写小说吗?&br&o(╯□╰)o只是举例子啊!方便大家理解而已...&br&还是会写一点点代码的(*/ω\*)&br&&br&欢迎各位程序员哥哥们纠错呀,别忘了点赞赞赞!!!!!
作为一个文科妹子,我在看过几乎所有热门 github 教程之后依旧一头雾水,在近半年的摸索中终于明白啦~新年初,把自己纯小白的学习经验分享一下吧! #什么是 Github ? 必须要放这张图了!!! (图片来源) …
&figure&&img src=&/v2-9e1790175cacd9a5f5d68_b.jpg& data-rawwidth=&680& data-rawheight=&383& class=&origin_image zh-lightbox-thumb& width=&680& data-original=&/v2-9e1790175cacd9a5f5d68_r.jpg&&&/figure&&p&写代码就是学一门语言然后开始撸代码吗?看完了我的《GoF设计模式》系列文章的同学或者本身已经就是老鸟的同学显然不会这么认为。编程是一项非常严谨的工作!虽然我们自嘲为码农,但是这工作毕竟不是真正的搬砖,我们是软件工程师。编程需要关注的问题太多,不仅仅有语言,还有算法、数据结构、编程技巧、编码风格、设计、架构、工程化、开发工具、团队协作等方方面面,涉及到很多层面的问题。本文将分享一下根据我这几年来的编程经验总结出的一些关于如何写代码的个人见解。&/p&&p&由于“跟我混”的一些小伙伴编程功底相对来说比较薄弱,所以在此总结一篇“编程内功心法”帮助他们渡过职业生涯的第一个瓶颈期。顺便,也造福一下路过的有缘的同学!于是有了此文。&/p&&p&&b&前言&/b&&/p&&p&首先,思考一个问题,何谓编程?编程就是写代码吗?&/p&&blockquote&所谓的编程,其实就是不断的对这个现实世界中的问题建立模型并将其固化为代码自动化执行的过程。&br&~ Bug辉 《GoF设计模式 - 解释器模式》&/blockquote&&p&在对问题建立模型的过程中,我们会遇到非常多不同层面的问题,所以我们需要很多领域的知识去解决这些问题。&/p&&ul&&li&我们需要管理被操作的数据,因为数据与数据之前是相互有关联的。将数据结构化,通常是编程的第一步。关于结构化数据的相关理论以及实践,需要有一个专门的学科分支或者说课题去研究——&b&数据结构&/b&。&/li&&li&我们需要解决一个具体的问题,这个具体的问题如何一步步去解决,过程是怎么样子的——&b&算法&/b&。&/li&&li&我们需要将解决方案进行自动化,并以代码的形式进行交付——编程语言。&br&如果将一个抽象的模型进行编码实现,如何实现“这个功能”,如何实现“那个功能”——&b&编程技巧&/b&。&/li&&li&问题的规模大了,众多代码糅合在一起,连程序员自己都看不懂了!怎么来拆分、模块化这些代码——&b&设计&/b&。&/li&&li&代码量已经到了一个人无法完成的地步了,需要团队分工合作才能完成了——&b&工程化&/b&。&/li&&li&你写的代码我看不懂,没法调用或者很难调用,我写的代码你也看不懂,或者很难看懂。还怎么愉快的玩耍——编码风格/编码规范。&br&问题的规模继续扩大,到了系统工程的规模了,之前学的套路已经不管用了!怎么来构建这个系统才能实现正确、安全、高性能、高可用——&b&架构&/b&。&br&然而这些也只是一个系统工程中的冰山一角!这是一个庞大的体系。也正是因为软件开发需要考虑到的问题太多且团队成员水品参差不齐,所以团队开发中并不是每个程序员做的事情都是一样的。每个人都有自己的角色、初级工程师、中级工程师、高级工程师、架构师、CTO。。。&/li&&/ul&&p&所以编程不仅仅只是堆砌代码!&/p&&p&说到这里,我想起来了一件事情——为啥业界普遍鄙视培训出来半道出家的新人?人与人的区别是很大的!我见过培训出来也很牛的。其实,说到底,被鄙视的并不是所有人。而是那些培训了几个月之后发现随便找个工作也能拿“高薪”然后还自认为编程很简单的新人。因为这种经历给了他们一种错觉——编程如此简单,我培训几个月也会嘛!有点像刚学会开车的新司机,很嚣张的对老司机说“开车很简单嘛!你看我也会啊!”。语言和开发工具只是招式,这是外功。而编程思想、经验是内功。这些内功并不是靠短短几个月的培训能够掌握的,这一点有点像中国制造业和日本制造业的区别。动不动赶英超美可不好。。。&/p&&p&编程并不简单!这是一件很严肃的事情。不过今天,我没有办法介绍完所有的方面!或者说,到今天为止,我也并没能掌握所有领域的知识。所以今天我只是分享一些关于编码本身的一些经验。&/p&&p&另外,本文主要分享如何写代码,并不是如何用Java写代码。所以文章中各种语言都有可能出现。&/p&&p&&b&编码风格&/b&&/p&&p&先来一个圈内的段子。&br&大部分程序员在工作中都很讨厌这四件事情:&br&1.写注释&br&2.写文档&br&3.别人不写注释&br&4.别人不写文档&br&o(∩_∩)o 哈哈。。中枪了没!&/p&&p&这个段子其实反映出来一个问题,即大部分代码都需要通过大量注释和文档来说明才能将意图传达给维护这些代码的程序员!然而,就像上面的段子说的那样,写大量的注释和文档其实是一件很麻烦的事情。所以很多时候,由于嫌麻烦,注释和文档就没写,导致维护代码的人相当的痛苦。这个苦同学们肯定都是体会过的!相当于给你个精密仪器要你维护还不给说明书。&/p&&p&其实,打破上面那个段子描述的那个怪圈的一个很有效的手段就是统一编码风格。优秀的代码可以实现代码即注释,代码本身就可以非常清晰的体现出它的意图来,让别人可以很容易读懂。这就是所谓的可读性!&/p&&p&&b&命名&/b&&/p&&p&计算机科学领域中最难的两件事是命名和缓存失效!命名并不简单,很复杂。好的名字可以见名知意,非常容易理解。之所以说命名难是因为命名的过程同时也是概念提取的过程!对问题建立模型,需要提取概念并赋予其“术语”。这个过程其实是“万里长征”中最难的一步。毕竟,设计也好,架构也罢,都有成熟的套路可以参考。唯独这个过程,是需要程序设计者自己进行充分的思考的创造性工作!&/p&&p&以下是总结出来的一些命名经验:&/p&&ul&&li&一个类是某物、某事、某人的抽象,是数据与行为的集合体。这恰好符合名词的定义,因此 &b&类名&/b& 是一个名词!&/li&&li&&b&方法名&/b& 或者说 &b&函数名&/b& 是某操作或者某过程的抽象,是一个动作。这恰好符合动词的定义,因此函数名通常是一个动词。&br&变量名宁可长一些说明清楚用途也不要用a、b、c之类的无意义的名称,除非是循环计数器中用i、j、k等约定俗成的一些变量名。比如pageIndex和pageSize就要比取名成i和s好!取成这种和用混淆器混淆过后的代码一样的名称没有什么好处,如果算法比较复杂的话,过一段时间恐怕自己都会看不懂。&br&变量名最好包含变量本身的业务含义。比如List&Student& studentList = new ArrayList&&();就比List&Student& list = new ArrayList&&();好很多。如果同一段代码里再出现一个List&Teacher&的话,这样就可以很方便的取名为teacherList或者teachers而不是list1和list2这样的毫无意义的名称!英文不好怎么办&/li&&/ul&&p&这个问题怎么说呢。。&br&作为一名程序员吧,基础的英文还是要懂的。要不然发展也容易遇到天花板,学不好编程的。毕竟,最新的技术、解决方案、工具都是从国外传过来的。如果是解决一些基础性的问题,每天只做做CRUD,好像英文确实不怎么用得上。但是一旦遇到一些实质性问题,恐怕只能到英文网站上找喽!ㄟ(▔ ,▔)ㄏ 不要跟我说你编程可以不需要Stack Overflow。copying and pasting from stackoverflow 可是终极编程大法!o(∩_∩)o 这句话可是编程的真谛啊!(如果你看不懂这个梗那你有可能是伪程序员)&/p&&p&其实,话说回来,实在不方便用英文的时候,我认为也可以用拼音命名。这个问题上可以务实一点,量力而行。但是,拼音和英语混用的做法就不太好了。最好别这样!逼格不高。&/p&&p&&b&注释&/b&&/p&&h2&怎么添加代码注释&/h2&&p&关于注释,我们需要解决的第一个问题是如何添加代码注释。&/p&&p&对于Java、C#之类的语言,有专用的文档注释语法,很好处理。对于C/C++,则按约定的格式说明一下类和函数、代码片段的作用和意图即可,至少编译器会进行静态检查。在&b&Python&/b&中,有更牛逼的文档字符串这样的语言级特性支持,看注释用help()很方便。不过对于Lua这样的弱类型解释型语言,注释就比较难处理了。这里以&b&Lua&/b&为例给出一种注释的解决方案。&/p&&p&借用Java语言文档注释的风格。&/p&&p&文件注释,或者说类/模块注释。&/p&&div class=&highlight&&&pre&&code class=&language-text&&&span&&/span&--[[
Object-oriented helper functions for Lua
@author: Elvin Zeng
&/code&&/pre&&/div&&p&函数注释&/p&&p&-&/p&&div class=&highlight&&&pre&&code class=&language-text&&&span&&/span&-[[
create a class with specified super class.
if number of parameters is zero, derived class will extends from {}.
@param superClass super class of target class
@return derived class
local function createClass(superClass)
local derivedClass = {}
省略一堆代码
return derivedClass
register a new account
@param user
username = &username&,
password = &password&
@return registered user
local function register(user)
&/code&&/pre&&/div&&p&tips: Lua中可以通过metatable机制实现类和继承,这一点与Javascript通过原型机制来实现类和继承有点类似。&/p&&p&注释里该写些什么&/p&&p&我们首先来看个反例。&/p&&div class=&highlight&&&pre&&code class=&language-text&&&span&&/span&/**
public List&Article& queryPage(int pageSize, int pageIndex) throws PageIndexOutOfBoundsException {
定义一个整型变量
省略一堆代码
&/code&&/pre&&/div&&p&首先这个方法名本身就取得不好,这个暂且不说,先说注释问题。这里的注释犯了几个错:&/p&&p&1.方法注释为“查询”,这简直就是废话!方法名已经告诉别人这是查询方法了,还在这个注释里写这两个字有什么意义呢?而且到底查询些什么这里也没说!&br&2.参数没有注释。没有描述每一个参数的意义以及取值范围等!&br&3.什么情况下会抛出PageIndexOutOfBoundsException没有描述清楚。&br&4.“定义一个整型变量”这种垃圾注释就不要写了,这么简单的语句谁看不懂啊!如果要注释,也是写上这个变量的含义。&br&这里我们先不考虑设计问题(分页索引号最好做成可以自己调整成合理值),下面再来看改善注释之后的代码。&/p&&div class=&highlight&&&pre&&code class=&language-text&&&span&&/span&/**
* 列出指定分页的文章
* @param pageSize 分页大小。如果等于0则表示查询出所有文章。
* @param pageIndex 分页索引号。必须为一个大于0的整数,第一页索引为1。
* @return 指定分页的文章列表
* @throws PageIndexOutOfBoundsException 当分页索引号超出正常范围时抛出,即pageIndex小于0或大于最大页索引时。
public List&Article& listArticle(int pageSize, int pageIndex) throws PageIndexOutOfBoundsException{
第一条文章记录在MySql数据库中的偏移量
省略一堆代码
&/code&&/pre&&/div&&p&改完之后的注释有没有感觉信息更全很多!虽然说代码本身就是最好的注释,但是必要的注释还是得写上去,毕竟调用的时候别人没法猜测

我要回帖

更多关于 不思议迷宫 炎魔之手 的文章

 

随机推荐