diff --git a/.gitignore b/.gitignore
index 83c93dd7..74e3c236 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,3 +6,4 @@
static-files/*
/*/novels/*
/*/*.model
+.DS_Store
diff --git a/06-matplotlib/06.04-working-with-text---math-expression.ipynb b/06-matplotlib/06.04-working-with-text---math-expression.ipynb
index a36032f6..e968e039 100644
--- a/06-matplotlib/06.04-working-with-text---math-expression.ipynb
+++ b/06-matplotlib/06.04-working-with-text---math-expression.ipynb
@@ -208,7 +208,7 @@
"`\\grave a`| $\\grave a$\n",
"`\\hat a`| $\\hat a$\n",
"`\\tilde a` | $\\tilde a$\n",
- "`\\4vec a` | $\\vec a$\n",
+ "`\\vec a` | $\\vec a$\n",
"`\\overline{abc}`|$\\overline{abc}$\n",
"`\\widehat{xyz}`|$\\widehat{xyz}$\n",
"`\\widetilde{xyz}`|$\\widetilde{xyz}$"
diff --git a/06-matplotlib/06.09-do-not-trust-the-defaults.ipynb b/06-matplotlib/06.09-do-not-trust-the-defaults.ipynb
index 2e050f92..8d2b1835 100644
--- a/06-matplotlib/06.09-do-not-trust-the-defaults.ipynb
+++ b/06-matplotlib/06.09-do-not-trust-the-defaults.ipynb
@@ -571,7 +571,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
- "我们可以使用 `anotate` 函数来注释特殊的点,假设我们要显示的点是 $2\\pi/3$:"
+ "我们可以使用 `annotate` 函数来注释特殊的点,假设我们要显示的点是 $2\\pi/3$:"
]
},
{
diff --git a/README.md b/README.md
index 2843f604..b4e87c1f 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,3 @@
-
[](https://github.com/lijin-thu/notes-python)
# 中文 Python 笔记
@@ -7,8 +6,23 @@
> 作者:李金
> 邮件:lijinwithyou@gmail.com
+由于涉及著作权的问题,对基于本笔记所做的修订、改编,目前不做任何正式授权。
+
+笔记内容仅供学习参考,未经允许,请勿用于任何商业用途。
+
`Github` 加载 `.ipynb` 的速度较慢,建议在 [Nbviewer](http://nbviewer.ipython.org/github/lijin-THU/notes-python/blob/master/index.ipynb) 中查看该项目。
+基于本笔记的实体书:《自学Python——编程基础、科学计算及数据分析》已经出版。
+
+京东自营链接:
+https://item.jd.com/12328920.html
+
+天猫、亚马逊、当当均有销售。
+
+**打赏一下意思意思?**
+
+
+
---
## 简介
@@ -21,14 +35,14 @@
推荐使用 [Anaconda](http://www.continuum.io/downloads),这个IDE集成了大部分常用的包。
-笔记内容使用 `ipython notebook` 来展示。
+笔记内容使用 `jupyter notebook` 来展示。
安装好 `Python` 和相应的包之后,可以在命令行下输入:
```
-$ ipython notebook
+$ jupyter notebook
```
-来进入 `ipython notebook`。
+来进入 `jupyter notebook`。
----
@@ -214,8 +228,4 @@ conda update anaconda
- [12. **Pandas**](12-pandas)
- [12.01 十分钟上手 Pandas](12-pandas/12.01-ten-minutes-to-pandas.ipynb)
- [12.02 一维数据结构:Series](12-pandas/12.02-series-in-pandas.ipynb)
- - [12.03 二维数据结构:DataFrame](12-pandas/12.03-dataframe-in-pandas.ipynb)
-
-觉得有用打赏一下?
-
-
+ - [12.03 二维数据结构:DataFrame](12-pandas/12.03-dataframe-in-pandas.ipynb)
\ No newline at end of file
diff --git a/generate_static_files.ipynb b/generate_static_files.ipynb
index bfcb21d3..0d03cf78 100644
--- a/generate_static_files.ipynb
+++ b/generate_static_files.ipynb
@@ -10,9 +10,7 @@
{
"cell_type": "code",
"execution_count": 1,
- "metadata": {
- "collapsed": true
- },
+ "metadata": {},
"outputs": [],
"source": [
"import os\n",
@@ -31,9 +29,7 @@
{
"cell_type": "code",
"execution_count": 2,
- "metadata": {
- "collapsed": true
- },
+ "metadata": {},
"outputs": [],
"source": [
"if not os.path.exists('static-files'):\n",
@@ -53,9 +49,7 @@
{
"cell_type": "code",
"execution_count": 3,
- "metadata": {
- "collapsed": true
- },
+ "metadata": {},
"outputs": [],
"source": [
"folders = ['01-python-tools', \n",
@@ -83,9 +77,7 @@
{
"cell_type": "code",
"execution_count": 4,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [],
"source": [
"file_names = []\n",
@@ -98,9 +90,7 @@
{
"cell_type": "code",
"execution_count": 5,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [],
"source": [
"def convert_to_files(names, to_format):\n",
@@ -108,13 +98,9 @@
" for folder in folders:\n",
" if not os.path.exists(os.path.join(target_dir, folder)):\n",
" os.makedirs(os.path.join(target_dir, folder))\n",
- " converter = {\n",
- " \"html\": nbconvert.export_html,\n",
- " \"python\": nbconvert.export_python\n",
- " }\n",
" \n",
" for file_name in names:\n",
- " p = converter[to_format](file_name)\n",
+ " p = nbconvert.export(nbconvert.get_exporter(to_format), file_name)\n",
" with open(os.path.join(target_dir, file_name[:-6] + p[1][\"output_extension\"]), 'w') as f:\n",
" f.write(p[0].encode(\"utf-8\"))\n",
" print file_name"
@@ -130,155 +116,153 @@
{
"cell_type": "code",
"execution_count": 6,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
- "01-python-tools\\01.01-python-overview.ipynb\n",
- "01-python-tools\\01.02-ipython-interpreter.ipynb\n",
- "01-python-tools\\01.03-ipython-notebook.ipynb\n",
- "01-python-tools\\01.04-use-anaconda.ipynb\n",
- "02-python-essentials\\02.01-a-tour-of-python.ipynb\n",
- "02-python-essentials\\02.02-python-data-types.ipynb\n",
- "02-python-essentials\\02.03-numbers.ipynb\n",
- "02-python-essentials\\02.04-strings.ipynb\n",
- "02-python-essentials\\02.05-indexing-and-slicing.ipynb\n",
- "02-python-essentials\\02.06-lists.ipynb\n",
- "02-python-essentials\\02.07-mutable-and-immutable-data-types.ipynb\n",
- "02-python-essentials\\02.08-tuples.ipynb\n",
- "02-python-essentials\\02.09-speed-comparison-between-list-&-tuple.ipynb\n",
- "02-python-essentials\\02.10-dictionaries.ipynb\n",
- "02-python-essentials\\02.11-sets.ipynb\n",
- "02-python-essentials\\02.12-frozen-sets.ipynb\n",
- "02-python-essentials\\02.13-how-python-assignment-works.ipynb\n",
- "02-python-essentials\\02.14-if-statement.ipynb\n",
- "02-python-essentials\\02.15-loops.ipynb\n",
- "02-python-essentials\\02.16-list-comprehension.ipynb\n",
- "02-python-essentials\\02.17-functions.ipynb\n",
- "02-python-essentials\\02.18-modules-and-packages.ipynb\n",
- "02-python-essentials\\02.19-exceptions.ipynb\n",
- "02-python-essentials\\02.20-warnings.ipynb\n",
- "02-python-essentials\\02.21-file-IO.ipynb\n",
- "03-numpy\\03.01-numpy-overview.ipynb\n",
- "03-numpy\\03.02-matplotlib-basics.ipynb\n",
- "03-numpy\\03.03-numpy-arrays.ipynb\n",
- "03-numpy\\03.04-array-types.ipynb\n",
- "03-numpy\\03.05-array-calculation-method.ipynb\n",
- "03-numpy\\03.06-sorting-numpy-arrays.ipynb\n",
- "03-numpy\\03.07-array-shapes.ipynb\n",
- "03-numpy\\03.08-diagonals.ipynb\n",
- "03-numpy\\03.09-data-to-&-from-string.ipynb\n",
- "03-numpy\\03.10-array-attribute-&-method-overview-.ipynb\n",
- "03-numpy\\03.11-array-creation-functions.ipynb\n",
- "03-numpy\\03.12-matrix-object.ipynb\n",
- "03-numpy\\03.13-general-functions.ipynb\n",
- "03-numpy\\03.14-vectorizing-functions.ipynb\n",
- "03-numpy\\03.15-binary-operators.ipynb\n",
- "03-numpy\\03.16-universal-functions.ipynb\n",
- "03-numpy\\03.17-choose.ipynb\n",
- "03-numpy\\03.18-array-broadcasting.ipynb\n",
- "03-numpy\\03.19-reading-and-writing-arrays.ipynb\n",
- "03-numpy\\03.20-structured-arrays.ipynb\n",
- "03-numpy\\03.21-record-arrays.ipynb\n",
- "03-numpy\\03.22-memory-maps.ipynb\n",
- "03-numpy\\03.23-from-matlab-to-numpy.ipynb\n",
- "04-scipy\\04.01-scienticfic-python-overview.ipynb\n",
- "04-scipy\\04.02-interpolation-with-scipy.ipynb\n",
- "04-scipy\\04.03-statistics-with-scipy.ipynb\n",
- "04-scipy\\04.04-curve-fitting.ipynb\n",
- "04-scipy\\04.05-minimization-in-python.ipynb\n",
- "04-scipy\\04.06-integration-in-python.ipynb\n",
- "04-scipy\\04.07-ODEs.ipynb\n",
- "04-scipy\\04.08-sparse-matrix.ipynb\n",
- "04-scipy\\04.09-linear-algbra.ipynb\n",
- "04-scipy\\04.10-sparse-linear-algebra.ipynb\n",
- "05-advanced-python\\05.01-overview-of-the-sys-module.ipynb\n",
- "05-advanced-python\\05.02-interacting-with-the-OS---os.ipynb\n",
- "05-advanced-python\\05.03-comma-separated-values.ipynb\n",
- "05-advanced-python\\05.04-regular-expression.ipynb\n",
- "05-advanced-python\\05.05-datetime.ipynb\n",
- "05-advanced-python\\05.06-sql-databases.ipynb\n",
- "05-advanced-python\\05.07-object-relational-mappers.ipynb\n",
- "05-advanced-python\\05.08-functions.ipynb\n",
- "05-advanced-python\\05.09-iterators.ipynb\n",
- "05-advanced-python\\05.10-generators.ipynb\n",
- "05-advanced-python\\05.11-context-managers-and-the-with-statement.ipynb\n",
- "05-advanced-python\\05.12-decorators.ipynb\n",
- "05-advanced-python\\05.13-decorator-usage.ipynb\n",
- "05-advanced-python\\05.14-the-operator-functools-itertools-toolz-fn-funcy-module.ipynb\n",
- "05-advanced-python\\05.15-scope.ipynb\n",
- "05-advanced-python\\05.16-dynamic-code-execution.ipynb\n",
- "06-matplotlib\\06.01-pyplot-tutorial.ipynb\n",
- "06-matplotlib\\06.02-customizing-plots-with-style-sheets.ipynb\n",
- "06-matplotlib\\06.03-working-with-text---basic.ipynb\n",
- "06-matplotlib\\06.04-working-with-text---math-expression.ipynb\n",
- "06-matplotlib\\06.05-image-tutorial.ipynb\n",
- "06-matplotlib\\06.06-annotating-axes.ipynb\n",
- "06-matplotlib\\06.07-legend.ipynb\n",
- "06-matplotlib\\06.08-figures,-subplots,-axes-and-ticks.ipynb\n",
- "06-matplotlib\\06.09-do-not-trust-the-defaults.ipynb\n",
- "06-matplotlib\\06.10-different-plots.ipynb\n",
- "07-interfacing-with-other-languages\\07.01-introduction.ipynb\n",
- "07-interfacing-with-other-languages\\07.02-python-extension-modules.ipynb\n",
- "07-interfacing-with-other-languages\\07.03-cython-part-1.ipynb\n",
- "07-interfacing-with-other-languages\\07.04-cython-part-2.ipynb\n",
- "07-interfacing-with-other-languages\\07.05-cython-part-3.ipynb\n",
- "07-interfacing-with-other-languages\\07.06-cython-part-4.ipynb\n",
- "07-interfacing-with-other-languages\\07.07-profiling-with-annotations.ipynb\n",
- "07-interfacing-with-other-languages\\07.08-ctypes.ipynb\n",
- "08-object-oriented-programming\\08.01-oop-introduction.ipynb\n",
- "08-object-oriented-programming\\08.02-using-oop-model-a-forest-fire.ipynb\n",
- "08-object-oriented-programming\\08.03-what-is-a-object.ipynb\n",
- "08-object-oriented-programming\\08.04-writing-classes.ipynb\n",
- "08-object-oriented-programming\\08.05-special-method.ipynb\n",
- "08-object-oriented-programming\\08.06-properties.ipynb\n",
- "08-object-oriented-programming\\08.07-forest-fire-simulation.ipynb\n",
- "08-object-oriented-programming\\08.08-inheritance.ipynb\n",
- "08-object-oriented-programming\\08.09-super.ipynb\n",
- "08-object-oriented-programming\\08.10-refactoring-the-forest-fire-simutation.ipynb\n",
- "08-object-oriented-programming\\08.11-interfaces.ipynb\n",
- "08-object-oriented-programming\\08.12-public-private-special-in-python.ipynb\n",
- "08-object-oriented-programming\\08.13-multiple-inheritance.ipynb\n",
- "09-theano\\09.01-introduction-and-installation.ipynb\n",
- "09-theano\\09.02-theano-basics.ipynb\n",
- "09-theano\\09.03-gpu-on-windows.ipynb\n",
- "09-theano\\09.04-graph-structures.ipynb\n",
- "09-theano\\09.05-configuration-settings-and-compiling-modes.ipynb\n",
- "09-theano\\09.06-conditions-in-theano.ipynb\n",
- "09-theano\\09.07-loop-with-scan.ipynb\n",
- "09-theano\\09.08-linear-regression.ipynb\n",
- "09-theano\\09.09-logistic-regression-.ipynb\n",
- "09-theano\\09.10-softmax-on-mnist.ipynb\n",
- "09-theano\\09.11-net-on-mnist.ipynb\n",
- "09-theano\\09.12-random-streams.ipynb\n",
- "09-theano\\09.13-modern-net-on-mnist.ipynb\n",
- "09-theano\\09.14-convolutional-net-on-mnist.ipynb\n",
- "09-theano\\09.15-tensor-basics.ipynb\n",
- "09-theano\\09.16-tensor-indexing.ipynb\n",
- "09-theano\\09.17-tensor-operator-and-elementwise-operations.ipynb\n",
- "09-theano\\09.18-tensor-nnet-.ipynb\n",
- "09-theano\\09.19-tensor-conv.ipynb\n",
- "10-something-interesting\\10.01-maps-using-basemap.ipynb\n",
- "10-something-interesting\\10.02-maps-using-cartopy.ipynb\n",
- "10-something-interesting\\10.03-nba-data.ipynb\n",
- "10-something-interesting\\10.04-louis-cha's-kungfu-world.ipynb\n",
- "11-useful-tools\\11.01-pprint.ipynb\n",
- "11-useful-tools\\11.02-pickle-and-cPickle.ipynb\n",
- "11-useful-tools\\11.03-json.ipynb\n",
- "11-useful-tools\\11.04-glob.ipynb\n",
- "11-useful-tools\\11.05-shutil.ipynb\n",
- "11-useful-tools\\11.06-gzip,-zipfile,-tarfile.ipynb\n",
- "11-useful-tools\\11.07-logging.ipynb\n",
- "11-useful-tools\\11.08-string.ipynb\n",
- "11-useful-tools\\11.09-collections.ipynb\n",
- "11-useful-tools\\11.10-requests.ipynb\n",
- "12-pandas\\12.01-ten-minutes-to-pandas.ipynb\n",
- "12-pandas\\12.02-series-in-pandas.ipynb\n",
- "12-pandas\\12.03-dataframe-in-pandas.ipynb\n"
+ "01-python-tools/01.01-python-overview.ipynb\n",
+ "01-python-tools/01.02-ipython-interpreter.ipynb\n",
+ "01-python-tools/01.03-ipython-notebook.ipynb\n",
+ "01-python-tools/01.04-use-anaconda.ipynb\n",
+ "02-python-essentials/02.01-a-tour-of-python.ipynb\n",
+ "02-python-essentials/02.02-python-data-types.ipynb\n",
+ "02-python-essentials/02.03-numbers.ipynb\n",
+ "02-python-essentials/02.04-strings.ipynb\n",
+ "02-python-essentials/02.05-indexing-and-slicing.ipynb\n",
+ "02-python-essentials/02.06-lists.ipynb\n",
+ "02-python-essentials/02.07-mutable-and-immutable-data-types.ipynb\n",
+ "02-python-essentials/02.08-tuples.ipynb\n",
+ "02-python-essentials/02.09-speed-comparison-between-list-&-tuple.ipynb\n",
+ "02-python-essentials/02.10-dictionaries.ipynb\n",
+ "02-python-essentials/02.11-sets.ipynb\n",
+ "02-python-essentials/02.12-frozen-sets.ipynb\n",
+ "02-python-essentials/02.13-how-python-assignment-works.ipynb\n",
+ "02-python-essentials/02.14-if-statement.ipynb\n",
+ "02-python-essentials/02.15-loops.ipynb\n",
+ "02-python-essentials/02.16-list-comprehension.ipynb\n",
+ "02-python-essentials/02.17-functions.ipynb\n",
+ "02-python-essentials/02.18-modules-and-packages.ipynb\n",
+ "02-python-essentials/02.19-exceptions.ipynb\n",
+ "02-python-essentials/02.20-warnings.ipynb\n",
+ "02-python-essentials/02.21-file-IO.ipynb\n",
+ "03-numpy/03.01-numpy-overview.ipynb\n",
+ "03-numpy/03.02-matplotlib-basics.ipynb\n",
+ "03-numpy/03.03-numpy-arrays.ipynb\n",
+ "03-numpy/03.04-array-types.ipynb\n",
+ "03-numpy/03.05-array-calculation-method.ipynb\n",
+ "03-numpy/03.06-sorting-numpy-arrays.ipynb\n",
+ "03-numpy/03.07-array-shapes.ipynb\n",
+ "03-numpy/03.08-diagonals.ipynb\n",
+ "03-numpy/03.09-data-to-&-from-string.ipynb\n",
+ "03-numpy/03.10-array-attribute-&-method-overview-.ipynb\n",
+ "03-numpy/03.11-array-creation-functions.ipynb\n",
+ "03-numpy/03.12-matrix-object.ipynb\n",
+ "03-numpy/03.13-general-functions.ipynb\n",
+ "03-numpy/03.14-vectorizing-functions.ipynb\n",
+ "03-numpy/03.15-binary-operators.ipynb\n",
+ "03-numpy/03.16-universal-functions.ipynb\n",
+ "03-numpy/03.17-choose.ipynb\n",
+ "03-numpy/03.18-array-broadcasting.ipynb\n",
+ "03-numpy/03.19-reading-and-writing-arrays.ipynb\n",
+ "03-numpy/03.20-structured-arrays.ipynb\n",
+ "03-numpy/03.21-record-arrays.ipynb\n",
+ "03-numpy/03.22-memory-maps.ipynb\n",
+ "03-numpy/03.23-from-matlab-to-numpy.ipynb\n",
+ "04-scipy/04.01-scienticfic-python-overview.ipynb\n",
+ "04-scipy/04.02-interpolation-with-scipy.ipynb\n",
+ "04-scipy/04.03-statistics-with-scipy.ipynb\n",
+ "04-scipy/04.04-curve-fitting.ipynb\n",
+ "04-scipy/04.05-minimization-in-python.ipynb\n",
+ "04-scipy/04.06-integration-in-python.ipynb\n",
+ "04-scipy/04.07-ODEs.ipynb\n",
+ "04-scipy/04.08-sparse-matrix.ipynb\n",
+ "04-scipy/04.09-linear-algbra.ipynb\n",
+ "04-scipy/04.10-sparse-linear-algebra.ipynb\n",
+ "05-advanced-python/05.01-overview-of-the-sys-module.ipynb\n",
+ "05-advanced-python/05.02-interacting-with-the-OS---os.ipynb\n",
+ "05-advanced-python/05.03-comma-separated-values.ipynb\n",
+ "05-advanced-python/05.04-regular-expression.ipynb\n",
+ "05-advanced-python/05.05-datetime.ipynb\n",
+ "05-advanced-python/05.06-sql-databases.ipynb\n",
+ "05-advanced-python/05.07-object-relational-mappers.ipynb\n",
+ "05-advanced-python/05.08-functions.ipynb\n",
+ "05-advanced-python/05.09-iterators.ipynb\n",
+ "05-advanced-python/05.10-generators.ipynb\n",
+ "05-advanced-python/05.11-context-managers-and-the-with-statement.ipynb\n",
+ "05-advanced-python/05.12-decorators.ipynb\n",
+ "05-advanced-python/05.13-decorator-usage.ipynb\n",
+ "05-advanced-python/05.14-the-operator-functools-itertools-toolz-fn-funcy-module.ipynb\n",
+ "05-advanced-python/05.15-scope.ipynb\n",
+ "05-advanced-python/05.16-dynamic-code-execution.ipynb\n",
+ "06-matplotlib/06.01-pyplot-tutorial.ipynb\n",
+ "06-matplotlib/06.02-customizing-plots-with-style-sheets.ipynb\n",
+ "06-matplotlib/06.03-working-with-text---basic.ipynb\n",
+ "06-matplotlib/06.04-working-with-text---math-expression.ipynb\n",
+ "06-matplotlib/06.05-image-tutorial.ipynb\n",
+ "06-matplotlib/06.06-annotating-axes.ipynb\n",
+ "06-matplotlib/06.07-legend.ipynb\n",
+ "06-matplotlib/06.08-figures,-subplots,-axes-and-ticks.ipynb\n",
+ "06-matplotlib/06.09-do-not-trust-the-defaults.ipynb\n",
+ "06-matplotlib/06.10-different-plots.ipynb\n",
+ "07-interfacing-with-other-languages/07.01-introduction.ipynb\n",
+ "07-interfacing-with-other-languages/07.02-python-extension-modules.ipynb\n",
+ "07-interfacing-with-other-languages/07.03-cython-part-1.ipynb\n",
+ "07-interfacing-with-other-languages/07.04-cython-part-2.ipynb\n",
+ "07-interfacing-with-other-languages/07.05-cython-part-3.ipynb\n",
+ "07-interfacing-with-other-languages/07.06-cython-part-4.ipynb\n",
+ "07-interfacing-with-other-languages/07.07-profiling-with-annotations.ipynb\n",
+ "07-interfacing-with-other-languages/07.08-ctypes.ipynb\n",
+ "08-object-oriented-programming/08.01-oop-introduction.ipynb\n",
+ "08-object-oriented-programming/08.02-using-oop-model-a-forest-fire.ipynb\n",
+ "08-object-oriented-programming/08.03-what-is-a-object.ipynb\n",
+ "08-object-oriented-programming/08.04-writing-classes.ipynb\n",
+ "08-object-oriented-programming/08.05-special-method.ipynb\n",
+ "08-object-oriented-programming/08.06-properties.ipynb\n",
+ "08-object-oriented-programming/08.07-forest-fire-simulation.ipynb\n",
+ "08-object-oriented-programming/08.08-inheritance.ipynb\n",
+ "08-object-oriented-programming/08.09-super.ipynb\n",
+ "08-object-oriented-programming/08.10-refactoring-the-forest-fire-simutation.ipynb\n",
+ "08-object-oriented-programming/08.11-interfaces.ipynb\n",
+ "08-object-oriented-programming/08.12-public-private-special-in-python.ipynb\n",
+ "08-object-oriented-programming/08.13-multiple-inheritance.ipynb\n",
+ "09-theano/09.01-introduction-and-installation.ipynb\n",
+ "09-theano/09.02-theano-basics.ipynb\n",
+ "09-theano/09.03-gpu-on-windows.ipynb\n",
+ "09-theano/09.04-graph-structures.ipynb\n",
+ "09-theano/09.05-configuration-settings-and-compiling-modes.ipynb\n",
+ "09-theano/09.06-conditions-in-theano.ipynb\n",
+ "09-theano/09.07-loop-with-scan.ipynb\n",
+ "09-theano/09.08-linear-regression.ipynb\n",
+ "09-theano/09.09-logistic-regression-.ipynb\n",
+ "09-theano/09.10-softmax-on-mnist.ipynb\n",
+ "09-theano/09.11-net-on-mnist.ipynb\n",
+ "09-theano/09.12-random-streams.ipynb\n",
+ "09-theano/09.13-modern-net-on-mnist.ipynb\n",
+ "09-theano/09.14-convolutional-net-on-mnist.ipynb\n",
+ "09-theano/09.15-tensor-basics.ipynb\n",
+ "09-theano/09.16-tensor-indexing.ipynb\n",
+ "09-theano/09.17-tensor-operator-and-elementwise-operations.ipynb\n",
+ "09-theano/09.18-tensor-nnet-.ipynb\n",
+ "09-theano/09.19-tensor-conv.ipynb\n",
+ "10-something-interesting/10.01-maps-using-basemap.ipynb\n",
+ "10-something-interesting/10.02-maps-using-cartopy.ipynb\n",
+ "10-something-interesting/10.03-nba-data.ipynb\n",
+ "10-something-interesting/10.04-louis-cha's-kungfu-world.ipynb\n",
+ "11-useful-tools/11.01-pprint.ipynb\n",
+ "11-useful-tools/11.02-pickle-and-cPickle.ipynb\n",
+ "11-useful-tools/11.03-json.ipynb\n",
+ "11-useful-tools/11.04-glob.ipynb\n",
+ "11-useful-tools/11.05-shutil.ipynb\n",
+ "11-useful-tools/11.06-gzip,-zipfile,-tarfile.ipynb\n",
+ "11-useful-tools/11.07-logging.ipynb\n",
+ "11-useful-tools/11.08-string.ipynb\n",
+ "11-useful-tools/11.09-collections.ipynb\n",
+ "11-useful-tools/11.10-requests.ipynb\n",
+ "12-pandas/12.01-ten-minutes-to-pandas.ipynb\n",
+ "12-pandas/12.02-series-in-pandas.ipynb\n",
+ "12-pandas/12.03-dataframe-in-pandas.ipynb\n"
]
}
],
@@ -296,9 +280,7 @@
{
"cell_type": "code",
"execution_count": 7,
- "metadata": {
- "collapsed": false
- },
+ "metadata": {},
"outputs": [],
"source": [
"with open('index.md') as f:\n",
@@ -324,9 +306,9 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
- "version": "2.7.11"
+ "version": "2.7.14"
}
},
"nbformat": 4,
- "nbformat_minor": 0
+ "nbformat_minor": 1
}
diff --git a/generate_static_files.py b/generate_static_files.py
index 567637ae..99e3d33c 100644
--- a/generate_static_files.py
+++ b/generate_static_files.py
@@ -3,7 +3,8 @@
# # 将笔记转化为不同的文件格式
-# In[1]:
+# In[ ]:
+
import os
import os.path
@@ -13,7 +14,8 @@
# 检查路径是否存在,删除旧的文件:
-# In[2]:
+# In[ ]:
+
if not os.path.exists('static-files'):
os.mkdir('static-files')
@@ -24,7 +26,8 @@
# 文件夹:
-# In[3]:
+# In[ ]:
+
folders = ['01-python-tools',
'02-python-essentials',
@@ -43,7 +46,8 @@
# 遍历文件夹得到所有的文件名:
-# In[4]:
+# In[ ]:
+
file_names = []
@@ -52,20 +56,17 @@
file_names += [os.path.join(folder, file_name) for file_name in files if file_name.endswith('.ipynb')]
-# In[5]:
+# In[ ]:
+
def convert_to_files(names, to_format):
target_dir = os.path.join("static-files", to_format)
for folder in folders:
if not os.path.exists(os.path.join(target_dir, folder)):
os.makedirs(os.path.join(target_dir, folder))
- converter = {
- "html": nbconvert.export_html,
- "python": nbconvert.export_python
- }
for file_name in names:
- p = converter[to_format](file_name)
+ p = nbconvert.export(nbconvert.get_exporter(to_format), file_name)
with open(os.path.join(target_dir, file_name[:-6] + p[1]["output_extension"]), 'w') as f:
f.write(p[0].encode("utf-8"))
print file_name
@@ -73,14 +74,16 @@ def convert_to_files(names, to_format):
# 转化 HTML 文件:
-# In[6]:
+# In[ ]:
+
convert_to_files(file_names, "html")
# 产生新目录:
-# In[7]:
+# In[ ]:
+
with open('index.md') as f:
text = f.read()
diff --git a/index.ipynb b/index.ipynb
index 386b5874..3b7091da 100644
--- a/index.ipynb
+++ b/index.ipynb
@@ -4,31 +4,27 @@
"cell_type": "markdown",
"metadata": {},
"source": [
- "[](https://github.com/lijin-thu/notes-python)"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "# 中文 Python 笔记"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
+ "[](https://github.com/lijin-thu/notes-python)\n",
+ "\n",
+ "# 中文 Python 笔记\n",
+ "\n",
"> 版本:0.0.1
\n",
"> 作者:李金
\n",
"> 邮件:lijinwithyou@gmail.com
\n",
"\n",
- "`Github` 加载 `.ipynb` 的速度较慢,建议在 [Nbviewer](http://nbviewer.ipython.org/github/lijin-THU/notes-python/blob/master/index.ipynb) 中查看该项目。"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
+ "由于涉及著作权的问题,对基于本笔记所做的修订、改编,目前不做任何正式授权。\n",
+ "\n",
+ "笔记内容仅供学习参考,未经允许,请勿用于任何商业用途。\n",
+ "\n",
+ "`Github` 加载 `.ipynb` 的速度较慢,建议在 [Nbviewer](http://nbviewer.ipython.org/github/lijin-THU/notes-python/blob/master/index.ipynb) 中查看该项目。\n",
+ "\n",
+ "基于本笔记的实体书:《自学Python——编程基础、科学计算及数据分析》已经出版。\n",
+ "\n",
+ "京东自营链接:\n",
+ "https://item.jd.com/12328920.html\n",
+ "\n",
+ "天猫、亚马逊、当当均有销售。\n",
+ "\n",
"---\n",
"\n",
"## 简介\n",
@@ -41,20 +37,15 @@
"\n",
"推荐使用 [Anaconda](http://www.continuum.io/downloads),这个IDE集成了大部分常用的包。\n",
"\n",
- "笔记内容使用 `ipython notebook` 来展示。\n",
+ "笔记内容使用 `jupyter notebook` 来展示。\n",
"\n",
"安装好 `Python` 和相应的包之后,可以在命令行下输入:\n",
"\n",
"```\n",
- "$ ipython notebook\n",
+ "$ jupyter notebook\n",
"```\n",
- "来进入 `ipython notebook`。"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
+ "来进入 `jupyter notebook`。\n",
+ "\n",
"----\n",
"\n",
"## 基本环境配置\n",
@@ -65,13 +56,8 @@
"``` \n",
"conda update conda\n",
"conda update anaconda\n",
- "```"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
+ "```\n",
+ "\n",
"---\n",
"\n",
"## 参考\n",
@@ -82,31 +68,16 @@
"- [Deep Learning Tutorials](http://deeplearning.net/tutorial/)\n",
"- [High Performance Scientific Computing](http://faculty.washington.edu/rjl/uwhpsc-coursera/index.html)\n",
"- [Scipy Lectures](http://www.scipy-lectures.org/)\n",
- "- [Pandas.org](http://pandas.pydata.org/pandas-docs/stable/index.html)"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
+ "- [Pandas.org](http://pandas.pydata.org/pandas-docs/stable/index.html)\n",
+ "\n",
"----\n",
"\n",
- "## 目录"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
+ "## 目录\n",
+ "\n",
"可以在 Notebook 中打开 `generate static files.ipynb`,或者命令行中运行代码 `generate_static_files.py` 来生成静态的 HTML 文件。\n",
"\n",
- "---"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
+ "---\n",
+ "\n",
"- [01. **Python 工具**](01-python-tools)\n",
"\t - [01.01 Python 简介](01-python-tools/01.01-python-overview.ipynb)\n",
"\t - [01.02 Ipython 解释器](01-python-tools/01.02-ipython-interpreter.ipynb)\n",
@@ -259,16 +230,11 @@
"- [12. **Pandas**](12-pandas)\n",
"\t - [12.01 十分钟上手 Pandas](12-pandas/12.01-ten-minutes-to-pandas.ipynb)\n",
"\t - [12.02 一维数据结构:Series](12-pandas/12.02-series-in-pandas.ipynb)\n",
- "\t - [12.03 二维数据结构:DataFrame](12-pandas/12.03-dataframe-in-pandas.ipynb)"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "觉得有用打赏一下?\n",
+ "\t - [12.03 二维数据结构:DataFrame](12-pandas/12.03-dataframe-in-pandas.ipynb)\n",
+ " \n",
+ "**打赏一下意思意思?**\n",
"\n",
- ""
+ ""
]
}
],
@@ -288,9 +254,9 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
- "version": "2.7.11"
+ "version": "2.7.15"
}
},
"nbformat": 4,
- "nbformat_minor": 0
+ "nbformat_minor": 1
}
diff --git a/index.md b/index.md
index fe7faccd..14a45561 100644
--- a/index.md
+++ b/index.md
@@ -150,4 +150,4 @@
- [12. **Pandas**](12-pandas)
- [12.01 十分钟上手 Pandas](12-pandas/12.01-ten-minutes-to-pandas.ipynb)
- [12.02 一维数据结构:Series](12-pandas/12.02-series-in-pandas.ipynb)
- - [12.03 二维数据结构:DataFrame](12-pandas/12.03-dataframe-in-pandas.ipynb)
+ - [12.03 二维数据结构:DataFrame](12-pandas/12.03-dataframe-in-pandas.ipynb)
\ No newline at end of file
diff --git a/payment.jpeg b/payment.jpeg
new file mode 100644
index 00000000..7dc37b8d
Binary files /dev/null and b/payment.jpeg differ
diff --git a/payment.jpg b/payment.jpg
deleted file mode 100644
index 782fcec5..00000000
Binary files a/payment.jpg and /dev/null differ