mrknãããéçºãã¦ããPyCallã使ãã¨ãRubyããPythonãªãã¸ã§ã¯ããæä½ã§ããã RubyãããPythonã®æ©æ¢°å¦ç¿ã»çµ±è¨åæã®ãã¼ã«ãå©ç¨ãããã¨ãç®çã¨ãã¦ããã ãããä¸ã«ãnumpyãscikit-learnãå®è¡ããä¾ãããã£ã¦ããã Rubyist Magazine - PyCall ãããã° Ruby ã§æ©æ¢°å¦ç¿ãã§ãã ãã®PyCallã§ãKerasãå©ããã¨ãã§ããã°ãRubyã§ãDeep Learningã§ããã¨æã試ãã¦ã¿ãã ã¾ãã¯ã¤ã³ã¹ãã¼ã«ããã $ gem install --pre pycall ã¡ãªã¿ã«ãå®è¡ç°å¢ãã¾ã¨ããã¨ãRuby 2.4.0ãPyCall 0.1.0.alpha.20170317ãPython 3.6.0ãTheano 0.9.0ãKeras 2.0.2ã§ããã 試ããã®ã¯ãMNISTã®ææ¸ãæ°åç»åããç³ã¿è¾¼ã¿ã
â» ææ°çãå ¬éããã¾ããã ã©ã¤ãã©ãªãæ´æ°ãããããªã使ãæ¹ãå¤ãã£ã¦ãã¾ãã 以ä¸ã®è¨äºã«ã¦æ°ãããã¼ã¸ã§ã³ã®èª¬æããã¦ããã¾ãã®ã§ãã確èªä¸ããã PyCallã使ã£ã¦RubyããPythonã®ã©ã¤ãã©ãªã使ãåã ã¯ããã« mrknãããPyCallã¨ããã©ã¤ãã©ãªãéçºããã¦ããã®ã§ãæ©é試ãã¦ã¿ã¾ããã ã¤ã³ã¹ãã¼ã« 2017å¹´2æ24æ¥ç¾å¨ã以ä¸ã®æé ã§ã¤ã³ã¹ãã¼ã«ã§ããããã«ãªãã¾ããã mrknããããããã¨ããããã¾ãã æ§ã¤ã³ã¹ãã¼ã«æ¹æ³ åå¿é²çã«æ®ãã¦ããã¾ãã ãããä¸è¨æé ã§ã¤ã³ã¹ãã¼ã«ã§ããªãã£ãå ´åã«ã試ãä¸ããã ã½ã¼ã¹ã³ã¼ããGitHubãããã¦ã³ãã¼ãã§ãã¾ãã 2017å¹´2æ23æ¥ç¾å¨ãéçºä¸ã®ãã©ã³ããããã¦ã³ãã¼ãããã¨ã®ãã¨ã ã£ãã®ã§ã以ä¸ã®ã³ãã³ãã§å ¥æãã¾ããã
Pythonããã°ã©ãã¼ã¨ããããå ã Pythonï¼ã¨ãã©ãRãCè¨èªï¼ã§æ°å¤ã·ãã¥ã¬ã¼ã·ã§ã³ããã¦ããå¦çããå°±è·ãã¦Rubyã§Webéçºãè¡ãã«ããã£ã¦åå¼·ãããã¨ãæ¸ãé£ãã¦ããã ãã®è¨äºã§ãã ããèªåã¨åããããªç«å ´ã®äººï¼ããããå¾è¼©ã¨ãã¦ãã©ãã©ãå¢ãã¦ããããï¼ï¼ãããããããããæ¼ããã¦ããã°Rubyã¯åé¡ãªãæ¸ããããã¨æããããããã«æ¸ãã¦ããã¾ããã¨ããã®ããã¬ãã¥ã¼ãè¡ã£ã¦ããå 輩ã¨ã®ããã°ã©ãã³ã°ã®ã¹ãã«ã¨ã®éãããããå 輩ãç§ããã©ããåãã£ã¦ãªãã®ã説æã§ããªããç¶æ ã«ãªã£ã¦ãã¾ã£ã¦ãäºãã«å°ã£ã¦ãã¾ã£ãçµé¨ãããããã§ãã Rubyã¨Pythonã¯ããä¼¼ã¦ããã®ã§ãããææ³ãè¦ãç®ã§éãé¨åãå¤ããçæ¹ãåå¼·ããã¨ããçæ¹ã®ç解ãæ·±ã¾ãã¾ãã ãã¾ã«2ã¡ããããã®ãªã«ã«ãæ¿ã§ãããè¦ããã¨ããä¸çã«ããä¼¼ãç°ä¸çã«è¿·ãè¾¼ãã ãã¿ãããªæè¦ã§ããªããªãé¢ç½ãçµ
ãã¼ããstructural subtypingã¨ããã¯ã¿ã¤ãã³ã°ã¯åããã®ãªãã ããããâ Yukihiro Matsumoto (@yukihiro_matz) 2016å¹´9æ8æ¥ https://t.co/5Rv86piThC wikipediaã«ããã¨ä¼¼ã¦éãªãç©ã®ããã§ããã https://t.co/VwIg39h5M0â INADA Naoki (@methane) 2016å¹´9æ8æ¥ ãã®è©±é¡ã«ã¤ãã¦è£è¶³ãã¦ããã¾ãããªããåã¯TAPLè±è½çµãªã®ã§ãã¾ãæ£ç¢ºæ§ã¯æå¾ ããªãã§ãã ããã èæ¯ Ruby Kaigi 㧠Matz ã Ruby3 ã«åãã¦èãä¸ã®éçåã«ã¤ãã¦è©±ãããããã§ãã å°ãåããã Python ã§ã Guido ã Dropbox ã§ã®å¤§éã®ã³ã¼ããã¼ã¹ãæ¹åãã¦ããããã« type hinting ãã»ããã¨ãããã¨ã§ PEP 484 ãå§ãã¾ãã
_ Rubyãä»ã®Pythonã®å°ä½ã«ããªãçç± æ´å²ã®ãã¨ãªãããªããç¥ãããã©ããæè¡çã«ã¯ä»ã®Pythonã®å°ä½ã¯Rubyã§ãããã£ãã®ã«ããããªããªãã£ããã®ãä½æ ãããã®çç±ãæ¸ãã¦ã¿ãããåã¯Rubyã®æ´å²ãªãã¦ç¥ããªããã以ä¸ã®æç« ã¯å ¨é¨ãã¾ãã§è¦ã¦ãããã®ããã«æ¸ãã¦ã¾ãããé©å½ã«æ¸ããããã«ä½æ ãæè¨å£èª¿ã«ãªã£ã¦ããæªææ¸ã®é¡ãã§ãã https://twitter.com/mametter/status/741950239662170112 ã¾ãããã®æ¸ããçç±ãªã¹ãã¯ã©ããé¢ä¿ãªããããã«ã¹ã£ã¦ããã©ãé£ããã¨ããã®ãé¢ä¿ãªãã åãRubyãç¥ã£ãããâ¦æåã«æ¸ããéãRubyã®æ´å²ãªãã¦ç¥ããªãã®ã§ãå¥ã«æ©ãããªãããã ãã©â¦Rubyã¨ããã®ã¯å ¨ã使ããã¦ããªãè¨èªã ã£ããã©ã£ãã®å¥½ãè ãPerlã®æ¿ããã«åç´ãªå¦çã«ä½¿ã£ã¦ããã¦ããç¾ããããããã°ãããã¨ãã¤ã¶
Rack ã WSGI ã®ä»£ããã«ãªãä»æ§ãèãã¦ã¿ã¾ãã (ã©ã¤ãã©ãª (rack.rb ã wsgiref.py) ã®ã»ãã§ã¯ãªãããããã³ã«ä»æ§ã®ã»ãã§ã)ãèªåã®ã¢ã¤ãã¢ãæ¸ãé£ããã ããªã®ã§ãã¾ã¨ã¾ã£ã¦ãªãããããã¾ããããäºæ¿ãã ããã ãªãæ¬ç¨¿ã¯ãä»å¾ä½åº¦ãæ¹è¨ããã¨æãã¾ãããæè¦ãããã°ãèªç±ã«ã³ã¡ã³ããã¦ãã ããã ã対象èªè ãRack ã WSGI ã«èå³ã®ãã人 ãå¿ è¦ãªç¥èãRack ã WSGI ã®åºç¤ç¥è Rack 㨠WSGI ã®æ¦è¦ Ruby ã® Rack ã Python ã® WSGI ã¯ãHTTP ã®ãªã¯ã¨ã¹ãã¨ã¬ã¹ãã³ã¹ãæ½è±¡åããä»æ§ã§ãã ãã¨ãã° Rack ã§ã¯: å¼æ°ã¨ãã¦ããªã¯ã¨ã¹ãã表ã Hash ãªãã¸ã§ã¯ããåãåãã æ»ãå¤ã¨ãã¦ãã¬ã¹ãã³ã¹ã®ã¹ãã¼ã¿ã¹ã³ã¼ãã¨ãããã¼ã¨ããã£ãè¿ãã¾ãã class RackApp def cal
ããã«ã¡ã¯ãæ°è¦åºåéçºé¨æå±ã¨ã³ã¸ãã¢ã®ã¬ãªï¼@lchinï¼ã§ããæ®æ®µã¯åºåé ä¿¡é¢ä¿ã®ã·ã¹ãã ãéçºãã¦ãã¾ãããããæè¿ããã¼ã¿ãµã¤ã¨ã³ã¹ãã«èå³ãæã¡å§ãã¾ãããéã«èª¬æããã¨ããã¼ã¿ãµã¤ã¨ã³ã¹ã¯çµ±è¨å¦ãæ©æ¢°å¦ç¿ãªã©ãç¨ãã¦è«å¤§ã®ãã¼ã¿ãã価å¤ãå¼ã£å¼µãåºãåéã§ããä»åã®techlifeã¯ããã®ãã¼ã¿ãµã¤ã¨ã³ã¹ãå¦ã¶éç¨ã§ç¥ã£ããã¼ã«Jupyter NotebookãRuby on Railsã®éçºã«å½¹ã«ç«ã¤ä½¿ãæ¹ãç´¹ä»ãã¾ãã Jupyter Notebookã¨ã¯ä½ã Jupyter Notebook*1ã¯ç§å¦è ã®ãå®é¨ãã¼ããã«ã¤ã³ã¹ãã¤ã¢ãããã¦ã§ãä¸ã®ã¤ã³ã¿ã©ã¯ãã£ãã·ã§ã«ç°å¢ã§ãããã ã®ã¤ã³ã¿ã©ã¯ãã£ãã·ã§ã«ç°å¢ã§ã¯ãªããã½ã¼ã¹ã³ã¼ãããã®å®è¡çµæã解説ããææ¸ãæ°å¼ãç»åãªã©ãã¾ã¨ãã¦1ã¤ã®ããã¼ãããã¯ãããã¥ã¡ã³ãã¨ãã¦æ±ãããã¨ãç¹å¾´ã§ãã Jupyter Not
http://patshaughnessy.net/2013/10/30/generational-gc-in-python-and-ruby ååã®ã¨ã³ããªã¼ã¯ãã¡ãã ãã¿ãã¹ãã§éå¬ãããRUPY2013ã§ã®Pat Shaughnessyã®ãã¬ã¼ã³ã®å¾åã§ããRubyã¨Pythonã®ã¬ãã¼ã¸ã³ã¬ã¯ã¿ã®éãããä»åã¯ãPythonã®å¾ªç°ãã¼ã¿æ§é ã¸ã®å¯¾å¿ã¨Ruby 2.1ã®ä¸ä»£å¥ã¬ãã¼ã¸ã³ã¬ã¯ã¿ã®è©±é¡ã«è§¦ããªãããç´¹ä»ãã¦ãã¾ãã 1) Pythonã®å¾ªç°ãã¼ã¿æ§é ã¨åç §ã«ã¦ã³ã Pythonã¯ãããã¤ã®ãã¤ã³ã¿ããã®ãªãã¸ã§ã¯ããåç §ãã¦ãããããåç §ã«ã¦ã³ãã¨å¼ã°ããæ´æ°ã§ç®¡çãã¦ãããå¤æ°ãããã¯ãªãã¸ã§ã¯ããããã®ãªãã¸ã§ã¯ããåç §ãã¯ãããã°æ°åãå¢ãã¦ãããã°ã©ã ããã®ãªãã¸ã§ã¯ãã使ãã®ããããã°æ°åãæ¸ãä»çµã¿ã 1960年代以æ¥ãã³ã³ãã¥ã¼ã¿ç§å¦è ãæ°ã¥ãã¦ããã¢ã«ã´
å æ¥ @shyouhei ããã®Tweetã«åå¿ãã¦æååãæåã®åãã©ãããè¨èªã«ãã£ã¦ç°ãªãã¨ãã話ãTweetãã¾ããã shyouheiããã®æ稿: Pythonã¯ã©ããããããRubyã®è¨è¨ææ³ã¯ãä¸ã®ä¸ã¯ã·ã³ãã«ãããªããã ãããªãæååãæåã®åã¨ã¿ãªãçºæ³ãã®ç©ããã§ã«Rubyããããã¨é度ã«ä¸çãåç´åãããã¦ããã https://twitter.com/shyouhei/status/528106973565165568 ããã¡ãã£ã¨è¨ã£ã¦ããã¨æ°å¤è¨ç®ã§åã¡ç®ã®ãªãRubyã¯æååå¦çã«ãã£ã¡ã注åãã¦ããã§ãæååå¦çãããRubyã®ä¸»æ¦å ´ãããã§Rubyãæååãããã¦ã«ã¿ããªã§æ±ã£ã¦ããã¨ã«ã¯ãããªãã®çç±ã¨ãããã®ããããã¤ã¾ãå解ãããã¨ããã»ããå°ããã¨ãå¢ãããIVSã¨ãã https://twitter.com/shyouhei/status/528
ãããåååå¼·ä¼2014 in åºå³¶ã§ã»ãã·ã§ã³ããã®ã§å 容ãå ¬éãã¦ããã ä»åã¯ãç§ãã¢ããã®å å 表è¨ã¨ããååãç¥ã£ãæã®æè¦ãä¼ããããã¨ããã®ãç®çã§ããã ããããªããç§ãã¢ããã«æãã¦ããå¹è½ãä¼ãããã¨ããã®ããã¦ããã®ã§ãããããã¯æ¬å½ã«ããããªãã å å 表è¨ããã®æå³ãç¥ããã«5å¹´åãããã«pythonã§å©ç¨ãã¦ãã¦ãforãifæåéãã«ããã¨ã£ã¦ããããã®åä½ãæ£ããç解ã§ãã¦ãªãã¨ããããã¾ããã ç¾å¨ã¨ãã®éã«Haskellãå¦ã³ããã®5å¹´åã®èªåã«å å 表è¨ãä¼ããã«ã¯ã¨ãã観ç¹ã§è©±ãé²ãã¾ããã ã¾ãããªã¹ãã®å å 表è¨ã§ããããªã¹ããçæãç°¡åã«ãã¦ãããæ©è½ã§ãã å å 表è¨ã¯ãã©ãããæ°å¦ã®éåã®è¨æ³ã§ããå å çè¨æ³ã«ç±æ¥ããããã§ããé¢æ°ããã°ã©ãã³ã°å ¥é âHaskellã§å¦ã¶åçã¨ææ³âããä½ãã§èªãã è¨æ¶ãããã¾ãã ãã®å¯¾ã«ãªãè¨æ³ã¨ãã¦å¤å»¶çè¨æ³
Pythonãå«ãã«ãªã£ãã®? Pythonã«ã¤ãã¦å«æ°ãå·®ããã¨ããPythonãå«ãã«ãªã£ãããã§ã¯ããã¾ããããããããä¸çªå¥½ããªè¨èªã¯æããPythonã§ãããå®éã®ã¨ãããæ©ä¼ãããã°Pythonã¯æ¸ããã¨æãã¾ããã§ãã®ã§ã決ãã¦è¨èªã¨ãã¦Pythonãå«ãã«ãªã£ãããã§ã¯ããã¾ããã ãããããè·æ¥ããã°ã©ãã¨ãã¦ãã¡ããã¨ãããªãã¸ã§ã¯ãå¿åãæãã¦ãããã®ã¯Pythonã§ãããPythonã¯ããã®è¨èªä»æ§ãããã¦ãåºæ¥ãã ãç°¡æ½ãã¤ã綺éºã«æ¸ããããPythonã«ã¤ãã¦æ·±ãç¥ãã°ãããã°ã©ãã³ã°ã¨ã¯ã©ããããã¨ãªã®ãã«ã¤ãã¦ã詳ããç¥ããã»ã©ã®ãããããããè¨èªã§ãããã¨ã¯äºå®ã§ãããåå¿è åãè¨èªã¨ãã¦ãPythonã¯å¼·ãæ¼ãããã¨ããæ°æã¡ã¯ä»ãå¤ããã¾ãããããã£ã¨Pythonãªãã³ã«ãã®ã³ãã¥ããã£ã«é¢ãã¦æè¬ã®æ°æã¡ã¯ãã£ã¨å¿ããªãã§ãããã ã¾ããè¿å¹´ã§ã¯Py
æ¦è¦ 1582å¹´10æ5æ¥ã1582å¹´10æ14æ¥ã¾ã§ã®10æ¥éã¯ãä½ããã®èªç¶ç¾è±¡ï¼ã´ã´ã´ã´ã´ï¼ã«ãã£ã¦æéãæ¶ãå»ãã¦ãæéã¨ãã¦ç¥ããã¦ãã¾ããããã°ã©ãã³ã°è¨èªã使ã£ã¦ãã®æ¥ãåãæ±ããã¨ããã¨ãããããªçµæãåºåããã¾ãã ä»æ¥ã¯ãããªç´ æµãªæ¥ä»ã§ãã1582å¹´10æ5æ¥ã¨æ¯ãã¦ãè²´éãª1æ¥ãç¡é§ã«ãã¦ã¿ããã¨æãã¾ãã Java ã¨ããããJavaããããã¼ã¸ã§ã³ã¯7ã // 1582/10/05ããã¼ã¹ Date dt1 = new SimpleDateFormat("yyyy/MM/dd").parse("1582/10/05"); System.out.println(dt1); // 1582/10/04ããã¼ã¹ Date dt2 = new SimpleDateFormat("yyyy/MM/dd").parse("1582/10/04"); System.out.p
ã%Y%m%dããstrptimeã§å¦çããã¨ææ§ã«ãªããã¨ãä»æ´ãªããã«ç¥ãã¾ããã 社å ã§ã201312ãã渡ãã¨ãã¢ãã¨ãã話ãåºã¦ã Pythonã§datetime.datetime.strptime('201312', '%Y%m%d')ãã¨ã©ã¼ã«ãªãã1æ2æ¥ã¨ãã¦æç«ããã®å ·åæªãã¨æãã® â nekoya (@nekoya) June 7, 2013 ã£ã¦Postããã@hirataraãããã2013129ã¨2013130ããã¢ãããã¨æãã¦ããã¾ããã æ®æ®µã¯%Y-%-%dã使ããã ãã©ãURLã«æ¥ä»ãåãè¾¼ãå ´åã¯ããªãã¿ç¡ãã®æ¹ãèªç¶ã ãªã¼ã¨æã£ããã覧ã®ææ§ã ãã Python2.7.1 >> datetime.strptime('201312', '%Y%m%d') datetime.datetime(2013, 1, 2, 0, 0) >> datetime.
Chefã«æ«æããããªãã¸ãFabricã®ããã ã¨ããè¨äºãèªãã ã®ã§ãå¼ã°ãã¦ãããªãã®ã«åæã«è¿äºãæ¸ãã¦ã¿ã¾ãã 追è¨(3/13 10:00): ã¿ã¤ãã«ã typo ãã¦ãããããªã®ã§è¨æ£ãã¾ããã ã¡ãªã¿ã«åã®ãã¸ã·ã§ã³ã¨ãã¦ã¯ chef æ¨é²æ´¾ã§ãã ä»äºã®ç©ºãæéãèªåã®æéã§ãéçºç°å¢ã®èªååã模索ããè¶£å³ chef 使ãã§ãã ããã¾ã§ä»ã®èªååãã¼ã«ã¯ããã¾ã§ã»ã¨ãã©ä½¿ã£ã¦ãããã ãã¹ãæé æ¸ã®ããªã¥ã¼ã åæ¸ã®ããã«ã·ã§ã«ã¹ã¯ãªããåãé²ãããããã§ããã ã¡ãªã¿ã«ãchef ã使ãã¯ãããéã«ãæ¯è¼æ¤è¨ã®ããã« puppet ã fabric ãªã©ã®ããã¤ãã®ãã¼ã«ã«ã¤ã㦠ããã¥ã¡ã³ããããã°ãèªã¿ããã£ãçµé¨ã¯ããã¾ãã ãã¨ãchef ã¨çµã¿åããã¦ä½¿ãããã« capistrano ãæè¿ä½¿ã£ã¦ãã¾ãã å¦ç¿ã«æéãããã åæãã¾ããchef ã®ãã£ã±ãã®
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}