albert's blog
2016/04/04
[Python] Using Pickle to read/write file
›
Using pickle is straightforward: import the required module, then use dump() to save your data and, some time later, load() to restore it. ...
2016/04/03
[Python] Install Python IDE for Eclipse
›
PyDev is a plugin that enables Eclipse to be used as a Python IDE (supporting also Jython and IronPython). It uses advanced type inferenc...
2016/04/02
[閱讀筆記] 圖解國富論 Part 1
›
自利(self-love)原則:經濟人活動的主要動力是個人利益 (自利),而要滿足個人利益,只能透過和別人交換服務 (滿足自己也滿足他人)。人的自利行為就是個人對自身利益的追求過程,在『看不見的手』的指引下,經濟人追求自身利益的最大化的過程中,也促進社會公共利益的增長 ...
2016/04/01
[閱讀筆記] 你還在努力省錢來投資理財嗎? Part1
›
如果某樣商品複雜又難以理解,你很可能根本不該投資 儲蓄和投資的基本原則很容易學,但不代表我們就學會了 人生無常,不會永遠照我們想像的方式運作 超級富豪與平凡人的鴻溝越來越大,你根本無法靠投資來縮小差距。撇開少數福星高照的dot com百萬富豪不談,股市和房...
2016/03/31
2016/03 Travel
›
台大杜鵑花節
2016/03/09
[Python] File I/O example
›
Example 1: Read file and print its content 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 import os "...
2016/03/08
[Python] IF...ELIF...ELSE Statements
›
Example Assume I have four exam type, each type has its passing scores. I will provide a method, as people fill in exam type and scores, ...
2016/03/07
[Python] Exception Handling
›
Problem Here is my Python program: 1 2 3 4 5 6 def checkNum (num): try : if (num > 0 ): print ( "* number > 0...
2016/03/06
[Python] TypeError: Can't convert 'int' object to str implicitly
›
Problem I have a Python program as bellows: 1 2 3 4 5 def checkNum (num): if (num > 0 ): print ( "* number > 0 ...
2016/03/05
[Python] File I/O in Python : UnicodeDecodeError
›
Problem I would like to open a text file and prints its content 1 2 3 4 5 >>> import os >>> os . chdir ( "D:...
‹
›
Home
View web version