Source: RedHat / CentOS : How to change currently active slave interface of bonding online
Continue reading »Source: Format string dynamically
You can do this using the str.format()
method.
>>> width = 20
>>> print("{:>{width}} : {:>{width}}".format("Python", "Very Good", width=width))
Python : Very Good
Continue reading » Source: Best of Python3.6 f-strings
This piece is primarily meant for those new to Python. These include mathematicians, economists, and so on who want to use Python within a Jupyter environment. Here is a quick guide on how to make Best of Jupyter.
Continue reading »Source: 不止一種方法去做一件事
不止一種方法去做一件事(There’s more than one way to do it,TMTOWTDI或TIMTOWTDI,發音為「Tim Toady」)是一條Perl俗語。這個語言本身就是用這個「不要教程式設計師如何編程」的主意設計的。這使得很容易可以寫出極度雜亂的程序,但是,根據支持者對這個俗語的理解,這也可以很容易地寫出簡潔的語句。
Continue reading »Source: 談「 Sparse is better than dense 」
在 PEP 20 – The Zen Of $Python$ 有一句提到,「 Sparse is better than dense 」。這裡舉個例,計算 standard deviation
Continue reading »Source: 認識 300 dpi
2014 年底我又做了一些印刷品,雖然距離上次做印刷品已經過了兩三年,但印刷的基本常識只要了解,就一輩子不會忘,但不管做幾次印刷,總是會聽到「300 dpi」這個專有名詞,不論是往來的信件或電話,印刷廠總是會要求要給 300 dpi 的圖,傳遞訊息的人也三不五時講個 300 dpi 來凸顯一下自己的專業,彷彿做印刷,不談「300 dpi」就渾身不對勁。
Continue reading »Source: 飯後千萬別立刻刷牙!5錯誤刷牙習慣,蛀牙好不了
【早安健康/林明慧編譯】根據國民健康署調查發現, 國人蛀牙盛行率接近9成,罹患牙周病的比率甚至高達99.2%,居亞洲之冠。台灣12歲學童恆齒齲齒指數為2.5顆,也遠高於全球平均1.67顆。缺牙不僅影響外觀,還會提高心臟病、糖尿病風險,牙周病患者的中風風險更是一般人的2倍!
Continue reading »