python
treasuresss
清醒时做事,糊涂时运动
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Windows下Python的强力助手——Pypi
在Windows下一定要下载安装pypi,如果你要经常导入一些其他库的话!!!这是血与泪的教训啊,特写此文铭记……下面是安装pypi的步骤:1、download get-pip.py2、打开cmd,cd到你刚下载下来的get-pip.py的地址,运行下列语句(ps:运行前确保设置了python环境变量):python get-pip.py安装过程截图如下:3原创 2015-04-08 17:19:13 · 841 阅读 · 0 评论 -
matplotlib Note
pyplot首先,先导入numpy和pyplotimport numpy as npimport matplotlib.pyplot as plt简单画图示例:x = np.linspace(-10,10,1000)y = np.sin(x)plt.plot(x,y,alpha=0.3)#alpha:float (0.0 transparent through 1.0 opaque)pl原创 2016-02-24 16:00:00 · 548 阅读 · 0 评论 -
python matplotlib中文显示乱码解决
问题描述:python matplotlib绘图中文显示乱码 问题根源:matplotlib的默认字体并非中文字体 解决:设置为中文字体linux下查找中文字体:fc-list :lang=zh-cn #注意:前有个空格 windows下中文字体路径:c:\windows\fonts\simsun.ttcfrom matplotlib.font_manager import FontPrope原创 2016-02-26 15:48:30 · 6153 阅读 · 2 评论 -
Python Note
Python NotePython 中文官方文档strstr.translate(table [,deletechars]) -> string>>> from string import punctuation>>> s = 'abc,./123'>>> s.translate(None , punctuation)'abc123'>>> s.translate('a'*256 , p原创 2016-02-26 09:31:47 · 545 阅读 · 0 评论 -
python脚本打包发布:pyinstaller
1 安装环境windows发行版:win7 64位 python发行版:Anaconda2 pyinstaller安装pip install pyinstaller测试是否成功安装pyinstaller --version3.23 pyinstaller简例pyinstaller helloWorld.pyorpyinstaller --onefile helloWorld.py命令执行会生成两个原创 2016-05-05 17:21:00 · 1204 阅读 · 0 评论
分享