jupyter notebook 笔记

nbclassic 经典版

新版的 jupyter notebook 太丑了。 最难受的是字体太小了。

我还是喜欢老版本的 jupyter notebook.

安装经典版:

pip install nbclassic

启动经典版:

jupyter server

或是

jupyter nbclassic

参考来源: https://github.com/jupyter/nbclassic

jupyter notebook 设置黑色背景

  • pip install jupyterthemes

  • jt -l 列出

  • jt -h 帮助

  • jt -T -N 显示 toolbar 和文件名

  • jt -t monokai -T -N # 使用 sublime 风格

  • jt -t onedork -T -N # 使用 atom 主题

  • jt -r 重置默认主题

jt -t monokai -fs 115 -nfs 125 -tfs 115 -dfs 115 -ofs 115 -cursc r -cellw 80% -lineh 115 -altmd -kl -T -N

魔法命令

%%timeit,带 it, 把代码运行很多遍!! 会运行很久!!

%%time, 只运行一次。 对单元格的代码计算用时。

%timeit 一个百分号 %, 也是多次运行,很耗时!

注意一点, 不要使用 it !!!

  1. %lsmagic 查看一些内建的的快捷键。

    • 比如 %matplotlib inline
    • %%HTML 可以直接渲染 HTML代码,比如插入图片,视频
    • %%timeit -r 1 -n 1 单元格计时。
    • %timeit 单行计时。
  2. arr? max? 可以直观地查看数据类型,帮助文档,以及例子

  3. arr?? 可以阅读相关源码

安装

新建一个conda 环境后,需要安装 jupyter notebook 以及相关的插件

直接运行以下命令

python 复制代码
import os 

os.system("pip install jupyter notebook")
os.system("pip install jupyter_contrib_nbextensions")
os.system("jupyter contrib nbextension install --user")
os.system("pip install jupyter_nbextensions_configurator")

配置

  1. 修改自动保存文件的 【时间间隔】, 防止浏览器频繁闪烁。
    打开这个文件:
    C:\Users\Administrator.jupyter\jupyter_notebook_config.py

添加 R 环境

conda install r-essentials

conda install r r-essentials --channel

conda-forge conda install r- --channel conda-forge


老哥留步,支持一下。

相关推荐
淮北也生橘123 小时前
Linux的V4L2视频框架学习笔记
linux·笔记·学习·音视频·嵌入式linux
ZZHow10243 小时前
微信小程序开发笔记(01_小程序基础与配置文件)
笔记·微信小程序·小程序
凯尔萨厮5 小时前
Java学习笔记四(继承)
java·笔记·学习
ホロHoro5 小时前
学习笔记:Javascript(5)——事件监听(用户交互)
javascript·笔记·学习
黎宇幻生10 小时前
Java全栈学习笔记33
java·笔记·学习
朗迹 - 张伟11 小时前
Golang安装笔记
开发语言·笔记·golang
siy233314 小时前
[c语言日记] 数组的一种死法和两种用法
c语言·开发语言·笔记·学习·链表
996终结者16 小时前
同类软件对比(四):Jupyter vs PyCharm vs VS Code:Python开发工具终极选择指南
vscode·python·jupyter·pycharm·visual studio code
不会聊天真君64720 小时前
ES(springcloud笔记第五期)
笔记·elasticsearch·spring cloud
汇能感知20 小时前
光谱相机在AI眼镜领域中的应用
经验分享·笔记·科技