1
摘要: 先留个坑在这里,接下来两个月就是拼命实现这个东西了!第一阶段的难题: 1. razor 源码没有认真阅读,运行的整个细节流程还没能印入脑子里,前面做了很多半途而废的工作。 2. 在运营同事明确提醒,分发内核最好使用redhat和suse的情况下,图省事,直接使用了razor附带的MK,目前正痛苦地给MK装针对硬件的驱动。 3. razor的模型与流程还不能完全满足要求,尤其的开始安装OS之前的部分,需要重新设计。 4. Ruby依然不熟悉,之后的代码质量存在很大风险。第二阶段(05.01): 时间点上应该进入第二阶段了,新到的20台机器已经装配就绪,而且只需要安装原生的ubuntu ... 阅读全文
posted @ 2013-02-28 23:41 Alex_Waiter 阅读(437) 评论(2) 推荐(0)
摘要: A test case for a database-backed Web site isn't much use if there isn't any data in the database. To make it easy to put test data into the database, Django's customTestCaseclass provides a way of loadingfixtures.(see detail here)Once you've created a fixture and placed it in afixtu 阅读全文
posted @ 2012-10-30 22:15 Alex_Waiter 阅读(750) 评论(0) 推荐(0)
摘要: To pack anddistribute your own python modules, you need to create a package with setup.py.Ensure you have install setuptools package before we start this tutorial.Here we will take dnsms module as example.First of all, let's make the layout of the project like below:dnsms_client/dnsms/examples/C 阅读全文
posted @ 2012-09-21 20:07 Alex_Waiter 阅读(1402) 评论(0) 推荐(0)
摘要: 1.What is Git ?Distributed Version Control SystemGit thinks of its data like a set of snapshots of a mini filesystem.2. InstallDownload url for windows:http://code.google.com/p/msysgit/downloads/listInstall in Linux:sudo apt-get install git-coreyum install git-core3. configurationgit help <verb&g 阅读全文
posted @ 2012-08-19 15:36 Alex_Waiter 阅读(525) 评论(0) 推荐(0)
摘要: python中编码问题是一个必然会遇见的问题,尤其是中文编码,一不小心就出现乱码。为此,一个绝对不能绕过的模块codecs, 可以看出python对编码这块的支持甚是强大。另有附带codecs代码示例的博文,顺着文章一通敲下来,python中的编码问题自然就不是问题了.在使用python写一个简单爬虫的过程中,我遇见一个相关问题,也算是比较奇葩了,瞎折腾了一晚上才算是解决。本来抓取网页内容编码是 "GB2312", 传入值以后使用decode('gb2312', 'ignore')后解码为unicode,再使用Beautiful Soup进行 阅读全文
posted @ 2012-07-31 23:38 Alex_Waiter 阅读(2856) 评论(2) 推荐(0)
摘要: 昨天面试的题目,也是很经典的问题,当时由于提问的表述有问题,直接跳过了,回来以后找到这个题目,仔细看了一下,有一个改进算法很是精妙,具体如下:原文链接:http://blog.csdn.net/anchor89/article/details/6055412题目:定义栈的数据结构,要求添加一个min函数,能够得到栈的最小元素。要求函数min、push以及pop的时间复杂度都是O(1)。注:这是06年一道Google的面试题.先来说个常规解和他的一个优化,常规解的时间复杂度符合要求,但需要线性的额外空间.常规解(参考http://zhedahht.blog.163.com/blog/static 阅读全文
posted @ 2012-07-24 12:36 Alex_Waiter 阅读(287) 评论(1) 推荐(1)
摘要: 1 #!/usr/bin/python 2 ## A file handling script, including functions that could search file by key 3 ## and rename file by appending key value to the file names. 4 5 import os 6 import shutil 7 import copy 8 9 def get_INV_list(key_file):10 """ read key_file and get key values into lis 阅读全文
posted @ 2012-07-09 20:32 Alex_Waiter 阅读(260) 评论(0) 推荐(0)
摘要: 已经提出辞职,也许这会是人生的一个转折点,也可能只是又一个失败的开始,未来谁也不能保证,但是当前最重要的事情是踏实地将技术掌握好。技术学习目标技术类别/掌握程度熟练掌握了解Programming LanguagePythonBash & PHP & JSFrameWorkDjangoThrift, TornadoDataBaseMySQLMongoDBWeb page skillHTML & CSSHTML5 & CSS3学习途径:Read the Django book, and finish all exercixses.Read "Learn P 阅读全文
posted @ 2012-06-16 22:56 Alex_Waiter 阅读(141) 评论(0) 推荐(0)
摘要: 1. Python 中没有单独的字符数据类型(类似于char),故一个字符就是长度为1的字符串。 2. 片段,word[0:2],第一个缺省值为0,第二个为其长度,于是word[:]得到的是word的一个副本。 3. 不合理的片段下标可以得到解释,过大的下标被换成字符串长度,上界小于下界则返回空串,下标为负数则从右向左数。 4. 记住片段意义的最好方法是把下标看成是字符之间的点,第一个字符的左边界号码为0。有n个字符的字符串的最后一个字符的右边 界下标为n,例如: +---+---+---+---+---+ | H | e | l | p | A | +---+---+---+---+--.. 阅读全文
posted @ 2012-06-06 20:24 Alex_Waiter 阅读(219) 评论(0) 推荐(0)
摘要: 初次接触python是在2009年秋,直到现在才有认真去学习了解。正好最近在弄工作日志,需要重复合并多个excel文档,于是折腾了一个多星期,修修补补地用python写了这么一个小东西。1.用于合并多个excel文档,可以指定是第几个工作表,默认为最后一个工作表。2.比较简陋,只是单纯地将每行数据合到一个文档中,并没有将格式也带到合并文档中。3.只能用于excel2003的文档合并。4.代码是在window下,Python自带IDEL里写的,python版本为2.7.3,具体代码如下: 1 ##2012-05-06 14:27 2 # -*- coding:utf-8 -*- 3 fro... 阅读全文
posted @ 2012-05-10 21:40 Alex_Waiter 阅读(1088) 评论(0) 推荐(0)
1