資源簡介
Rsession提供了一種簡單的方式,讓Java可以訪問遠程或本地的Rserve實例。Rsession是對Rserve的封裝,提供了更高層的API接口,包括Rserve服務器控制,多會話機制,并支持Windows環境。
另一個R和Java通信的庫JRI,并不支持多會話機制。關于R和Java通信的其他文章,請參考:解惑rJava R與Java的高速通道, Rserve與Java的跨平臺通信
Rsession項目主頁:https://code.google.com/p/rsession/

代碼片段和文件信息
#!/usr/bin/env?python
#
#?Copyright?2006?2007?Google?Inc.?All?Rights?Reserved.
#?Author:?danderson@google.com?(David?Anderson)
#
#?script?for?uploading?files?to?a?Google?Code?project.
#
#?This?is?intended?to?be?both?a?useful?script?for?people?who?want?to
#?streamline?project?uploads?and?a?reference?implementation?for
#?uploading?files?to?Google?Code?projects.
#
#?To?upload?a?file?to?Google?Code?you?need?to?provide?a?path?to?the
#?file?on?your?local?machine?a?small?summary?of?what?the?file?is?a
#?project?name?and?a?valid?account?that?is?a?member?or?owner?of?that
#?project.??You?can?optionally?provide?a?list?of?labels?that?apply?to
#?the?file.??The?file?will?be?uploaded?under?the?same?name?that?it?has
#?in?your?local?filesystem?(that?is?the?“basename“?or?last?path
#?component).??Run?the?script?with?‘--help‘?to?get?the?exact?syntax
#?and?available?options.
#
#?Note?that?the?upload?script?requests?that?you?enter?your
#?googlecode.com?password.??This?is?NOT?your?Gmail?account?password!
#?This?is?the?password?you?use?on?googlecode.com?for?committing?to
#?Subversion?and?uploading?files.??You?can?find?your?password?by?going
#?to?http://code.google.com/hosting/settings?when?logged?in?with?your
#?Gmail?account.?If?you?have?already?committed?to?your?project‘s
#?Subversion?repository?the?script?will?automatically?retrieve?your
#?credentials?from?there?(unless?disabled?see?the?output?of?‘--help‘
#?for?details).
#
#?If?you?are?looking?at?this?script?as?a?reference?for?implementing
#?your?own?Google?Code?file?uploader?then?you?should?take?a?look?at
#?the?upload()?function?which?is?the?meat?of?the?uploader.??You
#?basically?need?to?build?a?multipart/form-data?POST?request?with?the
#?right?fields?and?send?it?to?https://PROJECT.googlecode.com/files?.
#?Authenticate?the?request?using?HTTP?Basic?authentication?as?is
#?shown?below.
#
#?Licensed?under?the?terms?of?the?Apache?Software?License?2.0:
#??http://www.apache.org/licenses/LICENSE-2.0
#
#?Questions?comments?feature?requests?and?patches?are?most?welcome.
#?Please?direct?all?of?these?to?the?Google?Code?users?group:
#??http://groups.google.com/group/google-code-hosting
“““Google?Code?file?uploader?script.
“““
__author__?=?‘danderson@google.com?(David?Anderson)‘
import?httplib
import?os.path
import?optparse
import?getpass
import?base64
import?sys
def?upload(file?project_name?user_name?password?summary?labels=None):
??“““Upload?a?file?to?a?Google?Code?project‘s?file?server.
??Args:
????file:?The?local?path?to?the?file.
????project_name:?The?name?of?your?project?on?Google?Code.
????user_name:?Your?Google?account?name.
????password:?The?googlecode.com?password?for?your?account.
??????????????Note?that?this?is?NOT?your?global?Google?Account?password!
????summary:?A?small?description?for?the?file.
????labels:?an?optional?list?of?label?strings?with?which?to?tag?the?file.
??Returns:?a?tuple:
????http_status:?201?if?the?upload?succeeded?something?else?if?an
?????????????????error?occured.
????http
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2015-03-23?11:34??Rsession\
?????文件????????4180??2014-07-07?06:05??Rsession\build.xm
?????文件??????938496??2012-09-04?17:14??Rsession\con
?????目錄???????????0??2015-03-23?11:34??Rsession\dist\
?????文件??????222188??2012-09-04?17:14??Rsession\dist\libRsession.zip
?????目錄???????????0??2015-03-23?11:34??Rsession\doc\
?????文件????????1912??2014-10-04?16:00??Rsession\doc\allclasses-fr
?????文件????????1692??2014-10-04?16:00??Rsession\doc\allclasses-nofr
?????文件???????11542??2014-10-04?16:00??Rsession\doc\constant-values.html
?????文件????????3499??2014-10-04?16:00??Rsession\doc\deprecated-list.html
?????文件????????7934??2014-10-04?16:00??Rsession\doc\help-doc.html
?????文件???????64958??2014-10-04?16:00??Rsession\doc\index-all.html
?????文件????????2721??2014-10-04?16:00??Rsession\doc\index.html
?????目錄???????????0??2015-03-23?11:34??Rsession\doc\org\
?????目錄???????????0??2015-03-23?11:34??Rsession\doc\org\math\
?????目錄???????????0??2015-03-23?11:34??Rsession\doc\org\math\R\
?????文件????????6946??2014-10-04?16:00??Rsession\doc\org\math\R\BusyListener.html
?????文件????????7203??2014-10-04?16:00??Rsession\doc\org\math\R\EvalListener.html
?????文件????????8907??2014-10-04?16:00??Rsession\doc\org\math\R\Logger.html
?????文件???????13048??2014-10-04?16:00??Rsession\doc\org\math\R\Logger.Level.html
?????文件????????2049??2014-10-04?16:00??Rsession\doc\org\math\R\package-fr
?????文件????????7343??2014-10-04?16:00??Rsession\doc\org\math\R\package-summary.html
?????文件????????7522??2014-10-04?16:00??Rsession\doc\org\math\R\package-tree.html
?????文件???????14779??2014-10-04?16:00??Rsession\doc\org\math\R\Rdaemon.html
?????文件???????26779??2014-10-04?16:00??Rsession\doc\org\math\R\RLogPanel.html
?????文件???????23553??2014-10-04?16:00??Rsession\doc\org\math\R\Rob
?????文件???????14345??2014-10-04?16:00??Rsession\doc\org\math\R\Rob
?????文件???????17908??2014-10-04?16:00??Rsession\doc\org\math\R\RserverConf.html
?????文件???????12115??2014-10-04?16:00??Rsession\doc\org\math\R\RserverConf.TimeOut.html
?????文件????????8484??2014-10-04?16:00??Rsession\doc\org\math\R\RserverConf.TimeOut.TimeOutException.html
?????文件??????101445??2014-10-04?16:00??Rsession\doc\org\math\R\Rsession.html
............此處省略83個文件信息
評論
共有 條評論