2012年10月31日 星期三

[mahout]run integration example


peicheng@TW-:~/code/mahout-distribution-0.7111/integration$ mvn jetty:run
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building Mahout Integration
[INFO] task-segment: [jetty:run]
[INFO] ------------------------------------------------------------------------
[INFO] Preparing jetty:run
[INFO] [resources:resources {execution: default-resources}]
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 4 resources
[INFO] [compiler:compile {execution: default-compile}]
[INFO] Nothing to compile - all classes are up to date
[INFO] [resources:testResources {execution: default-testResources}]
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] [compiler:testCompile {execution: default-testCompile}]
[INFO] Nothing to compile - all classes are up to date
[INFO] [jetty:run {execution: default-cli}]
[INFO] Configuring Jetty for project: Mahout Integration
[INFO] Webapp source directory = /home/peicheng/code/mahout-distribution-0.7111/integration/src/main/webapp
[INFO] web.xml file = /home/peicheng/code/mahout-distribution-0.7111/integration/src/main/webapp/WEB-INF/web.xml
[INFO] Classes = /home/peicheng/code/mahout-distribution-0.7111/integration/target/classes
2012-10-31 10:33:54.999::INFO: Logging to STDERR via org.mortbay.log.StdErrLog
[INFO] Context path = /mahout-integration
[INFO] Tmp directory = determined at runtime
[INFO] Web defaults = org/mortbay/jetty/webapp/webdefault.xml
[INFO] Web overrides = none
[INFO] Webapp directory = /home/peicheng/code/mahout-distribution-0.7111/integration/src/main/webapp
[INFO] Starting jetty 6.1.10 ...
2012-10-31 10:33:54.075::INFO: jetty-6.1.10
2012-10-31 10:33:54.259::INFO: No Transaction manager found - if your webapp requires one, please configure one.
12/10/31 10:33:56 INFO file.FileDataModel: Creating FileDataModel for file /tmp/ratings.txt
12/10/31 10:33:56 INFO file.FileDataModel: Reading file info...
12/10/31 10:33:58 INFO file.FileDataModel: Processed 1000000 lines
12/10/31 10:33:58 INFO file.FileDataModel: Read lines: 1000209
12/10/31 10:33:58 INFO model.GenericDataModel: Processed 6040 users
12/10/31 10:33:58 INFO slopeone.MemoryDiffStorage: Building average diffs...
2012-10-31 10:34:31.983::INFO: Started SelectChannelConnector@0.0.0.0:8080
[INFO] Started Jetty Server


====================================


example URL
http://localhost:8080/mahout-integration/RecommenderServlet?userID=1&debug=true&howMany=100
http://localhost:8080/mahout-integration/RecommenderServlet?userID=1&howMany=100


2012年10月28日 星期日

[facebbook]graph api remove offline access token

[facebbook]graph api remove offline access token

移除了offline_accessc後,除了開始的兩個小時外,還可以另外延長到60天。

fbconsole/README.md at master · facebook/fbconsole
https://github.com/facebook/fbconsole/blob/master/README.md
Removal of offline_access permission - Facebook 開發人員
http://developers.facebook.com/roadmap/offline-access-removal/
Extending Access Tokens - Facebook 開發人員
http://developers.facebook.com/docs/howtos/login/extending-tokens/






2012年10月27日 星期六

Get long live access token from Facebook - Stack Overflow


Get long live access token from Facebook - Stack Overflow
http://stackoverflow.com/questions/10467272/get-long-live-access-token-from-facebook
offline_accessパーミッション廃止時の対応 : Facebook開発者向けドキュメントの日本語訳とTips
http://facebook-docs.oklahome.net/archives/52047013.html




2012年10月26日 星期五

[mahout]run apache mahout examples

run apache mahout examples

官方網站上面有個有個說明,

Recommender Documentation - Apache Mahout - Apache Software Foundation
https://cwiki.apache.org/confluence/display/MAHOUT/Recommender+Documentation

