• Jupyter 个性化配置(主题、字体、代码补全、变更工作目录)


    Jupyter 个性化配置(工作目录、主题、字体、代码补全等)

    1. 工作目录变更

    现状: 通过 Anaconda 安装的Jupyter notebook 默认的工作目录配置在用户名文件夹下,很多人不习惯这个目录文件夹。
    方法:

    • Step1:启动控制台。快捷键(Win + R),输入命令 cmd打开。
    • Step2:生成jupyter notebook配置文件。输入命令:jupyter notebook --generate-config,在默认目录下生成配置文件。
    jupyter notebook --generate-config
    

    • Step3:打开配置文件jupyter_notebook_config.py(我用notepad++打开),找到文件路径配置项c.NotebookApp.notebook_dir,并修改成自定义路径。
    • Step4:若前3步完成后jupyter notebook的文件路径还是没有改变,则进行第4步。修改快捷方式的Target(目标)项。找到jupyter notebook的快捷方式,右键选择属性,删除末尾的"%USERPROFILE%/"

    2. 主体、字体等

    • Step1:pip安装jupyterthemes(当然也可以用anaconda)
    # 通过anaconda安装
    conda install jupyterthemes
    
    # 通过pip安装
    pip install jupyterthemes
    
    • Step2:配置自定义参数命令,修改各类参数进行个性化配置。
      我的配置命令:
    jt --lineh 140  -tf ptmono -t oceans16  -ofs 13 -nfs 14 -tfs 14 -fs 14 -T -N -dfs 10
    

    效果:

    注:
    关于jupyterthemes的命令参数网上有很多介绍,详细参看这里jupyterthemes

    Note:

    • 系统环境: Windows 10 Enterprise 64bit
    • Anaconda:Anaconda3-2021.05-Windows-x86_64.exe

    ♦ §这个世界的温柔来自于自身的强大!§ ♦
  • 相关阅读:
    14-Reverse Integer
    13.Merge k Sorted Lists
    12-Add Digits
    11-String to Integer (atoi)
    10.Power of Two-Leetcode
    9. Delete Node in a Linked List
    使用Openmp并行化
    C++编译过程与内存空间
    C++栈溢出
    程序(进程)内存空间分布深入理解
  • 原文地址:https://www.cnblogs.com/fairylyl/p/15499068.html
Copyright © 2020-2023  润新知