Skip to content

Commit 547f7bf

Browse files
committed
Resolve conflicts
2 parents 5775aab + 449dc27 commit 547f7bf

30 files changed

+3665
-738
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# Byte-compiled / optimized / DLL files
2+
*.epub
23
__pycache__/
34
*.py[cod]
45

README-ja.md

Lines changed: 63 additions & 63 deletions
Large diffs are not rendered by default.

README-zh-Hans.md

Lines changed: 501 additions & 517 deletions
Large diffs are not rendered by default.

README-zh-TW.md

Lines changed: 54 additions & 54 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 115 additions & 68 deletions
Large diffs are not rendered by default.

epub-metadata.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
title: System Design Primer
2+
creator: Donne Martin
3+
date: 2018

generate-epub.sh

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
#! /usr/bin/env sh
2+
3+
generate_from_stdin() {
4+
outfile=$1
5+
language=$2
6+
7+
echo "Generating '$language' ..."
8+
9+
pandoc --metadata-file=epub-metadata.yaml --metadata=lang:$2 --from=markdown -o $1 <&0
10+
11+
echo "Done! You can find the '$language' book at ./$outfile"
12+
}
13+
14+
generate_with_solutions () {
15+
tmpfile=$(mktemp /tmp/sytem-design-primer-epub-generator.XXX)
16+
17+
cat ./README.md >> $tmpfile
18+
19+
for dir in ./solutions/system_design/*; do
20+
case $dir in *template*) continue;; esac
21+
case $dir in *__init__.py*) continue;; esac
22+
: [[ -d "$dir" ]] && ( cd "$dir" && cat ./README.md >> $tmpfile && echo "" >> $tmpfile )
23+
done
24+
25+
cat $tmpfile | generate_from_stdin 'README.epub' 'en'
26+
27+
rm "$tmpfile"
28+
}
29+
30+
generate () {
31+
name=$1
32+
language=$2
33+
34+
cat $name.md | generate_from_stdin $name.epub $language
35+
}
36+
37+
generate_with_solutions
38+
generate README-ja ja
39+
generate README-zh-Hans zh-Hans
40+
generate README-zh-TW zh-TW

solutions/object_oriented_design/call_center/call_center.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"cell_type": "markdown",
55
"metadata": {},
66
"source": [
7-
"This notebook was prepared by [Donne Martin](https://github.com/donnemartin). Source and license info is on [GitHub](https://github.com/donnemartin/system-design-primer-primer)."
7+
"This notebook was prepared by [Donne Martin](https://github.com/donnemartin). Source and license info is on [GitHub](https://github.com/donnemartin/system-design-primer)."
88
]
99
},
1010
{
@@ -24,9 +24,9 @@
2424
" * Operator, supervisor, director\n",
2525
"* Can we assume operators always get the initial calls?\n",
2626
" * Yes\n",
27-
"* If there is no free operators or the operator can't handle the call, does the call go to the supervisors?\n",
27+
"* If there is no available operators or the operator can't handle the call, does the call go to the supervisors?\n",
2828
" * Yes\n",
29-
"* If there is no free supervisors or the supervisor can't handle the call, does the call go to the directors?\n",
29+
"* If there is no available supervisors or the supervisor can't handle the call, does the call go to the directors?\n",
3030
" * Yes\n",
3131
"* Can we assume the directors can handle all calls?\n",
3232
" * Yes\n",

solutions/object_oriented_design/call_center/call_center.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def __init__(self, employee_id, name):
6666
super(Operator, self).__init__(employee_id, name, Rank.DIRECTOR)
6767

6868
def escalate_call(self):
69-
raise NotImplemented('Directors must be able to handle any call')
69+
raise NotImplementedError('Directors must be able to handle any call')
7070

7171

7272
class CallState(Enum):

solutions/object_oriented_design/deck_of_cards/deck_of_cards.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"cell_type": "markdown",
55
"metadata": {},
66
"source": [
7-
"This notebook was prepared by [Donne Martin](https://github.com/donnemartin). Source and license info is on [GitHub](https://github.com/donnemartin/system-design-primer-primer)."
7+
"This notebook was prepared by [Donne Martin](https://github.com/donnemartin). Source and license info is on [GitHub](https://github.com/donnemartin/system-design-primer)."
88
]
99
},
1010
{

solutions/object_oriented_design/hash_table/hash_map.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"cell_type": "markdown",
55
"metadata": {},
66
"source": [
7-
"This notebook was prepared by [Donne Martin](https://github.com/donnemartin). Source and license info is on [GitHub](https://github.com/donnemartin/system-design-primer-primer)."
7+
"This notebook was prepared by [Donne Martin](https://github.com/donnemartin). Source and license info is on [GitHub](https://github.com/donnemartin/system-design-primer)."
88
]
99
},
1010
{

solutions/object_oriented_design/lru_cache/lru_cache.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"cell_type": "markdown",
55
"metadata": {},
66
"source": [
7-
"This notebook was prepared by [Donne Martin](https://github.com/donnemartin). Source and license info is on [GitHub](https://github.com/donnemartin/system-design-primer-primer)."
7+
"This notebook was prepared by [Donne Martin](https://github.com/donnemartin). Source and license info is on [GitHub](https://github.com/donnemartin/system-design-primer)."
88
]
99
},
1010
{

solutions/object_oriented_design/online_chat/online_chat.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"cell_type": "markdown",
55
"metadata": {},
66
"source": [
7-
"This notebook was prepared by [Donne Martin](https://github.com/donnemartin). Source and license info is on [GitHub](https://github.com/donnemartin/system-design-primer-primer)."
7+
"This notebook was prepared by [Donne Martin](https://github.com/donnemartin). Source and license info is on [GitHub](https://github.com/donnemartin/system-design-primer)."
88
]
99
},
1010
{

solutions/object_oriented_design/parking_lot/parking_lot.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"cell_type": "markdown",
55
"metadata": {},
66
"source": [
7-
"This notebook was prepared by [Donne Martin](https://github.com/donnemartin). Source and license info is on [GitHub](https://github.com/donnemartin/system-design-primer-primer)."
7+
"This notebook was prepared by [Donne Martin](https://github.com/donnemartin). Source and license info is on [GitHub](https://github.com/donnemartin/system-design-primer)."
88
]
99
},
1010
{

0 commit comments

Comments
 (0)