Nowdays, many people have their kindles, but lots of them tended to throw their machines in their lockers after losting their enthusiasm or dindn’t have too much time to read books.

Read More

Zsh is a shell designed for interactive use, while in most UNIX systems, the default shell is bash. Zsh is compatible with bash and it has more powerful functions especially in interaction. With all kinds of themes and plugins, you have a more configurable teminal.

Read More

Shadowsocks is a light secure socks5 proxy, you can use it to fake the IP address when you try to use some services like Youtube which have area limitations. In China, you can use it to visit the websites or services like Twitter, Youtube which are blocked by the GFW

Read More

This is a deployment in MAC, but the most parts are also fit for Windows and Linux

Install homebrew

(This is a package manager of the OSX, which would be familiared if you ever used linux like Ubuntu)

Read More

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# 初始化数据库
def init(data):
data['first'] = {}
data['middle'] = {}
data['last'] = {}
# 查询数据库中标签和名(First,Middle, Last)
def lookup(data,label,name):
return data[label].get(name)
def store(data, *full_names):
for full_name in full_names:
names = full_name.split()
if len(names) == 2:
names.insert(1,'')
labels = 'first', 'middle', 'last'
# 联合标签和名字
for label,name in zip(labels,names):
# 调用lookup函数并将结果赋予people
people = lookup(data,label,name)
# 如果查询的结果非空,将对应的全名加入相应的label,name对应的全名集中
if people:
people.append(full_name)
# 若查询为空,将相应的labels和names以及对应的全名加入数据集中
else:
data[label][name] = [full_name]