To build and run the demo, follow the instructions below, which are written for Unix-like operating systems:

  1. Obtain a copy of the Mahout distribution, either from SVN or as a downloaded archive.
  2. Download the "1 Million MovieLens Dataset" from Grouplens.org
  3. Unpack the archive and copy movies.dat and ratings.dat to trunk/integration/src/main/resources/org/apache/mahout/cf/taste/example/grouplens under the Mahout distribution directory.
  4. Navigate to the directory where you unpacked the Mahout distribution, and navigate to trunk.
  5. Run mvn -DskipTests install, which builds and installs Mahout core to your local repository
  6. cd integration
  7. You may need to give Maven more memory: in a bash shell, export MAVEN_OPTS=-Xmx1024M
  8. mvn jetty:run.
  9. Get recommendations by accessing the web application in your browser: http://localhost:8080/mahout-integration/RecommenderServlet?userID=1 This will produce a simple preference-item ID list which could be consumed by a client application. Get more useful human-readable output with the debug parameter: http://localhost:8080/mahout-integration/RecommenderServlet?userID=1&debug=true



遇到了一些問題

HTTP ERROR: 503

SERVICE_UNAVAILABLE

RequestURI=/mahout-integration/RecommenderServlet

Powered by jetty://





:~/code/mahout-distribution-0.7/integration$ mvn jetty:run
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building Mahout Integration
[INFO] task-segment: [jetty:run]
[INFO] ------------------------------------------------------------------------
[INFO] Preparing jetty:run
[INFO] [resources:resources {execution: default-resources}]
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 3 resources
[INFO] [compiler:compile {execution: default-compile}]
[INFO] Nothing to compile - all classes are up to date
[INFO] [resources:testResources {execution: default-testResources}]
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] [compiler:testCompile {execution: default-testCompile}]
[INFO] Nothing to compile - all classes are up to date
[INFO] [jetty:run {execution: default-cli}]
[INFO] Configuring Jetty for project: Mahout Integration
[INFO] Webapp source directory = /home/peicheng/code/mahout-distribution-0.7/integration/src/main/webapp
[INFO] web.xml file = /home/peicheng/code/mahout-distribution-0.7/integration/src/main/webapp/WEB-INF/web.xml
[INFO] Classes = /home/peicheng/code/mahout-distribution-0.7/integration/target/classes
2012-10-26 14:58:11.752::INFO: Logging to STDERR via org.mortbay.log.StdErrLog
[INFO] Context path = /mahout-integration
[INFO] Tmp directory = determined at runtime
[INFO] Web defaults = org/mortbay/jetty/webapp/webdefault.xml
[INFO] Web overrides = none
[INFO] Webapp directory = /home/peicheng/code/mahout-distribution-0.7/integration/src/main/webapp
[INFO] Starting jetty 6.1.10 ...
2012-10-26 14:58:11.829::INFO: jetty-6.1.10
2012-10-26 14:58:12.973::INFO: No Transaction manager found - if your webapp requires one, please configure one.
2012-10-26 14:58:12.400::WARN: failed taste-recommender
javax.servlet.ServletException: java.lang.IllegalStateException: java.lang.ClassNotFoundException: org.apache.mahout.cf.taste.example.grouplens.GroupLensRecommender





在pom.xml內加入


${project.groupId}
mahout-examples
0.7


Problem running grouplens example
http://www.digipedia.pl/usenet/thread/10949/13891/
general - Re: Problem running grouplens example - msg#06145 - Recent Discussion OSDir.com
http://osdir.com/ml/general/2012-08/msg06145.html




2012年10月25日 星期四

(Title not set)







































































































   間



     程



8:30~9:00



報到



9:00~9:10



開幕暨致歡迎詞:東海大學  葉芳栢校長



9:10~10:10



專題演講:引導教育與大學公民願景:一位校友的奉獻與期待



主持人



主講人



羅文聰


東海大學學務長



吳兆田


alpha leader專業引導教師



10:10~10:30



茶敘



10:30~12:00



alpha體系的建立:制度整合經驗分享



主持人



分享人



回應人



范聖興


東海大學教務長



羅文聰


東海大學學務長



孫台鼎


靜宜大學學務長



12:00~13:00



午餐休息



13:00~14:00



引導教育在東海實錄分享



14:00~14:10



休息



14:10~15:40



引導教育融入課程與活動的經驗分享:教師成長歷程



主持人



分享人



回應人



羅文聰


東海大學學務長



伊志宗


東海大學


Alpha leader指導老師



藍美華


政治大學


政大書院執行長



15:40~15:50



休息



15:50~17:10



作為alpha leaders的學習意義:學生學習成效分享



主持人



分享人



回應人



王偉華


東海大學


博雅書院書院長



Alpha leaders



余佩珊


東海大學企管系副教授



17:10~17:20



休息



17:20~18:00



