Pythonã®ã¤ã³ã¹ãã¼ã«ã«ã¤ãã¦ã¯ç¾å¨æ§ã ãªæ¹æ³ããããæ¥ã å¤åãã¦ãã¾ãã Qiitaã§ã®æ稿ã«éçãæããã®ã§ãä»å¾ã¯èªå·±ãµã¤ãhttps://midsatoh.github.io/python/install/select_soft/ã«ã¦é ä¿¡ãããã¨ã«ãã¾ãã ä»å¾ãã¡ãã®è¨äºã®æ´æ°ã¯è¡ãã¾ããã®ã§ããäºæ¿ãã ããã 0. ã¯ããã« éå»ã«æ稿ãããPythonã¤ã³ã¹ãã¼ã«ï¼Macç·¨ï¼ãã«ã¤ãã¦ã¯ãããããã¾ã§ããããã®æ¹ã«ãããï¼ãªã³ã¯ãã¦ããã ãã¾ããã æµç³ã«ï¼å¹´åã®æ稿ã¨ãªããä¸éã§ãPython3ç³»ã®éè¦ãPython2ç³»ãä¸åã£ãããã§ãã®ã§ãæ¹ãã¦Python3ç³»ã®ã¤ã³ã¹ãã¼ã«æ¹æ³ã¨ãã¦å ¬éãã¾ãã 以åã®è¨äºã§ã¯pipã³ãã³ãã«ã¤ãã¦ãè£è¶³ã§è¨è¼ãã¦ãã¾ããããç¾å¨å ¬éããã¦ãããã¼ã¸ã§ã³ã§ã¯ããªã¤ã³ã¹ãã¼ã«ããã¦ãã¾ãã®ã§ãpipã³ãã³ãã®ã¤ã³ã¹ãã¼ã«ã«ã¤ãã¦ã¯å²
Macç¨ã®ã¿ã¼ããã«ã¨ãã¥ã¬ã¼ã¿ã¼ãiTerm2ããå¤æ©è½ã§ä½¿ãããããMacã®éçºè ã®ä¸ã«ã¯ãæ¨æºã®ã¿ã¼ããã«ã§ã¯ãªãããã¡ããæç¨ãã¦ããæ¹ãå¤ãã¨æãã¾ãã æ¬æ¥ç´¹ä»ãããitermplitãã¯ãããã®iTermä¸ã«ã°ã©ããç´æ¥æç»ãããã¨ãã§ããPythonã©ã¤ãã©ãªãPythonç¨ã®ã°ã©ãããããã©ã¤ãã©ãªã§ããMatplotlibããã¼ã¹ã¨ããPythonã³ã¼ãã§è¨è¿°ããã°ã©ãã®çµæãããã«ã¿ã¼ããã«ã§ç¢ºèªãããã¨ãã§ããã¨ãããã®ã§ãã ä¾ãã°ä»¥ä¸ã®ãããªã³ã¼ãã使ç¨ããã¨: import numpy as np import matplotlib.pyplot as plt import networkx as nx plt.rcParams["font.size"] = 10 plt.figure(figsize=(8,3)) ax = plt.subplot(121)
æ代ã¯ã½ã¼ã·ã£ã«ã§ãããé·ããã¤ã³ã¿ã¼ãããã®ä¸è§ãå ãã¦ããã¨ãåç»ãã¦ã³ãã¼ãçãããããã½ã¼ã·ã£ã«åãã¦è¯ãã¯ãã§ããããããããªãããã©æ§æ¥ã®ããæ¹ããã½ã¼ã·ã£ã«ãªæ¹ãä½ãã¨çæ´»ã®è³ªãåä¸ããã¯ãã§ããããªãã¡ãã½ã¼ã·ã£ã«ã¨ãåç»ãã¦ã³ãã¼ãã£ã³ã°ã®æ代ããã¾å¹ãéãããã¨ãã¦ããã®ã§ãããã®è¨äºã¯ããã®ããã³ãã£ã¢ã«ããã¦ããã¤ãªãã¢çä½ç½®ã¥ãã¨ãªãã¹ãæ¸ããã¦ãã¾ãã æ§æ¥ã®ã¨ãåç»ãã¦ã³ãã¼ãã®ããæ¹ã«ã¯ã大ããåãã¦2種é¡ãããã¾ããã ã²ã¨ã¤ã²ã¨ã¤æä½æ¥ã§ãã¦ã³ãã¼ããã ãã¼ã«ãç¨ãã¦ä¸æ¬ãã¦ã³ãã¼ããã ã²ã¨ã¤ã²ã¨ã¤æä½æ¥ã§ãã¦ã³ãã¼ããããããã¯çãã¾ãåç¥ã§ãããæ§æ¥ã®ããæ¹ã§ããè¨ç®æ©ãé«åº¦ã«é²åããç¾å¨ã«ããã¦ã¯ææçãªã¢ããã¼ãã§ããã¨ã¯è¨ãã¾ããã ãã¼ã«ãç¨ãã¦ä¸æ¬ãã¦ã³ãã¼ããããããã¯åç»ã«ããã¦ã¯ãã¾ãç¨ãããã¾ããããç»åçã§ã¯ãµã¤ãå ã®ç»åå ¨é¨
pythonbrewããpython 2.7.2ãå ¥ãããã¨ããã¨ãããã¨ã©ã¼ãåºã¦ã¤ã³ã¹ãã¼ã«ã«å¤±æãã¾ãããpythonbrewãæªè ã¿ãããªè¨ãæ¹ã§ããããããªãã¨ã¯ããã¾ããã pythonbrewããæ®éã«python 2.7.2ãã¤ã³ã¹ãã¼ã«ããã¨ããã«ãã«ã¯æåãããã®ã®make testã®æ®µéã§ã¨ã©ã¼ã«ãªãã¾ãã--no-testãªãã·ã§ã³ã使ãã¨make testãã¹ãããã§ããã®ã§ãããæ°ã«ãªãã®ã§èª¿ã¹ã¦ã¿ã¾ããã調ã¹ãã¤ãã§ã«ããããä½ãã¾ããã ï¼ã¡ãªã¿ã«ãhomebrewããpythonãã¤ã³ã¹ãã¼ã«ããã¨ãã¯ã¨ã©ã¼ãèµ·ãããªãã£ããªããã¨æã£ããã2012å¹´1ææç¹ã®Formulaã§ã¯æåããmake testãã¹ããããã¦ã¤ã³ã¹ãã¼ã«ãã¦ãã¾ãããï¼ ç°å¢ Mac OS X 10.7.2 Xcode 4.2.1 (llvm-gcc-4.2) readline
Mac OS X Lion / homebrew ã«ã¦ python ã®ç°å¢ãæ´ã㶠Mac OS X ã Lion ã«ã¢ãããã¼ãããããpython ã®ç°å¢ãå£ããã®ã§åæ§ç¯ã ã¡ãªã¿ã«ãhomebrew 㯠Snow Leopard æ代ã§ãã§ã«ã¤ã³ã¹ãã¼ã«æ¸ã¿ã§ãLionã®upgrade ããå¾ã§ãç¹ã«åé¡ã¯ãªãããã§ãã£ãã ãã¤ã³ã¶ Mac OS X ã®æ¨æº python 㯠/usr/bin/python homebrew ã®å ´å㯠/usr/local ã prefix ã§ã brew insatall python ãã㨠/usr/local/Cellar/python/{ãã¼ã¸ã§ã³çªå·} ãã¤ã³ã¹ãã¼ã«ãããã homebrew ã® python ã¢ããªã±ã¼ã·ã§ã³ã¯ /usr/local/share/python ãã£ã¬ã¯ããªé ä¸ã«ã¤ã³ã¹ãã¼ã«ãããã $ bre
$ sudo add-apt-repository ppa:mattn/growl-for-linux $ sudo apt-get update $ sudo apt-get install growl-for-linux # coding: utf-8 import gntp from gntp.notifier import GrowlNotifier notifier = GrowlNotifier("python script", ["TEST"], hostname="0.0.0.0") notifier.debug = True notifier.register() # only once notifier.notify("TEST", "ã¿ã¤ãã«ãµãã¼", "æ¬æãµãã¼\n2è¡ç®ãã©ã¼")
Friendfeed API ã python ãã使ãæ°è¦æ´æ°åã®ã¨ã³ããªã Growl ã«è¡¨ç¤ºããã¹ã¯ãªãããä½ã£ãã®ã§å ¬éã friendfeed-api http://code.google.com/p/friendfeed-api/ ããã©ã¤ãã©ãªãè½ã¨ãã¦ã㦠python ãã£ã¬ã¯ããªã® friendfeed.py ã使ç¨ã èªåã® feed ãåãã®ã« remote key ãå¿ è¦ãªã®ã§ãfriendfeed ã«ãã°ã¤ã³ããã¾ã¾ https://friendfeed.com/account/api ã«ã¢ã¯ã»ã¹ãã¦å ¥æã python ãã Growl ã使ãæ¹æ³ã¯id:nishiohirokazuã®[http://d.hatena.ne.jp/nishiohirokazu/20080318/12 05833455:title=Pythonã§Growlãå©ã]ãåèã Gro
Scripts and libraries Applescript ASTwitterLibrary 1.1 - Integrate Twitter into your Applescripts or Applescript Studio project. iTwitStatus is a way to use your Twitter as your iChat Status via QuickSilver. | Tweet - update Twitter via Quicksilver TwitterAdium by Jesse Newland TwiTunes is an AppleScript for Mac OS X that posts the current iTunes track to Twitter: "Linda is listening to "Take on m
Yuki Tamura / estie EM @isoparametric @ymotongpoo redisã¯æè§è²ã ã¤ã³ã¿ã¼ãã§ã¤ã¹ãããã®ã§ãå¿ä½ãªãããªãã¨æãã¤ã¤ãã¤ããªã»ã¼ãã ããªãã¨ããã¨ãæã£ã¦ãã¦ããããããã¦ãã®ã§ããããã¨ãã©ããã¯ãããã¾ãã¬ãï¼ 2011-02-17 22:51:37
èªå¼µã§ã¯ããã¾ããããªããSIGSTOP使ã£ã¡ãã£ã¦ã¾ãããw åè¬w åã¯ã¡ã¤ã³ã®Macã§ã¯å¸¸æãã©ã¦ã¶ã3ã¤ç«ã¡ä¸ãã¦ã¾ãã 管çç¨ï¼ãã°ã¤ã³ãã¦ãªããããããããã¤ï¼ã¨ãã¦Firefoxãã主ã«æ å ±åéç¨ã¨ãã¦ããä¸ã¤Firefoxããããã°ã©ãã³ã°ç¨ã¨ãã¦Chromeã使ã£ã¦ã¾ãã ãã®ãã¡2ã¤ã®Firefoxã§ãããã常ã«50ã100ã¿ããããã²ããã£ã±ãªãã«ãã¦ãã®ã§ããããããããã¯ã°ã©ã¦ã³ãã§ãCPUã«ããªãã®è² è·ãæãã¦ã¾ãã éãããã®ã§æ å ±åéç¨ãªããã¯Flashã¨JavaScriptããªãï¼Flashblockã¨NoScriptã使ç¨ï¼ã«ãã¦ããããã§ãããããã§ãã¢ã¤ãã«æã®CPU使ç¨çã®ä¸ä½äºã¤ã¯Firefoxã§ãã ããããªãã¨ããããã¨æãã¾ãã¦ãéååã«Twitterã®ã»ãã«ã·ã°ãã«ã§ã¢ããªã±ã¼ã·ã§ã³ãä¸æåæ¢ã»åéããæ¹æ³ãè¼ãã¾ãããã killall
ã¯ããã¦ã®ã²ã - PythonSucks ãæ°ã«ãªã£ãã raw_input("hoge") ã¨ãã§åºåãã§ãã ã¾ã¨ããªæ¨æºå ¥åºå㯠import sys sys.stdout.write("Hello, world!\n") ããã©ããããªãã Pythonã¯æ¨æºå ¥åºåã®åå¨ãåæã¨ããªãè¨èªã ãããPerlãRubyã¨ã¯ã¡ãã£ã¨æåçã«éã£ã¦ã¦ãããããstdio.hãããããªããããããªãCè¨èªã ã¨æãã¨ç´å¾ã§ãããçµã¿è¾¼ã¾ããç°å¢ã«ãã£ã¦ã¯ãprintã¨raw_inputã¯ãæ¨æºå ¥åºåã§å®è£ ãããªãå¯è½æ§ããããããJavaã®Syetem.out.printã¨ã©ã£ããã©ã£ããã å¼æ° >>> len("hoge") 4 >>> len("hoge",) 4 1è¦ç´ ã¿ã㫠空ã¿ãã«ã¯ () ã 2è¦ç´ ã¿ãã«ã¯ (1, 2) ã 1è¦ç´ 㯠(1,) ã¿ãã«ã¨ % æ¼ç®å ããç¨ã«ã³
ã¯ããã« ããã¾ãã¦ããã§ã¨ããããã¾ããä»å¹´ãPythonçã®æ±å¤ç°ã¡ããã¨ãã¦é å¼µã£ã¦ããæåã§ããã㦠id:nishiohirokazu ã5åã§Pythonã¯ä¾¿å©ã ã¨æããè¨äºãå æ¦ããæ¸ãã¦ãã¾ããã ãã»ãã¼ãããã西尾ããããã£ã¦æã£ã¦ããã西尾ããããããå±±å£ã5åã§Python便å©ã ãªã¼ã£ã¦æããè¨äºæ¸ãããã£ã¦ããç¡è¨ã®å§åãããã¦ããã®ã§*1 *2ãªãã¨ãªãæ¸ãã¾ããã ã5åã§ãã£ã¦ããã®ãèªè ãèªãæéãªã®ããçè ãæ¸ãæéãªã®ããããããªãã£ãã®ã§åè ã¨ãããã¨ã«ãã¾ããã5åã§è¨äºã¨ã³ã¼ã両æ¹æ¸ãã¨ãç¡çãã ãããªãã¨ãªãã§ãã ãWebã§ã¹ã¯ã¬ã¤ãã³ã°ããããã¼ãã¦ã¸ã¸ãã ãã©æåã³ã¼ãã¨ãããã¼ã¸ãã¨ã«ãã©ãã©ã§ãã¸ããã©ãã£ãããããã¿ã°æãåºãã®ã¨ããã¡ãããã©ãã£ã><ãã£ã¦ãã¨ã¯ãã£ãããã¾ãããï¼ ãªã³ã¯ã®ã¿ã¤ãã«ã¨ãã綺éºã«æãåºããããªã¼
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}