AI
halazi100
勤勉务实、守正创新
展开
-
ipython jupyter notebook中显示图像和数学公式
1. # 可以使用LaTeX表示数学公式# 可以使用LaTeX表示数学公式from IPython.display import LatexLatex(r"$\sqrt{x^2+y^2}$")2. # SymPy的表达式也可以显示为LaTex%load_ext sympyprintingfrom sympy import *x, y = symbols("x,y")sqrt(x**2+y...原创 2018-03-26 21:33:22 · 5867 阅读 · 0 评论 -
latex在ipython jupyter notebook中的使用
In [2]:from IPython.display import LatexIn [5]:# 数学公式的前后要加上 $ 或 \( 和 \)Latex(r"$f(x) = 3x + 7$")Out[5]:In [6]:# 普通字符在数学公式中含义一样,除了 # $ % & ~ _ ^ \ { }# 若要在数学环境中表示这些符号# $ % & _ { },# 需要分别表示...原创 2018-03-26 23:22:14 · 16363 阅读 · 5 评论 -
使用python模拟命令行终端
可以对?显示帮助信息,需要立即获取输入的字符,因此需要用到termios模块另外需要对tab键做处理,当按下tab键时可以进行自动补全#! /usr/bin/env python# coding=utf-8import osimport sysimport ttyimport termios'''Enter: 13Back: 127?: 63C-h: ...原创 2018-03-27 23:41:05 · 7434 阅读 · 2 评论 -
python安装配置常见问题总结
python 安装配置常见问题总结1. 下载python源码包并重新编译安装官网 https://www.python.org/ 下载python指定版本源码包,如 Python-2.7.16.tgz;解压后编译安装,命令如下:$ tar -zxvf Python-2.7.16.tgz$ cd Python-2.7.16$ ./configure --prefix=/usr/loca...原创 2019-09-09 11:00:03 · 1123 阅读 · 0 评论