綜合討論


主持人:東海大學羅文聰學務長



18:00



賦歸



2012年10月16日 星期二

2012年10月15日 星期一

HBase

hbase介绍 - 阿里集团数据平台 alidata.org
http://www.alidata.org/archives/1509

about HFile
Th30z (Matteo Bertozzi Code): HBase I/O: HFile
http://th30z.blogspot.tw/2011/02/hbase-io-hfile.html
sstable入门阶段——HFile(version1)结构解析与c++读实现 | 伫立于架构,探究于细节
http://blog.hiwgy.com/2012/03/11/hfile_format_and_c_implement/

HADOOP中一种非典型两表JOIN的处理方法 - 阿里集团数据平台 alidata.org 一個partition問題~!!~
http://www.alidata.org/archives/204






2012年10月12日 星期五

[Mac]bashrc not work




By default, Terminal starts the shell via /usr/bin/login, which makes the shell a login shell. On every platform (not just Mac OS X) bash does not use .bashrc for login shells (only /etc/profile and the first of .bash_profile, .bash_login, .profile that exists and is readable). This is why “put source ~/.bashrc in your .bash_profile” is standard advice. –

[ubuntu]python easy install

How to install python easy_install tools for ubuntu

setuptools 0.6c11 : Python Package Index
http://pypi.python.org/pypi/setuptools



# apt-get install python-setuptools python-dev


2012年10月8日 星期一

Zookeeper 與 Hbase 為什麼要用zookeeper


Hbase 使用zookeeper 管理 HMaster 與 RegionServer。
Hbase也就是從BigTable來的,當table大到一個程度的時候,table會split成一個一個的region。
而RegionServer就把 HTable 存到Hadoop的HDFS。
Google BigTable使用Chubby來負責協調Node的工作,而HBase使用的就是zookeeper。

Trend Micro CDC SPN Team | Client HBase RegionServer
http://www.spnguru.com/tag/client-hbase-regionserver/
HBase技术介绍 « 搜索技术博客-淘宝
http://www.searchtb.com/2011/01/understanding-hbase.html




2012年10月2日 星期二

Hadoop in Taiwan 2012


很幸運上工沒多久,
就可以去參加這個活動。

早上六點半就出門,
七點半到辦公室一起搬螢幕跟電腦過去會場。

一如往常的大型的資訊活動都轉往中央研究院辦,
今年早上的演講大部分是被趨勢給包場了。

當然,還有聽到Steve 的喊話,
什麼是台灣人的新的機會呢?
我想就是腦力阿。

整個議程算是一個拋磚引玉,
越來越多應用用新的模式來呈現,
難怪乎當時有問cutting說,hadoop到底造成怎樣的影響,
他回答,出現了hadoop讓大家用新的方式思考Big Data,
真的,在hadoop出現以前,這些問題就早已經存在了。
只是這樣的pattern被更廣佈的炒熱了。




2012年9月21日 星期五

create your own vmware image

create your own vmware image

cd ~/vmware
zip -r Ubuntu12.04.image_120921.zip Ubuntu/

Maybe can remove log file to save disk space
#rm *log

how to use
====
unzip
unzip -d Ubuntu Ubuntu12.04.image_120921.zip

use your vmware open the file

2012年9月19日 星期三

[ubuntu] install oracle-java 12.04


# add-apt-repository ppa:webupd8team/java
# apt-get update
# apt-get install oracle-java7-installer

2012年8月19日 星期日

[note] 兩則 關於 搜尋引擎 搜索引擎 search engine

[note] 兩則 關於 搜尋引擎 搜索引擎 search engine

[转发]新浪网招聘搜索引擎研发工程师/数据挖掘和推荐系统工程师(实习生)
2012-07-17 16:33

职位:

搜索引擎研发工程师

职责:

