Thursday, July 08, 2010

Matlab, Python 到 Jython

Matlab,這個軟體我用了快十五年了,用起來相當順手。無奈他是個營利公司作的付費軟體,在作 Demo 展示或與別的語言介接時,常常要安裝一些額外的程式才能運作。Python 是我第一個考慮替換的方案。Python 有很相近的直譯式特性,語法也算簡單。打著「想完了方法,就寫完程式」的推薦詞,相當吸引懶惰的我。

Python 的套件很豐富;可以用 Numpy 作數學運算,用 Matplotlib 出美美的曲線圖,用 Py2exe 做成執行檔帶著跑,或是用 Portable Python 帶著到處寫程式或展示,十分方便。不過,小組在發展應用上,都是一貫使用 Java,我也只好放棄用 C 寫成的 Python,改用 Jython 了。

Jython 或許是發展時間比較短,所以沒有像 Python 那麼多額外的套件,不過他可以很容易跟原來的 Java 套件銜接,倒是解決了這樣的問題。畫圖的部分,我想就用 JFreeChart 來替代 Matplotlib,不過 Numpy 倒是沒什麼好的替代方案,可能要靠自己寫或 Java 的套件了。

Monday, July 05, 2010

安裝 Python 2.6.5 + Numpy 1.4.1 + Matplotlib 0.99.3 + Eclipse PyDev 1.5.9



環境建製請依下列步驟順序:


安裝 Python

Matplotlib 目前只支援 Python 2.6,所以要選擇下載 Python 2.6.5。

下載位置:http://www.python.org/download/releases/


安裝 Numpy

下載位置:http://sourceforge.net/projects/numpy/files/

安裝 Scipy

 下載位置:http://sourceforge.net/projects/scipy/files/

安裝 Matplotlib

下載位置:http://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-0.99.3/ 

安裝 IPython

 下載位置:http://ipython.scipy.org/moin/Download

安裝 Eclipse 及 PyDev (編輯環境)

下載 Eclipse,解壓縮後擊點即可開啟。

在 Eclipse中的「Help」=>「Software Updates...」=>「Available Software」 =>「Add Site...」

加入:http://pydev.org/updates

下載 PyDev Plug-in,之後便依照只是完成 Plug-in 的安裝。

在「Windows」=>「Performances」=>「Pydev」=>「Interpreter-Pydev」 指定 Python 執行檔的位置。

完成!

Sunday, April 25, 2010

Top 5 Web Trends of 2009: Internet of Things

Written by Richard MacManus / September 11, 2009
This week ReadWriteWeb is running a series of posts analyzing the 5 biggest Web trends of 2009. So far we've explored these trends: Structured Data, The Real-Time Web, Personalization, Mobile Web / Augmented Reality. The fifth and final part of our series is about the Internet of Things, when real world objects (such as fridges, lights and toasters) get connected to the Internet. In 2009, this trend has ramped up and is adding a significant amount of new data to the Web.
In this post we'll see how companies as big as IBM and as small as Pachube are building up this new world of Internet data and services.



What is The Internet of Things?

The Internet of Things is a network of Internet-enabled objects, together with web services that interact with these objects. Underlying the Internet of Things are technologies such as RFID (radio frequency identification), sensors, and smartphones.
The Internet fridge is probably the most oft-quoted example of what the Internet of Things will enable. Imagine a refrigerator that monitors the food inside it and notifies you when you're low on milk. It also perhaps monitors all of the best food websites, gathering recipes for your dinners and adding the ingredients automatically to your shopping list. This fridge knows what kinds of foods you like to eat, based on the ratings you have given to your dinners. Indeed the fridge helps you take care of your health, because it knows which foods are good for you.
However, we're not quite at that level of sophistication yet in the Internet of Things. As we discovered in our Internet Fridges State of the Market in July, current internet fridges are more about entertainment than utility.

IBM and The Internet of Things

One of the leading big companies in Internet of Things is IBM, which offers a range of RFID and sensor technology solutions. IBM has been busy working with various manufacturers and goods suppliers in recent months, to introduce those solutions to the world.
For example IBM announced a deal at the end of June with Danish transportation company Container Centralen. By February 2010, Container Centralen undertakes to use IBM sensor technology "to allow participants in the horticultural supply chain to track the progress of shipments as they move from growers to wholesalers and retailers across 40 countries in Europe." Specifically this refers to transportation of things like flowers and pot plants, which are very sensitive to the environment they travel in. Having sensors as part of the entire travel chain will allow participants to monitor conditions and climate during travel. Essentially it makes the travel process very transparent.

Pachube: Building a Platform for Internet-Enabled Environments

IBM is a leading bigco active in the Internet of Things. At the other end of the spectrum is a small UK startup which has impressed us a lot this year: Pachube. It was one of 5 Internet of Things services that we profiled in February and we followed up with an in-depth look at the service in May. Pachube, (pronounced "PATCH-bay") lets you tag and share real time sensor data from objects, devices, buildings and environments both physical and virtual. In a blog pos by Tish Shute, Pachube founder Usman Haque explained that Pachube is about "environments" moreso than "sensors." In other words, Pachube aims to be responsive to and influence your environment - for example your home.

Conclusion

What's the point of all this new object data from the Internet of Things? As well as the new types of functionalities it will enable, such as health monitoring by Internet fridges, the sheer amount of new data about an object should lead to better quality goods and better decision-making by consumers. For example when you buy a loaf of bread from the grocery store, it will have its own RFID tag - which theoretically can tell you when it was produced, when it was packaged, how long it traveled to get to the store, whether the temperature during its travel was optimal, the pricing history of the product, what the precise ingredients are and associated health benefits (or dangers), and much more information.

That ends our look at the 5 biggest trends of the Web in 2009. First thing next week we will post a round-up, along with a downloadable presentation.
ReadWriteWeb's Top 5 Web Trends of 2009:
  1. Structured Data
  2. The Real-Time Web
  3. Personalization
  4. Mobile Web & Augmented Reality
  5. Internet of Things

Wednesday, April 14, 2010

King's College


世界好大, 我好渺小...
我的極限在哪裡呢?

Tuesday, March 23, 2010

怎麼都沒印象啦

媽的!
電機機械我學了兩次,怎麼連最基本的都不知道。那時是怎麼學的(搥牆)!

Monday, March 22, 2010

Latex 測試

在 Blogger 上用 Latex 寫數學式子。

http://watchmath.com/vlog/?p=438 (此網頁已經掛了,所以要補充一下怎麼作的)

  1. 在 [版面配置] 裡按 [新增小工具]
  2. 選擇 [基本] 中的 [HTML/JavaScript] 模組
  3. 將此網誌描述的程式碼貼入 [內容] 中就 (標題可以不用填) 


  • 完成!

  • 之後要寫就用 $ 符號把數學式框起來就可以了。


    說真的還蠻好用的,雖然在編輯預覽時候沒辦法正確顯示,要等到正式發佈才知道是否正確。

    測試: $x^n+y^n=z^n$