![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python
qq_784583650
working,working,working...
展开
-
linux下MySQLdb模块简便安装
安装MySQLdb模块吐槽 -_-: 在网上Baidu+Google了半天,好多教程给的都是源码编译安装。编译过程有很多的依赖,很费事,当然研究还是有收获的。安装各种工具,各种依赖包,最后还是没有成功-_-。因为apt-get install libmysqld-dev安装的是最新版本的mysql的发行包,我安装的时候是5.7.18。里面找不到低版本中的某些头文件,导致编译失败。也尝试过apt-g原创 2017-05-11 23:03:06 · 1405 阅读 · 0 评论 -
python 引用其他目录的文件
1.在Python中引用其他目录中的文件import syssys.path.append('complete_path')#正常import即可2.引用当前目录下src/中的文件import syssys.path.append('./src')3.引用上级目录中的文件import syssys.path.append('../')4._init_.py方式 在这里原创 2017-05-05 11:05:38 · 17060 阅读 · 0 评论 -
pyhs(0.2.4):python2.7+handlersocket
1.pyhs安装#pip安装pip install python-handler-socket#验证是否成功安装python>>>from pyhs import __version__>>>print __version__>>>0.2.4安装过程可参考https://pypi.python.org/pypi/python-handler-socket 注:实践之前确认在MySQL中原创 2017-05-12 23:23:39 · 670 阅读 · 0 评论 -
pyhs(0.2.4) + MySQLdb性能比较
一、环境准备1.MySQL和Handlersocket:percona mysql5.5 + Handlersocket安装与实践2.Python和MySQLdb:linux下MySQLdb模块简便安装3.Python和Handlersocket:pyhs(0.2.4):python2.7+handlersocket二、性能比较标题原创 2017-05-05 23:29:45 · 408 阅读 · 0 评论 -
ipython:.ipynb文件转其他格式(markdown,HTML,talex等)
.ipynb文件转其他格式(markdown,HTML,talex等)# formart 可选ipython nbconvert --to FORMAT notebook.ipynbipython nbconvert --to html notebook.ipynbipython nbconvert --to markdown notebook.ipynbipython nbconvert原创 2017-05-16 23:21:49 · 2028 阅读 · 0 评论 -
Windows IPython Notebook
Windows + python2.7 + jupyter notebook ipython notebook 安装步骤详见 这里 如果安装过anaconda,可能pip install xxx 后显示已经安装 但是运行jupyter notebook后发现如下错误:cannot find ‘zmq.h’ 主要命令#按照[教程](http://aba.qzu.cn/archives/1029.原创 2017-04-27 11:36:55 · 541 阅读 · 0 评论 -
jupyter notebook:使用argparse包存在的问题及解决
argparse模块argparse是python用于解析命令行参数和选项的标准模块导入argparse包import argparse遇到的问题parser = argparse.ArgumentParser()parser.parse_args()usage: __main__.py [-h]__main__.py: error: unrecognized arguments: -f /ru原创 2017-05-19 00:13:46 · 16353 阅读 · 7 评论 -
Ubuntu16.04+anaconda2+opencv3.2.0
参考opencv2安装 opencv import error1.opencv编译安装# Get all the up-to-date tools you'll needsudo apt-get updatesudo apt-get install git cmake build-essential# Get latest greatest OpenCV from GitHubcdgit原创 2017-06-07 01:53:54 · 1527 阅读 · 0 评论