上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 25 下一页
摘要: 例子12:ipython使用--pylab参数,默认加入matplotlib模块[root@typhoeus79 guosong]# ipython --pylabWARNING: IPython History requires SQLite, your history will not be savedPython 2.7.3 (default, Nov 27 2012, 17:47:24) Type "copyright", "credits" or "license" for more information.IPython 阅读全文
posted @ 2013-11-16 22:33 小郭学路 阅读(655) 评论(0) 推荐(0) 编辑
摘要: 例子11-1:横坐标时间的处理from matplotlib.dates import datestr2num,DateFormatterimport matplotlib.dates as datesfig,ax=plt.subplots()formatter = DateFormatter('%... 阅读全文
posted @ 2013-11-15 20:39 小郭学路 阅读(5810) 评论(0) 推荐(0) 编辑
摘要: pandaspandasis an open source, BSD-licensed library providing high-performance, easy-to-use data structures and data analysis tools for thePythonprogramming language一、安装1、pandasgit clone git://github.com/pydata/pandas.git2、RequirementsCpythonhttps://pypi.python.org/pypi/Cython/pytzhttps://pypi.pytho 阅读全文
posted @ 2013-11-14 21:31 小郭学路 阅读(1441) 评论(0) 推荐(0) 编辑
摘要: 例子6、中文标签测试#!/usr/bin/env python2.7#-*- coding:utf-8 -*-import matplotlib.pyplot as plt import numpy as npimport matplotlib.font_manager as fmfontpath = '/usr/share/fonts/chinese/TrueType/ukai.ttf'myfont = fm.FontProperties(fname=fontpath)#定义一个myfont变量,myfont=matplotlib.font_manager.FontPrope 阅读全文
posted @ 2013-11-14 11:54 小郭学路 阅读(3897) 评论(0) 推荐(0) 编辑
摘要: 1、简介Python的lists是非常的灵活以及易于使用。但是在处理科学计算相关大数量的时候,有点显得捉襟见肘了。Numpy提供一个强大的N维数组对象(ndarray),包含一些列同类型的元素,这点和python中lists不同。Python lists are extremely flexible and really handy, but when dealing with a largenumber of elements or to support scientific computing, they show their limits.One of the fundamental a 阅读全文
posted @ 2013-11-14 11:15 小郭学路 阅读(2599) 评论(0) 推荐(0) 编辑
摘要: 小试牛刀在上一节已经安装好matplotlib模块,下面使用几个例子熟悉一下。对应的一些文档说明:http://matplotlib.org/1.3.1/api/pyplot_summary.html例子1:二维坐标——整数[root@typhoeus79 20131113]# ipythonIn [1]: import matplotlib.pyplot as pltIn [2]: x = range(6)In [3]: plt.plot(x,[xi*xi for xi in x])Out[3]: []In [4]: plt.savefig('test1.png')输出结果: 阅读全文
posted @ 2013-11-13 20:31 小郭学路 阅读(984) 评论(0) 推荐(0) 编辑
摘要: numpy1、下载安装源代码http://sourceforge.net/projects/numpy/files/NumPy/安装python2.7 setup.py install2、测试导入numpy模块,出现如下错误:[root@typhoeus79 numpy-1.8.0]# python2.7Python 2.7.3 (default, Nov 27 2012, 17:47:24) [GCC 4.1.2 20080704 (Red Hat 4.1.2-46)] on linux2Type "help", "copyright", " 阅读全文
posted @ 2013-11-13 20:16 小郭学路 阅读(33259) 评论(0) 推荐(0) 编辑
摘要: 字面值时源代码中用来描述固定值的记号,可能是整数、浮点数、字符或者字符串2.1 整数常量除了常见的十进制数外,还有八进制(以数字0开头)或者十六进制(0x/0X)表示法。#include int main(){ int x = 010; int y = 0x0A; printf("x=%d,y=%d\n",x,y); return 0;}输出:x=8,y=10常量类型可以通过后缀来区分类型0x200 -->int200U -->unsigned int0L -->long0xf0f0UL -->unsigned long0777LL --->l 阅读全文
posted @ 2013-11-12 21:01 小郭学路 阅读(356) 评论(0) 推荐(0) 编辑
摘要: 简介pt-log-player是MySQL日志回放工具,在pt2.4中被去除,由percona-playback取代。在2.1中还是保留,如果想使用的话,需要下载2.1版本的。使用方法pt-log-player [OPTION...] [DSN]例子:日志切分pt-log-player --split Thread_id --type=genlog --session-files 16 --only-select --base-dir ./sessions ./mysql.log日志回放pt-log-player --play ./play/ --base-dir ./results -u . 阅读全文
posted @ 2013-11-12 11:32 小郭学路 阅读(660) 评论(0) 推荐(0) 编辑
摘要: 安装http://www.cnblogs.com/zhoujinyi/archive/2013/04/19/3029134.htmlhttp://space.itpub.net/758322/viewspace-708581http://hidba.org/?p=2291、安装遇到的问题libtool重新下载安装http://www.gnu.org/software/libtool/./configure --prefix=/usr/bin/make && make install将libtool拷贝到sysbench的安装目录中2、运行autogen.sh出现RANLIBc未 阅读全文
posted @ 2013-11-11 16:02 小郭学路 阅读(195) 评论(0) 推荐(0) 编辑
上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 25 下一页