效率提升 10 倍的各种配置

由于工作经常会更换机器、更换环境,有时候一个机器用惯了,换了一台机器都不记得自己之前是怎么配置的了。为了防止老年痴呆阻止我配置好看的工作环境,我决定把所有喜欢的配置都记录在这里,可能有点乱。

Jupyter Notebook

这个应该很常用了,大家第一件事应该就是设置主题吧,我试过各种主题,都无法满足我的诉求,所以就自己配置了一下 ~/.jupyter/custom/custom.css,感觉下面这个配置简单又好看~

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
.introspection, .input_prompt, .output_prompt, .output, .CodeMirror pre {
font-family: "Microsoft YaHei Mono", Consolas, "Liberation Mono", Menlo, Courier, monospace;
font-size: 15px;
line-height: 22px;
}

div.output_area pre {
font-family: "Microsoft YaHei Mono";
}

div.text_cell,
div.text_cell_render pre,
div.text_cell_render {
font-family: sans-serif;
font-size: 11pt;
line-height: 20pt;
color: #353535;
}

div.rendered_html code {
font-family: "Microsoft YaHei Mono";
font-size: 11pt;
padding-top: 3px;
padding-left: 6px;
padding-right: 6px;
color: #a3be8c;
background: #efefef;
background-color: #efefef;
}

.rendered_html thead {
font-family: "Microsoft YaHei Mono";
font-size: 10.5pt;
}

.rendered_html td {
font-family: "Microsoft YaHei Mono";
font-size: 10pt;
}

.rendered_html h1,
.text_cell_render h1 {
color: #126dce !important;
font-size: 160%;
text-align: left;
font-style: normal;
font-weight: bold;
}
.rendered_html h2,
.text_cell_render h2 {
color: #126dce !important;
font-size: 140%;
font-style: normal;
font-weight: bold;
}
.rendered_html h3,
.text_cell_render h3 {
color: #126dce !important;
font-size: 120%;
font-style: normal;
font-weight: bold;
}

.cm-s-ipython .CodeMirror-linenumber {
font-family: "Microsoft YaHei Mono";
}

.cm-s-ipython.CodeMirror {background: #2b303b; color: #dfe1e8;}
.cm-s-ipython div.CodeMirror-selected {background: #343d46 !important;}
.cm-s-ipython .CodeMirror-gutters {background: #2b303b; border-right: 0px;}
.cm-s-ipython .CodeMirror-linenumber {color: #65737e;}
.cm-s-ipython .CodeMirror-cursor {border-left: 1px solid #a7adba !important;}

.cm-s-ipython span.cm-comment {color: #A3BE72;}
.cm-s-ipython span.cm-atom {color: #b48ead;}
.cm-s-ipython span.cm-number {color: #b48ead;}

.cm-s-ipython span.cm-property, .cm-s-ipython span.cm-attribute {color: #c0c5ce;}
.cm-s-ipython span.cm-keyword {color: #DDD7A3;}
.cm-s-ipython span.cm-string {color: #94C273;}
.cm-s-ipython span.cm-operator {color: #ab7967;}
.cm-s-ipython span.cm-builtin {color: #EA8080;}

.cm-s-ipython span.cm-variable {color: #c0c5ce;}
.cm-s-ipython span.cm-variable-2 {color: #8fa1b3;}
.cm-s-ipython span.cm-def {color: #61AFEF;}
.cm-s-ipython span.cm-error {background: #bf616a; color: #a7adba;}
.cm-s-ipython span.cm-bracket {color: #c0c5ce;}
.cm-s-ipython span.cm-tag {color: #bf616a;}
.cm-s-ipython span.cm-link {color: #b48ead;}

.cm-s-ipython .CodeMirror-matchingbracket { text-decoration: underline; color: #dfe1e8 !important;}

另外,在 linux 上安装 jupyter notebook 的话,第一次启动时会报 `` 的错,需要修改以下文件: