朗志工作室(Langzhi Studio)

江浙沪一带找工作中,欢迎联系
方向:爬虫、搜索 技术:python,rails,node.js

  博客园 :: 首页 :: 联系 :: 订阅 订阅 :: 管理
  5662 Posts :: 2 Stories :: 515 Comments :: 7 Trackbacks

公告

09 2010 档案

摘要: view-source:http://www.sina.com.cn阅读全文
posted @ 2010-09-30 16:13 lexus 阅读(16) | 评论 (0) 编辑

摘要: Python当前的默认编码设置setdefaultencoding2007年08月07日 星期二 下午 09:25在Python开发过程中,常常会遇到这样的问题,很让人头疼:......print s......Traceback (most recent call last): File "<stdin>", line 1, in ?UnicodeDecodeError: 'asci...阅读全文
posted @ 2010-09-30 12:37 lexus 阅读(35) | 评论 (0) 编辑

摘要: 1.增加了几条新闻2.google从最低的137收录反弹至430,不知什么原因,怎么还跟股票似的,触底反弹,http://www.google.com/webmasters/晚上上看又到142这个是什么啊,玩我呢阅读全文
posted @ 2010-09-30 10:40 lexus 阅读(16) | 评论 (0) 编辑

摘要: single_pattern一般元素,使用前缀single,数据库中对应single_pattern字段single_template约定为代码模板single_startNum_,后面以_结尾的为模板参数,字段不存在阅读全文
posted @ 2010-09-29 10:13 lexus 阅读(13) | 评论 (0) 编辑

摘要: 当你写程序时,应当倾向于清晰和可读性,而不是紧凑和精炼——选择简单,而不是精巧。只要你坚持这么做,你常常会发现你的代码跑得更快,而且也更强健,更易于维护。在真实世界中,对于99.9%的应用而言,遵循这个原则要比获得一点速度提升重要的多。阅读全文
posted @ 2010-09-29 09:38 lexus 阅读(20) | 评论 (0) 编辑

摘要: def post2locals(dict=locals(),func=None): for k,v in request.POST.iterallitems(): dict["_"+k]=v if func is not None and callable(func): dict["_"+k]=func(v)阅读全文
posted @ 2010-09-29 09:35 lexus 阅读(10) | 评论 (0) 编辑

摘要: 加入传真电话今天sogou在原来26页面的基础上收录了27页,在慢慢放出前来天抓的数据另外链接靠左上的好像是优先放出的阅读全文
posted @ 2010-09-28 23:21 lexus 阅读(16) | 评论 (0) 编辑

摘要: in my option,currently the best ide for py is apanta,becasue it provide a standalone package contains all want you wathnt,it's base on elipse,and do some extension & integaion,it's good for ror,bu...阅读全文
posted @ 2010-09-28 23:20 lexus 阅读(17) | 评论 (0) 编辑

js
摘要: http://json.bloople.net/#_outputjquery ui use his tab pluginhttp://gskinner.com/RegExr/online web regex tool阅读全文
posted @ 2010-09-28 23:16 lexus 阅读(12) | 评论 (0) 编辑

摘要: http://json.bloople.net/#_output jquery ajaxformhttp://bbs.blueidea.com/thread-2915478-1-1.html web正则阅读全文
posted @ 2010-09-27 19:55 lexus 阅读(20) | 评论 (0) 编辑

js
摘要: http://json.bloople.net/#_outputjquery ui use his tab plugin阅读全文
posted @ 2010-09-27 12:59 lexus 阅读(10) | 评论 (0) 编辑

摘要: http://www.phpletter.com/form_builder/http://www.phpletter.com/form_builder/demo.html阅读全文
posted @ 2010-09-27 08:23 lexus 阅读(15) | 评论 (0) 编辑

摘要: http://arlen-yeh.javaeye.com/blog/396102zeroclipboardhttp://www.cssbaby.com/archives/129在线正则re-try,for pythonhttp://re-try.appspot.com/?a=1阅读全文
posted @ 2010-09-27 00:19 lexus 阅读(75) | 评论 (0) 编辑

摘要: http://fromvega.com/wordpress/2007/07/14/easydrag-jquery-plugin/http://arlen-yeh.javaeye.com/blog/396102阅读全文
posted @ 2010-09-26 08:18 lexus 阅读(120) | 评论 (0) 编辑

摘要: http://lloydsheng.com/2010/06/how-install-django-flup-nginx-in-unbuntu.htmlUbuntu搭建Django+Flup+Nginx环境http://wiki.nginx.org/NginxNgxWSGIModuleConclusionflupisslightly faster thanuWSGIat this pointbutt...阅读全文
posted @ 2010-09-26 07:45 lexus 阅读(63) | 评论 (0) 编辑

摘要: Hey everyone. I tried to use os.chown() in the following manner: os.chown('filename', 'username', 'groupname') I got an error, and when I googled for this function I realized that I must pass the ...阅读全文
posted @ 2010-09-25 21:00 lexus 阅读(25) | 评论 (0) 编辑

摘要: http://docs.python.org/library/__future__http://stackoverflow.com/questions/3791903/which-python-version-need-from-future-import-with-statement/3792223#3792223up vote0down votefavoriteCurrently i'm us...阅读全文
posted @ 2010-09-25 06:41 lexus 阅读(45) | 评论 (0) 编辑

摘要: 今天快夜里12点查找百度收录,发现有836篇,其中有9-4,9-10,9-11号的收录的数据很多由于标题重复只显示了两面内容阅读全文
posted @ 2010-09-24 23:57 lexus 阅读(20) | 评论 (0) 编辑

摘要: http://elixir.ematia.de/trac/wiki/Recipes/SQLAlchemySchemaMigrationhttp://code.google.com/p/sqlalchemy-migrate/http://caneypuggies.alwaysreformed.com/wiki/DevelopingWithMigrationsdocument:http://packa...阅读全文
posted @ 2010-09-24 23:05 lexus 阅读(48) | 评论 (0) 编辑

摘要: This is a maintenance release for Python 0.13.0, fixing a number of issues. Read the changelog for details: http://www.gevent.org/changelog.html Get it from PyPI: http://pypi.python.org/pypi/gevent ...阅读全文
posted @ 2010-09-24 19:27 lexus 阅读(106) | 评论 (0) 编辑

摘要: Mondrian has been ported to Google App Engine:Rietveld. It's open source (Apache license), you can deploy it on your app-engine account, or port to vanilla Django and deploy on your own server.videoht...阅读全文
posted @ 2010-09-24 19:24 lexus 阅读(81) | 评论 (0) 编辑

摘要: --> Package Index BrowsepackagesPackagesubmissionListtroveclassifiersListpackagesRSS(last40updates)Python 3 packagesTutorialGet helpBug reportsCommentsDevelopersAbout News Documentation Download Commu...阅读全文
posted @ 2010-09-24 18:53 lexus 阅读(20) | 评论 (0) 编辑

摘要: http://sitemap.cn.yahoo.com/阅读全文
posted @ 2010-09-24 12:19 lexus 阅读(28) | 评论 (0) 编辑

摘要: sudo easy_install dict4iniConfigParser模块是python自带的读取配置文件的模块.通过他可以方便的读取配置文件. 这篇文章简单介绍一下读取配置文件的方法.配置文件.顾名思议就是存放配置的文件.下面是个例子[info]age = 21name = chensex = male其中[ ] 中的info是这段配置的名字下面age,name都是属性下面的代码演示了如何...阅读全文
posted @ 2010-09-24 09:00 lexus 阅读(34) | 评论 (0) 编辑

摘要: http://djangopeople.net/http://www.quarkbase.com/web-sites这个看着也清爽阅读全文
posted @ 2010-09-24 07:23 lexus 阅读(14) | 评论 (0) 编辑

摘要: http://nowhiring.com.au/242552+resume+Supervisord+cleaner+VIC+Other.aspxSupervisord cleaner• Able to handle a variety of jobs at once • Flexibility • Attention to detail • Have a f...阅读全文
posted @ 2010-09-24 07:20 lexus 阅读(9) | 评论 (0) 编辑

摘要: http://supervisord.org/api.htmlxmprpc inovke api document byteflow/django supervisord nginx = WINhttp://just-another.net/byteflowdjango-supervisord-nginx-win urllib2 - The Missing ManualHOWTO Fetch In...阅读全文
posted @ 2010-09-24 00:42 lexus 阅读(65) | 评论 (0) 编辑

摘要: RubyRubyRuby CoreJRubyIronRubyRailsRailsRails DeploymentRails I18NRails EnginesMiscRForumFerret Search EngineRadiant CMSMongrelGnome 2FXRubywxRubyNon-EnglishItalian Ruby GroupFrench Rails GroupSpanish...阅读全文
posted @ 2010-09-24 00:39 lexus 阅读(20) | 评论 (0) 编辑

摘要: BlogContactExisting ClientsAgile web development for businesses and creative firms Exceptional applications built using the Django web frameworkWe're Hiring!We’re looking for a Django developer ...阅读全文
posted @ 2010-09-24 00:29 lexus 阅读(9) | 评论 (0) 编辑

摘要: http://semetricmedia.com/our-teamvery IMPORTANT article reference:http://blog.crowproductions.de/2009/09/11/controlling-solr-with-supervisord/Controlling Solr withsupervisordA while ago I found a solu...阅读全文
posted @ 2010-09-24 00:17 lexus 阅读(18) | 评论 (0) 编辑

摘要: sudo easy_install supervisor它的配置文件使用;做为注释符另外有点类似于nginx使用supervisord -c supervisord.conf这样的方式在后台执行使用supervisorctl进行命令行的控制,这个有点像redis看了pycon上的视频,发现自已水平好菜,老外好牛,差距大,还没想到什么方法,只有多写代码来着。以下reference:http://li...阅读全文
posted @ 2010-09-24 00:16 lexus 阅读(76) | 评论 (0) 编辑

摘要: PyBlosxom is a lightweight file-based weblog system. The project started as a Python clone ofBlosxombut has since evolved into a beast of its own. PyBlosxom focuses on three things: simplicity, extens...阅读全文
posted @ 2010-09-23 23:50 lexus 阅读(26) | 评论 (0) 编辑

摘要: sudo easy_install supervisor它的配置文件使用;做为注释符另外有点类似于nginx使用supervisord -c supervisord.conf这样的方式在后台执行使用supervisorctl进行命令行的控制,这个有点像redis看了pycon上的视频,发现自已水平好菜,老外好牛,差距大,还没想到什么方法,只有多写代码来着。以下reference:http://li...阅读全文
posted @ 2010-09-23 23:40 lexus 阅读(295) | 评论 (0) 编辑

摘要: supervisor 管理后台进程文章分类:Python编程参考这篇文章加上一些notes:1 生成默认conf文件: echo_supervisord_conf > ...2 启动:superviserd -c 配置文件path eg:supervised -c t.ini 配置文件ini格式3 控制:supervisorctrl -i 进入交互模式用Supervisor管理后台守护进程2...阅读全文
posted @ 2010-09-23 21:54 lexus 阅读(75) | 评论 (0) 编辑

摘要: ff,实在是不能忍了,有scribefile插件chrome,+firebug lite+switch proxy基本上能用用了,日常的工作,复杂一些的工作还会启ffhttp://longfeiwu696.blog.chinabyte.com/2010/09/01/180/linux中的重定向2010-07-27 16:50以下内容来自:《joyfire 笔记》http://joyfire.net...阅读全文
posted @ 2010-09-23 18:52 lexus 阅读(21) | 评论 (0) 编辑

摘要: 前台(foreground)组合键将挂起终端中正在运行的程序,然后您就可以用 bg 命令将其放到后台去执行。请注意,在后台运行图形应用程序有时候是有用处的,这样可以在终端下显示这个程序的出错信息,虽然这对您可能没有直接的帮助,当如果碰到了麻烦,向别人询问时,这些出错提示就有用武之地了。一些图形程序,很可能还处在测试期(Beta),尽管在后台执行,也会在终端中输出一些信息。如果您对此不满,可以用下面...阅读全文
posted @ 2010-09-23 18:51 lexus 阅读(21) | 评论 (0) 编辑

摘要: 前台(foreground)组合键将挂起终端中正在运行的程序,然后您就可以用 bg 命令将其放到后台去执行。请注意,在后台运行图形应用程序有时候是有用处的,这样可以在终端下显示这个程序的出错信息,虽然这对您可能没有直接的帮助,当如果碰到了麻烦,向别人询问时,这些出错提示就有用武之地了。一些图形程序,很可能还处在测试期(Beta),尽管在后台执行,也会在终端中输出一些信息。如果您对此不满,可以用下面...阅读全文
posted @ 2010-09-23 17:38 lexus 阅读(15) | 评论 (0) 编辑

摘要: http://www.linuxquestions.org/questions/linux-general-1/at-warning-commands-will-be-executed-using-bin-s-491520/ #1RGummiMemberRegistered: Nov 2005Posts: 90Rep: at - warning: commands will be e...阅读全文
posted @ 2010-09-23 17:35 lexus 阅读(28) | 评论 (0) 编辑

摘要: rebootshutdown -r nowinit 6以上为重启haltshutdown -h nowpoweroffinit 0以上为关机阅读全文
posted @ 2010-09-23 13:04 lexus 阅读(37) | 评论 (0) 编辑

摘要: http://www.4pang.com/2010/09/21/%E7%94%A8python%E7%BC%96%E5%86%99linux%E5%AE%88%E6%8A%A4%E8%BF%9B%E7%A8%8B.htmlgood good article linux shell简介,especially 第三章输入输出的重定向http://www.linuxsir.org/main/?q=nod...阅读全文
posted @ 2010-09-23 12:25 lexus 阅读(24) | 评论 (0) 编辑

摘要: abbr. (信末的)附言,再者(=postscript)=PSGoogle提供的广告:一对一在线雅思口语培训-www.EQEnglish.com外教+专业雅思教材,注册试听迅速提高雅思口语分数英英解释-查看全部海词新推在线学习应用!营养学名词免费领取海词特制礼物英英解释:名词 p.s.:a note appended to a letter after the signature同义词:post...阅读全文
posted @ 2010-09-23 12:19 lexus 阅读(37) | 评论 (0) 编辑

摘要: http://www.4pang.com/2010/09/23/%E7%B2%BE%E5%BD%A9putty%E6%95%99%E7%A8%8B.html重定向从命令提示符的错误消息: STDERR/STDOUT点击这里查看逐句中英文对照机器翻译查看机器翻译免责声明查看本文应用于的产品本页展开全部|关闭全部概要将从一个应用程序使用的输出重定向时,">"符号还是打印到屏幕的错误消息。这是因为...阅读全文
posted @ 2010-09-23 12:01 lexus 阅读(63) | 评论 (0) 编辑

摘要: rt阅读全文
posted @ 2010-09-23 00:34 lexus 阅读(62) | 评论 (0) 编辑

摘要: http://www.himysql.com/python/tweekrecon-a-regular-expression-tool.html有两个FEEDs:国内的 FeedSky更新慢(从发布到显示大约4小时),但是总是可以访问;国外的,FeedBurner更新快,发布之后立即更新,但是只有那些翻墙无障碍的人才能享受到这种便利。。阅读全文
posted @ 2010-09-23 00:16 lexus 阅读(26) | 评论 (0) 编辑

摘要: Python里面可以这样猜系统encoding:print sys.stdin.encodingcp936阅读全文
posted @ 2010-09-23 00:04 lexus 阅读(30) | 评论 (0) 编辑

摘要: http://www.cdolivet.net/阅读全文
posted @ 2010-09-22 22:25 lexus 阅读(76) | 评论 (0) 编辑

摘要: Although cron requires that each entry in a crontab end in a newline character, neither the crontab command nor the cron daemon will detect this error. Instead, the crontab will appear to load normall...阅读全文
posted @ 2010-09-22 22:03 lexus 阅读(105) | 评论 (0) 编辑

摘要: http://www.regexbuddy.com/在线正则开源http://code.google.com/p/regexpal/http://regexpal.com/这个网站仿regexbuddy值得学习好用的正则表达式在线测试工具 reWork(支持search, replace, multiple, split等操作),个人推荐这款。regex.larsolavtorvik.com(PH...阅读全文
posted @ 2010-09-22 21:46 lexus 阅读(32) | 评论 (0) 编辑

摘要: http://getfirebug.com/releases/lite/chrome/代码着色http://code.google.com/p/google-code-prettify/not support textareahttp://codepress.sourceforge.net/index.phpthis is support textareahttp://www.cdolivet.c...阅读全文
posted @ 2010-09-22 21:20 lexus 阅读(142) | 评论 (0) 编辑

摘要: EtherPadGoogle has acquired AppJet Inc. and its EtherPad collaboration product and technology.The EtherPad.com servers have now been shut down, according tothe timetableannounced previously.Google rec...阅读全文
posted @ 2010-09-22 20:26 lexus 阅读(17) | 评论 (0) 编辑

