Tuesday, 12 January 2010

[Blog post] 清华c语言门告诉我学open source软件是没用的

清华c语言门告诉我学open source软件是没用的

crossz | January 12, 2010 at 1:29 pm | Tags: life | Categories: life | URL: http://wp.me/pthU9-hR

终于有个'门'事件让我跟上潮流了。清华c语言门,是讲述某学生mm,因未完成c语言作业,而劈腿,开房的事。

我这么多年一直唾弃微软来着,自己研究的也都是一些开源的'新兴'语言或者linux那样的系统。这么多年,别说一个mm,就连一个男同僚都没找到,曾经无数次想带谁谁谁和我一起玩这些,中途都被放鸽子。这次c语言men让我明白了c语言比较实惠的用处,和开源软件在中国是多么的吃不开。

Add a comment to this post

--


WordPress

WordPress.com | Thanks for flying with WordPress!

Unsubscribe | Publish text, photos, music, and videos by email using our Post by Email feature. | Signup with WordPress.com

Monday, 11 January 2010

[Blog post] 太多人拿电影说事了

太多人拿电影说事了

crossz | January 11, 2010 at 5:50 am | Tags: life | Categories: life | URL: http://wp.me/pthU9-hK

记得上高中那阵,不得不听张学友。上了大学不得不看电影,听摇滚。到了英国也有人经常用看过电影的数量来显示自己的能力和魅力。回到了国内,最近不看Avatar,阿凡达,就轮番被人推荐,甚至教导和侮辱。

其实英国还好,那几年里,我就是不看电影,也没多少人说什么。但是中国呢,阿凡达让电影院变成2012了。

这依然验证着我对目前中国教育的认识:我不想做自己的东西,我只想做别人做过的东西。电影这些娱乐领域,中国特色依旧明显。

Add a comment to this post

--


WordPress

WordPress.com | Thanks for flying with WordPress!

Manage your subscriptions | Publish text, photos, music, and videos by email using our Post by Email feature. | Signup with WordPress.com

[Blog post] python reads excel

python reads excel

crossz | January 11, 2010 at 1:12 am | Tags: python tutorial howto | Categories: life | URL: http://wp.me/pthU9-hH

Use the excellent xlrd package, which works on any platform. That means you can read Excel files from Python in Linux! Example usage:

Open the workbook

import xlrd wb = xlrd.open_workbook('myworkbook.xls')

Check the sheet names

wb.sheet_names()

Get the first sheet either by index or by name

sh = wb.sheet_by_index(0) sh = wb.sheet_by_name(u'Sheet1')

Iterate through rows, returning each as a list that you can index:

for rownum in range(sh.nrows):     print sh.row_values(rownum)

If you just want the first column:

first_column = sh.col_values(0)

Index individual cells:

cell_A1 = sh.cell(0,0).value cell_C4 = sh.cell(rowx=3,colx=2).value

(Note Python indices start at zero but Excel starts at one)

Add a comment to this post

--


WordPress

WordPress.com | Thanks for flying with WordPress!

Manage your subscriptions | Publish text, photos, music, and videos by email using our Post by Email feature. | Signup with WordPress.com

My Photo
UK Cross
London, United Kingdom
twitter.com/zhengxin
View my complete profile