上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 23 下一页
摘要: run some tasks which could look like CRON within linux/UNIX in python.Here's a demo which run on ubuntu12.04sudo pip install apschedulerthen1) run a t... 阅读全文
posted @ 2014-05-16 14:20 spaceship9 阅读(621) 评论(0) 推荐(0) 编辑
摘要: Here is a brief introduction and package of dotfiles for linux/unix user.I think there are enough informative description about the package.Here is th... 阅读全文
posted @ 2014-05-15 10:12 spaceship9 阅读(222) 评论(0) 推荐(0) 编辑
摘要: I did a demo about how to deploy other python apps served by a 'supervisord' daemon processor on github.Here is the link. http://github.com/xros/super... 阅读全文
posted @ 2014-05-15 09:55 spaceship9 阅读(382) 评论(0) 推荐(0) 编辑
摘要: 因为想把一段文字分词,所以,需要明确一定的词语关系。在网上随便下载了一篇中文小说。随便的txt小说,就1mb多。要数数这1mb多的中文到底有多少字,多少分词,这些分词的词性是什么样的。这里是思路1)先把小说读到内存里面去。2)再把小说根据正则表达法开始分词,获得小说中汉字总数3)将内存中的小说每段POST到提供分词服务的API里面去,获取分词结果4)按照API说明,取词素材:1、linux/GNU => debian/ubuntu 12.04/Linuxmint 13 Preferred2、python3、中文分词API, 这里我们使用的是 http://www.vapsec.com/f 阅读全文
posted @ 2014-03-19 14:21 spaceship9 阅读(5466) 评论(0) 推荐(0) 编辑
摘要: There is a project which is deployed within django. So its authentication system is built from Django itself.But ususually we want to get good use of it. And we don't want to build another system to manage 'user' information.So, we can use django within tornado. I mean use tornado more.W 阅读全文
posted @ 2014-03-06 17:31 spaceship9 阅读(398) 评论(0) 推荐(0) 编辑
摘要: Supervisor 管理后台守护进程参考原文如下:http://codinn.com/people/brant/notes/110948/做了一些注释+++++++++++引用开始++++++++++++自己开发的应用往往也希望做到随系统自动启动, 而且启动之后最好还能方便的控制其停止/重启. 传统的做法是在/etc/init.d/下建立启动脚本, 但这个方法非常繁琐, 容易出错, 而且不同服务器/不同版本的配置又有差异.通常需要借助一些辅助工具. 常用的管理工具有runit,daemontools以及用 Python 开发的Supervisor. 其中以 Supervisor 最为易用, 阅读全文
posted @ 2014-03-03 09:36 spaceship9 阅读(1337) 评论(0) 推荐(0) 编辑
摘要: 原文地址:http://www.ruanyifeng.com/blog/2013/12/getting_started_with_postgresql.html期间,作者有写错的地方,已经做更改了。除了纯净的命令行来操作外,还可以使用pgadmin3 可视化工具来操作。我尝试了一下,感觉非常不错。结... 阅读全文
posted @ 2014-03-03 09:21 spaceship9 阅读(508) 评论(0) 推荐(0) 编辑
摘要: 原文地址:http://www.cnblogs.com/pumaboyd/archive/2008/08/11/1265416.html红色的为标注信息+++++++++++++++++引用+++++++++++++++++++++>PY提供INI配置文件的操作关于配置文件,很直观的感觉就是XML文件。对于XML文件的使用大家还是很喜欢的。但有时候只是简单的一个程序,实现一个简单的name:value关系。用XML文件就没这个必要。这种要求很符合MS的INI文件格式。所以这里主要介绍一下对INI文件的操作方式,而且最近写的第一个PY应用程序也是使用了INI什么是INI 文件PY所支持的I 阅读全文
posted @ 2014-03-03 09:15 spaceship9 阅读(494) 评论(0) 推荐(0) 编辑
摘要: I spent several days on building a system about this. And make it work well with serveral thousand lines of codes. 阅读全文
posted @ 2014-02-27 10:46 spaceship9 阅读(298) 评论(0) 推荐(0) 编辑
摘要: 先说说思路一、安装这些东西,tornado, supervisor( sudo pip install supervisor 在linux 系统上), 安装 nginx (sudo apt-get install nginx -y)二、让supervior 和 已经写好的tornado 服务挂钩用supervisor 来管理服务和进程在命令行里面使用。然后,再在 supervisord.conf 最后面添加这几行这里tornado center.py 的本地服务地址是8100,写在center.py 文件里面了。当然为了标准,我们可以添加这几行在这里面,用来产看进程id,还有进程log(uni 阅读全文
posted @ 2014-02-17 17:33 spaceship9 阅读(1916) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 23 下一页