Skip to content

Commit

Permalink
chapter 2 done
Browse files Browse the repository at this point in the history
  • Loading branch information
SwordYork committed Mar 1, 2017
1 parent 306af2b commit 8816786
Show file tree
Hide file tree
Showing 7 changed files with 337 additions and 237 deletions.
File renamed without changes.
102 changes: 102 additions & 0 deletions Chapter2/annotations.txt

Large diffs are not rendered by default.

171 changes: 77 additions & 94 deletions Chapter2/linear_algebra.tex

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
| 章节 | 负责人 | 简单阅读 | 中英对比 | 进度 |
| ------------ | ------------ | ------------ | ------------ | ------------ |
| [第一章 前言](https://exacity.github.io/deeplearningbook-chinese/Chapter1_introduction/) | @swordyork | lc, @SiriusXDJ, @corenel | @linzhp | 完成合并 |
| [第二章 线性代数](https://via.hypothes.is/https://exacity.github.io/deeplearningbook-chinese/Chapter2_linear_algebra/) | @liber145 | @SiriusXDJ, @angrymidiao | @badpoem | 等待合并 |
| [第二章 线性代数](https://via.hypothes.is/https://exacity.github.io/deeplearningbook-chinese/Chapter2_linear_algebra/) | @liber145 | @SiriusXDJ | @badpoem | 完成合并 |
| [第三章 概率与信息论](https://via.hypothes.is/https://exacity.github.io/deeplearningbook-chinese/Chapter3_probability_and_information_theory/) | @KevinLee1110 | @SiriusXDJ | @kkpoker | 等待合并 |
| [第四章 数值计算](https://via.hypothes.is/https://exacity.github.io/deeplearningbook-chinese/Chapter4_numerical_computation/) | @swordyork | @zhangyafeikimi | @quasi-jing, @hengqujushi | 等待合并 |
| [第五章 机器学习基础](https://via.hypothes.is/https://exacity.github.io/deeplearningbook-chinese/Chapter5_machine_learning_basics/) | @liber145 | @wheaio, @ZhiweiYang | @fairmiracle, @linzhp | 等待合并 |
Expand Down
263 changes: 123 additions & 140 deletions docs/_posts/2016-12-02-Chapter2_linear_algebra.md

Large diffs are not rendered by default.

32 changes: 32 additions & 0 deletions scripts/parse_anno.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import json

# download the raw annotations from hypothes
# for example https://hypothes.is/api/search?_separate_replies=true&group=__world__&limit=200&offset=0&order=asc&sort=created&uri=https%3A%2F%2Fexacity.github.io%2Fdeeplearningbook-chinese%2FChapter2_linear_algebra%2F
anno = open('raw.txt','r').read()
json_anno = json.loads(anno)

rows = json_anno['rows']
replies = json_anno['replies']

cleaned_keys = ['user', 'text']
cleaned_replies = []
cleaned_rows = []

for reply in replies:
cleaned_reply = {k:reply[k] for k in ['user', 'text']}
cleaned_reply['time'] = reply['updated'][:16]
cleaned_replies.append(str(cleaned_reply))

for row in rows:
cleaned_row = {k:row[k] for k in ['user', 'text']}
origin_text = row['target'][0]['selector'][3]
cleaned_row['origin_text'] = (origin_text['prefix'] + " !!!" + origin_text['exact'] + "!!! " + origin_text['suffix']).replace('\n', '')
cleaned_row['time'] = row['updated'][:16]
cleaned_rows.append(str(cleaned_row))

# write to new file
f = open('annotations.txt', 'w')
f.write('\n'.join(cleaned_rows))
f.write('\n\n============================= Replies =============================\n\n')
f.write('\n'.join(cleaned_replies))
f.close()
4 changes: 2 additions & 2 deletions terminology.tex
Original file line number Diff line number Diff line change
Expand Up @@ -5432,8 +5432,8 @@
\newglossaryentry{matrix_inverse}
{
name=矩阵逆,
description={matrix inverse},
sort={matrix inverse},
description={matrix inversion},
sort={matrix inversion},
}

\newglossaryentry{origin}
Expand Down

0 comments on commit 8816786

Please sign in to comment.