wuhuhu800 / test-one-on-desktop

this is my first desktop practice
0 stars 0 forks source link

jupyter notebook #2

Open wuhuhu800 opened 6 years ago

wuhuhu800 commented 6 years ago

something notebook features

wuhuhu800 commented 6 years ago

read .md (markdown) file

参考 https://blog.csdn.net/lucky7213/article/details/79286699

进入虚拟环境

image

重新启动jupyter notebook

wuhuhu800 commented 6 years ago

命令行输入: jupyter notebook password 可以自己设置密码

wuhuhu800 commented 6 years ago

jupyter 隐藏代码脚本

from IPython.display import HTML

HTML('''<script>
code_show=true; 
function code_toggle() {
 if (code_show){
 $('div.input').hide();
 } else {
 $('div.input').show();
 }
 code_show = !code_show
} 
$( document ).ready(code_toggle);
</script>
<form action="javascript:code_toggle()"><input type="submit" value="Click here to toggle on/off the raw code."></form>''')

或者

%%HTML
<button onclick="$('.input, .prompt, .output_stderr, .output_error, .output_result').toggle();">Toggle Code</button>
wuhuhu800 commented 6 years ago

Jupyter 扩展包

https://github.com/Jupyter-contrib/jupyter_nbextensions_configurator 1、

conda install -c conda-forge jupyter_nbextensions_configurator

https://github.com/ipython-contrib/jupyter_contrib_nbextensions 2、

conda install -c conda-forge jupyter_contrib_nbextensions

最终效果 image

图中勾选的是个人感觉不错

wuhuhu800 commented 6 years ago

创建gist image

红框里的就是 gist id image

配置jupyter

image

同步jupyter image

wuhuhu800 commented 6 years ago

image

wuhuhu800 commented 6 years ago

jupyter 主题 https://github.com/dunovank/jupyter-themes https://blog.csdn.net/Techmonster/article/details/73382535 https://www.jianshu.com/p/168a2509db79 安装 pip install --upgrade jupyterthemes

查看主题

usename$ jt -l

Available Themes:
   chesterish
   grade3
   monokai
   oceans16
   onedork
   solarizedd
   solarizedl

选择主题,关闭工具栏

username$ jt -t 主题名称

选择主题,打开工具栏

jt -t chesterish -T -N

表示我选择了chesterish这个主题,同时希望打开顶部的工具栏(Toolbar),显示笔记本的名字(Name)

恢复默认

username$ jt -r

个人喜好的风格参数 jt -t grade3 -T -N -ofs 11