摘要: 节选自limdou在邮件列表中的1. config.ini所在的目录应该是运行目录,而不是当前目录。当前目录有可能随时在变,而运行目录则与程序所在的位置有关。2. sys.path是Python导入模块时搜索的目录,与当前目录无关。在windows下会自动将运行所在的目录加入sys.path,在linux可能就不同的。不知道你在linux下试过吗?其实你的问题应该是:config.ini与执行文件...阅读全文
posted @ 2010-09-22 20:25 lexus 阅读(15) | 评论 (0) 编辑

摘要: 节选自limdou在邮件列表中的1. config.ini所在的目录应该是运行目录,而不是当前目录。当前目录有可能随时在变,而运行目录则与程序所在的位置有关。2. sys.path是Python导入模块时搜索的目录,与当前目录无关。在windows下会自动将运行所在的目录加入sys.path,在linux可能就不同的。不知道你在linux下试过吗?其实你的问题应该是:config.ini与执行文件...阅读全文
posted @ 2010-09-22 20:21 lexus 阅读(18) | 评论 (0) 编辑

摘要: python模块commands的使用2009-02-02 12:03作者:李春林来源: http://hi.baidu.com/leechl平时都是使用Perl较多, 要获得shell命令的输出只需要`cmd`就可以了, 需要得到命令执行的状态则需要判断$?的值, 在Python中有一个模块commands也很容易做到以上的效果.看一下三个函数:1). commands.getstatusout...阅读全文
posted @ 2010-09-22 19:42 lexus 阅读(11) | 评论 (0) 编辑

摘要: i found on online servicehttp://www.onlinecronjobs.com,which provide cron online,it's aim to some isp only provide lamp etc.then you can upload a polling or shceaual operater,and in onlinescript,give ...阅读全文
posted @ 2010-09-22 10:21 lexus 阅读(17) | 评论 (0) 编辑

摘要: Adding Dates and Times in PythonMon, Oct 19, 2009Tech TipsUsing the built-in modulesdatetimeandtimedelta, you can perform date and time addition/subtraction inpython:view plaincopy to clipboardprint?f...阅读全文
posted @ 2010-09-22 10:00 lexus 阅读(40) | 评论 (0) 编辑

摘要: 缘起: 我的一个项目一些参数需要可设定,于是做了一个web页面用来填充这些参数,填充完了之后再进行执行该脚本,返回该脚本的输出或是错误,整个工作在web上完成。问题: 在操作的过程中遇到的问题是,如何给脚本传入数据,原先是写死在脚本中, 从一个指定的文件里读数据进行处理,但是不够灵活,另外脚本执行完了还有一个垃圾数据文件不优雅,于是想到使用stdin可以重定向来导入数据,如果单纯从stdin导入...阅读全文
posted @ 2010-09-22 07:58 lexus 阅读(86) | 评论 (0) 编辑

摘要: http://docs.python.org/library/code.htmlhttp://codeidol.com/python/python3/Parallel-System-Tools/Pipes/http://www.linuxjournal.com/article/2156Python:os模块的进程管理2009-07-09 11:59有两种方式来实现并发性,一种方式是让每个&ldqu...阅读全文
posted @ 2010-09-22 00:50 lexus 阅读(262) | 评论 (0) 编辑

摘要: Python模块学习 ---- StringIO, cStringIO 内存文件 收藏 StringIO的行为与file对象非常像,但它不是磁盘上文件,而是一个内存里的“文件”,我们可以将操作磁盘文件那样来操作StringIO。一个简单的例子,让你对StringIO有一个感性的认识:1#coding=gbk23importStringIO,cStringIO,sy...阅读全文
posted @ 2010-09-21 19:45 lexus 阅读(220) | 评论 (0) 编辑

摘要: create=twf.TableForm('site_create',action='/sites/create.html',children=[ twf.TextField("show_name",label_text="chinese site name:"), twf.TextField("name",label_text="english short site name:"), twf.T...阅读全文
posted @ 2010-09-21 15:26 lexus 阅读(15) | 评论 (0) 编辑

摘要: http://www.scriptlearn.com/archives/1981阅读全文
posted @ 2010-09-21 14:53 lexus 阅读(42) | 评论 (0) 编辑