摘要: 将数据导入本地mongo中mongoimport --db test --collection restaurants --drop --file primer-dataset.json 如果本地mongo数据库中已经有了test 数据库,上面的命令会先删除之前的数据然后再导入新的数据在Linux/ 阅读全文
posted @ 2015-10-22 18:02 lixiaodi 阅读(358) 评论(0) 推荐(0) 编辑
摘要: 如果缺少Change-Id的commit 不是上一条,如git log中的倒数第4条首先回到该条commit的状态git rebase -i HEAD~4git log 后可发现该commit变为日志第一条重新获取分配Change-Id分别执行以下命令:gitdir=$(git rev-parse 阅读全文
posted @ 2015-10-22 14:40 lixiaodi 阅读(3193) 评论(0) 推荐(0) 编辑
摘要: 转载: http://www.douban.com/note/134971609/一 代码编排 1 缩进。4个空格的缩进(编辑器都可以完成此功能),不使用Tap,更不能混合使用Tap和空格。 2 每行最大长度79,换行可以使用反斜杠,最好使用圆括号。换行点要在操作符的后边敲回车。 3 类和top-l... 阅读全文
posted @ 2015-09-23 23:16 lixiaodi 阅读(186) 评论(0) 推荐(0) 编辑
摘要: "开": 是指对于组件的功能扩展是开放的,允许对其进行功能的扩展"闭": 是指对于原有代码的修改是封闭的,即不应该修改原有的代码 阅读全文
posted @ 2015-08-07 16:54 lixiaodi 阅读(115) 评论(0) 推荐(0) 编辑
摘要: 如果出现了:Some externally hosted files were ignored (user--allow-external xxx to allow)....请在终端输入pip -V你使用的pip版本估计是1.5的pip 1.5版本做出了修改,详情参考https://github.c... 阅读全文
posted @ 2015-08-07 14:40 lixiaodi 阅读(384) 评论(0) 推荐(0) 编辑
摘要: 首先是安装下载地址: https://pypi.python.org/pypi/mutagen安装: tar -zxvf mutagen-1.29.tar.gzcd mutagen-1.29./setup.py build./setup.py install使用:from mutagen.mp3 i... 阅读全文
posted @ 2015-08-07 14:24 lixiaodi 阅读(703) 评论(0) 推荐(0) 编辑
摘要: 一把辛酸泪。。。参考 http://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu在终端输入mkdir ~/ffmpeg_sources 创建一个新文件夹安装libx264sudo apt-get install libx264-dev安装libtoolsu... 阅读全文
posted @ 2015-08-04 17:09 lixiaodi 阅读(1832) 评论(0) 推荐(0) 编辑
摘要: 进入python shell>>> x = [1, 2, 3]>>> y = [i*2 for i in x]>>> y[2, 4, 6]>>> type(y)这样得到的y是list类型>>> y= (i*2 for i in x)>>> y at 0xb74ee89c>>>> type(y)将中括... 阅读全文
posted @ 2015-07-29 15:40 lixiaodi 阅读(310) 评论(0) 推荐(0) 编辑
摘要: 下载的时候需要从github直接下载,别处下载的包存在bug我用的是ubuntu系统安装:pip install git+http://github.com/ozgur/python-firebase.git/#master文档参考地址:http://ozgur.github.io/python-f... 阅读全文
posted @ 2015-07-28 16:47 lixiaodi 阅读(690) 评论(0) 推荐(0) 编辑