新浪网新闻和资讯搜索系统(http://search.sina.com.cn)的开发和优化

要求:

熟练掌握C/C++语言
熟悉Linux系统开发环境及常用脚本语言
熟悉搜索引擎原理和相关算法
具备搜索引擎系统开发经验者优先

职位:

数据挖掘和推荐系统工程师或实习生

职责:

新浪网用户兴趣数据的挖掘和分析
基于用户兴趣的推荐阅读系统

要求:

熟练掌握C/C++语言
熟悉Linux系统开发环境及常用脚本语言
熟悉自然语言处理、数据挖掘和推荐系统相关算法
具备数据挖掘和推荐系统开发经验者优先
在京高校在校生优先(实习生)

感兴趣的话请把简历发到 pilot.cn{at}gmail.com 把{at}替换为@


從lucene變成顯學後,其實 搜尋引擎 的技術已經運轉了二三十年了(從1990~2012),
以目前來看,
搜尋引擎技術,已經不是什麼太艱難的獨家技術。

大部份要徵搜尋引擎的人,普遍上來說,都是公司已經以hadoop 來大規模處理,更甚至建反轉索引,還有直接使用Lucene。
從Lucene開始,Nutch的發展,後來有了Hadoop跟 Google GFS paper與Mapreduce paper。
以前,以前的精華技術都大量的流出。
trace Lucene code到爛的工程師應該也不計其數。

十之八九的公司在運用這技術時都脫離不了那個影子,
甚至來說,是直接使用。
當然,如果是做搜尋的公司,那可能需要很大精力的調教了。

所以說,現在這些公司徵的大多要會Machine Learning 或者是Data Mining的人了。






2012年8月15日 星期三

[電影]蝙蝠俠 黑暗騎士 黎明昇起

[電影]蝙蝠俠 黑暗騎士 黎明昇起

有劇情雷慎進

等了很久終於去看了
片長很長,
但是等到結束時刻也沒有脫離導演的影片。

一個月前就看武術版,在討論蝙蝠俠用的武術。

KFM Keysi Fighting Method (KFM) 強調直覺跟反應的"新武術",
從街頭格鬥的經驗與各種武術特點結合的一種武術。
特點在於用"肘",
一半在街頭,很怕被擊倒,滿重要的一點就是保護頭部。
第1要嘛你就,保持中長距離的戰鬥,但是這在街頭巷戰,或是在戰場肉搏戰可能不適應。
第2點,近身了。短距離用內節,用身體硬處保護,主要就是靠身體的浮沈與撞擊力道來應對。
貼身近打就用肘,加上大量的,頭擊動作。

劇中是說蝙蝠俠接受了東方忍術大師的培訓,導演為了一個角色的特點,選擇了KFM增加了動作場面的可看性。
不是花招,不是飛來飛去,而是拳拳到肉的近身搏鬥。

貓女的招式,那更是我驚豔阿。
兩個明顯的 合氣道 四方摔,有別於史蒂芬席格用出來的風格。
以柔化,身體帶動的招式,演試起來更是乾脆。

刻劃出偉恩對以前女友的懷念,
他從自己心理的關卡,道破除自己的心靈枷鎖,
有時候授折磨的不會只有身體,
而最最重要的是一個人的靈魂與意志。

如同地牢內醫生所說,
你要怎麼出去了,那就是爬出去,
蝙蝠俠不靠身上綁著繩索,
不害怕死亡反而不能讓他激發生命的力量,
當他心無旁騖的,專注於整個動作中,
他做到了。

阿福對韋恩的主僕之情,真是讓人感動。
最後,蝙蝠俠拖著核彈到海灣時,羅賓因為橋的另外一邊堅持不讓他們通過的橋段,....
真是太感動了~~~


《黑暗騎士:黎明昇起》(英語:The Dark Knight Rises)是於2012年由克里斯多福·諾蘭導演的一部超級英雄電影,喬納森·諾蘭和大衛·高耶編寫故事大綱。參考DC漫畫人物「蝙蝠俠」,電影是克里斯多福·諾蘭執導蝙蝠俠三部曲最後一部。描述了布魯斯·韋恩與班恩之間的對決,高譚市原本是從一個逐漸和平的城市,但班恩把整個城市再度陷入亂局,使得韋恩再次以「蝙蝠俠」身份打擊班恩的罪惡,使兩人展開了在高譚市的終極決戰。為「蝙蝠俠:開戰時刻」(2005年)和「黑暗騎士」(2008年)的續集。 劇情設定為「黑暗騎士」的八年後,冬天開始。

克里斯多福·諾蘭最初猶豫了電影蝙蝠俠第三部進展,但最終同意發展。該片拍攝了在不同好幾個景點,包括焦特布爾、倫敦、諾丁漢大學、格拉斯哥、洛杉磯、紐約、紐瓦克和匹茲堡。諾蘭是使用IMAX攝影機拍攝,以優化部分畫面質素。為幫助該片即將上映前的關注,在前期製作過程中已開始透過病毒營銷協助宣傳。