Deleted articles cannot be recovered. Draft of this article would be also deleted. Are you sure you want to delete this article?
import datetime import requests weekday = datetime.date.today().weekday() def send(message): url = "https://notify-api.line.me/api/notify" access_token = 'Your Access Token'#èªèº«ã®ã¢ã¯ã»ã¹ãã¼ã¯ã³(ãã¼ã¸ä¸ã®è¨äºåç §) headers = {'Authorization': 'Bearer ' + access_token} payload = {'message': message} requests.post(url, headers = headers, params = payload) def garbage_day(): if weekday == 0 or weekday == 4:#0:ææã4:éæ
tl;dr; Pythonã®Linterã§ããflake8ã¯pep8ã«å¾ã£ã¦ããããã¨æãã¦ããã¾ããã ããã¥ã¢ã«ã§è¡ãã¨ãªããªãã«é¢åãªä¿®æ£æ¡ãæ示ãã¾ãã è¿é Golangã®èªåãã©ã¼ããã¿ã«æ £ãã¦ãã¾ã£ãèªåã¨ãã¦ã¯ã ããåæã«ãã£ã¦ããããã¨ã¡ããã¡ããæã£ã¦ã¾ããã éåæã«Linterãå®è¡ããVimãã©ã°ã¤ã³ã¨ãã¦æåãªALEã«ã¯ã ã¨ã©ã¼ç®æãèªåã§ä¿®æ£ããALEFixã³ãã³ãããããåã ãããã£ã¦ã¿ããããªã¨æã£ã¦ããã®ã§ã ãã®æ©ä¼ã«ALEã§Pythonã³ã¼ãã®Lintã¨èªåæ´å½¢ããããã¦ã¿ããã¨æãã¾ãã åæ ç§ã¯ç´ ã®Vimã§ã¯ãªãNeoVim使ããªã®ã§ãã£ã¡ã使ã£ãæ¹æ³ã«ãªãã¾ãã ç´ ã®Vimã¨ã¯Pythonã®ãã¹è§£æ±ºã®ä»æ¹ãç°ãªãã®ã§ã注æãã ããã NVIM v0.3.1 ãã¨ALEã使ãã®ã§ALEã®ã¤ã³ã¹ãã¼ã«ã¯ãã¡ããå¿ è¦ã§ããå ¬å¼ã¯ä¸å¯§ã«æ¸ãã¦ããã®
Pythonã®è£å®ç°å¢ãjedi-vimããvim-lspã«ç§»è¡ãã話¶ Vimã§Pythonæ¸ãã¦ã¾ããï¼ é·ããPythonã®è£å®ç¨ãã©ã°ã¤ã³ã¨ã㦠davidhalter/jedi-vim ã使ç¨ãã¦ãã¾ãããã ãã® mattn (@mattn_jp) ãããCollaboratorã«ãªã£ã prabirshrestha/vim-lsp ã palantir/python-language-server ãããããå®ç¨çã«ãªã£ã¦ããã®ã§ç§»è¡ãã¦ã¿ã¾ããã ã¨ã¯ããå®éã«ä½¿ãã«ã¯ã¾ã è¨å®ããã¨ãããã¡ããã¡ããããã®ã§ãä¸åº¦ã¾ã¨ãã¦ãããã¨æãã¾ãã åæã¨ããç°å¢Â¶ Vim: 8.0以ä¸ããã¤ã³ã³ãã¤ã«ãªãã·ã§ã³ã§ jobs, timer, channel, lambda ãæå¹ã«ãªã£ã¦ãã Python: 2.7ãããã¯3.4以é (pyenvãAnacondaã§ã¤ã³ã¹ãã¼ã«ãã
ã½ããã¦ã§ã¢ãã¶ã¤ã³ 2018å¹´7æå·posted with ã«ã¨ã¬ã æè¡è©è«ç¤¾ 2018-06-18 Amazonã§æ¢ã楽天å¸å ´ã§æ¢ãYahooã·ã§ããã³ã°ã§æ¢ã ç®æ¬¡ ç®æ¬¡ ã¯ããã« Vimã§pythonã使ããããã«ããã Vim scriptå ã§ã®pythonã®ä½¿ãæ¹ vimç¨Python scriptã®ä¸ã§vimã®ãã¼ã¿ãå©ç¨ãã vimã®ã³ãã³ãã®å¼æ°ãvimscriptå ã®Pythonã«æ¸¡ãæ¹æ³ æå¾ã« åèè³æ MyEnigma Supporters ã¯ããã« ROSç¨ã®Vimã¹ã¯ãªãããè¦ã¦ãããã ä¸èº«ãæ®ã©Pythonã¹ã¯ãªããã ã£ãã®ã§ã ã©ããªé¢¨ã«å®ç¾ãã¦ããã®ã調ã¹ã¦ãããã æè¿ã®Vim(v7.0以é)ã¯å ã ã®æ©è½ã¨ã㦠pythonãå©ç¨ã§ããããã«ãªã£ã¦ãããããã§ãããã taketwo/vim-ros Pythonãç¨ãã¦Vimãæ¡å¼µãã¦ã¿ãã -
ä»ã®è·å ´ãPCã«ã¤ã³ã¹ãã¼ã«ããããã±ã¼ã¸ã管çããã¦ããããã python3ã®ã¤ã³ã¹ãã¼ã©ã使ç¨ã§ããªãã PCã«ãã£ã¦ã¯ã管çè 権éãç¡ããããããããã¤ã³ã¹ãã¼ã©åãããªãã ãããªç°å¢ã§ããvim8ã®if_pythonãæå¹åãã¦ãdenite.nvimãåããããã ã¨ããããã§ãè²ã 試ããçµæåãããã®ã§ããã®æã®ã¡ã¢ã ç°å¢ã¯ä»¥ä¸ã®éãã Windows10 64bit vim8 Kaoriyaç çµæã ãè¦ãæã¯ãæå¾ã®ãã¾ã¨ãããè¦ãã°OKã åæºå 試è¡1: python35.dllã¨vcruntime140.dllã$VIMã«ç½®ã 試è¡2: å ¨é¨$VIMç´ä¸ã«çªã£è¾¼ãã 試è¡3: python3ã®ãã©ã«ãã$VIMã«ç½®ã 試è¡4: pythonthreedllãè¨å®ãã 試è¡5: runtimepathåè¨å® ã¾ã¨ã åæºå python3ã®ããã±ã¼ã¸ãå ¬å¼ããåå¾
PUIAS_6_computational | 3.3 kB 00:00 PUIAS_6_computational/primary_db | 2.1 MB 00:03 Setting up Install Process Resolving Dependencies --> Running transaction check ---> Package python3.x86_64 0:3.3.0-1.puias6 will be installed --> Processing Dependency: python3-libs(x86-64) = 3.3.0-1.puias6 for package: python3-3.3.0-1.puias6.x86_64 --> Processing Dependency: libpython3.3m.so.1.0()(64bit) for pac
ã¯ããã« pythonã§ã¢ããªã±ã¼ã·ã§ã³ãä½ããã¨ã«ãªã£ãã®ã§ããã©ã«ãã§OSã«å ¥ã£ã¦ããpython2.xç³»ã§ããããªã¨æã£ãã®ã ããPython 2 㨠Python 3 ã®ã©ã¡ãã使ã£ã¦éçºãã¹ãï¼ãèªãã¨ããPython3.xã¯å®å®ãã¦ããã¨ã®ãã¨ãªã®ã§ãpyenvã§ã·ã¹ãã ã¯ã¤ãã«Python3.xãå©ç¨ã§ããç°å¢ãæ§ç¯ãã¦ã¿ãã ã¯ããã¯pyenvã ãã®ç®¡çã§ããããªã¨æã£ãããåpythonã®ã¤ã³ã¹ãã¼ã«ã¯çµæ§æéããããæ軽ã«ç°å¢ãåé¤åæ§ç¯ãåºæ¥ãªããããªã®ã§virtualenvãå°å ¥ããã
Instead of minute, hour, day, month or day of week it's also possible to specify a *. A * represents all possible values for that position (e.g. a * on 2nd position is the same as specifying all the possible values for hour) Several values can be separated by commas: e.g. if a command is to be executed every 10th minute so you can specify 0,10,20,30,40,50 for minute. A range of values can be
Pythonã«ã¯ããã¦è§¦ã£ã¦ããã¤ã®ã¾ã«ã1å¹´ãéããã®ã§ãããä¸çªã¯ã¾ã£ãã®ã¯ããã£ã±ãunicodeã®æ±ãã ã£ãã¨æãã¾ãã ç¹ã«ã UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-12: ordinal not in range(128) ã®ãããªã¨ã©ã¼ã«ã¯ããããæ©ã¾ããã¾ãããããããã¨ãã°rubyãªã©ä»ã®è¨èªã¨æ¯ã¹ã¦ãããã«ããããã«ãPythonãåã£ã¤ãã«ããè¨èªã«ãªã£ã¦ããã®ã§ã¯ãªãããã¨å人çã«ã¯æãã¾ãã ããã§ããã®ã¨ã©ã¼ã«é¢ä¿ããã¯ã¾ãã©ããã¨Tipsãããã¤ãåæãã¦ã¿ã¾ãããããããPythonã«è§¦ããããæ¹ã®åèã«ãªãã°ã¨æãã¾ãã ãªããç°å¢ã¯UNIXä¸ã®Python 2.4, 2.5ãæ³å®ãã¦ãã¾ãã u1ã¯unicodeåã§ãs1ã¯stråã§ããs1ã«ã©ã®ã
PythonSidebar-ja tracãªã©ã§ç¥ãããEdgewall Softwareãé å¸ãã¦ããPythonSidebarããã¼ã¹ã«ï¼æ¥æ¬èªçãä½ã£ã¦ã¿ã¾ããã Mozilla,Firefoxç¨ã®ãµã¤ããã¼ã§ããããã¥ã¡ã³ã翻訳ããã¸ã§ã¯ãã§ç¿»è¨³ãããï¼Pythonæ¨æºããã¥ã¡ã³ã(2.4)ãå èµãã¦ãã¾ãããªãã©ã¤ã³ã§Pythonã®æ¥æ¬èªããã¥ã¡ã³ããé²è¦§ã§ãã¾ãã ãã¦ã³ãã¼ã PythonSidebar-jaããã¦ã³ãã¼ã(4.2Mãã¤ãï¼ZIPãã¡ã¤ã«) ã¤ã³ã¹ãã¼ã«æ¹æ³ 1) ãã£ã¬ã¯ããªã®è¨ç½® ä¸è¨ãªã³ã¯ããPythonSidebar-jaããã¦ã³ãã¼ãï¼é©å½ãªå ´æã«è¨ç½®ãã¾ãã 2) ããã¯ãã¼ã¯ã®è¿½å htmlãã©ã«ãã®ä¸ã«ãã"toc-tutorial.html"ãFirefox/Mozillaã§éãã¾ããéãããã¼ã¸ãããã¯ãã¼ã¯ã¨ãã¦è¿½å ãã¦ä¸ããã â»ãã®ã¾
pythonã¯èã®ååãã¤ããããã°ã©ã è¨èªã§ããã§ãæ¬å½ã®ç±æ¥ã¯ã¤ã®ãªã¹ã®ã³ã¡ãã£ã¢ã³ã®ååãããï¼ã¢ã³ãã£ã»ãã¤ã½ã³ï¼ããªã®ã§ã大æµã¯èã®ã¢ã¤ã³ã³ãªã®ã ããåã¯èãå«ããªã®ã§ãã¢ã¤ã³ã³ãåèªå¤æ´ããæ¹ãè¯ãã¨æãã¾ããã¨ããããpythoné å¸è ãããèãããªãã¦ãpyãªãããã¢ããã«ãã¤ãã¨ãã®ã¢ã¤ã³ã³ã«ãã¦ããï¼ï¼ åå¿è ã§ãã¨ã£ã¤ãæããæ·å± ã®ä½ãè¨èªã¨ãã¦ç¥ããã¦ãã¾ããããããç¨éã¯å¤å½©ã§ãubuntuã¨ããlinuxã®éçºã«pythonã®ããã°ã©ã ããã使ããã¦ããã¨ãï¼æ¬å½ãã©ããã¯ç¥ããªãï¼ã決è¡ããããªæã§ä½¿ããã¦ããã®ã§ãç¥ã£ã¦ããã¦æã¯ãªãããã ã¨æãã¾ããã http://ja.wikipedia.org/wiki/Python pythonã®åæ©çãªããã¥ã¢ã«ï¼ããããã¯ãã¥ã¼ããªã¢ã«ã ãwindowsåãã§ã¯ãªãï¼ http://www.python.jp/
æ¼ç®å ååæ¼ç® +-*/ å°ä½ % ç´¯ä¹ ** è¤åæ¼ç®å +=,*= ã·ã¼ã±ã³ã¹å æååãã¦ãã³ã¼ãæååã ãªã¹ããã¿ãã«ããããã¡ããã㦠xrange ãªãã¸ã§ã¯ããå«ã æ¼ç®ã¯ä»¥ä¸ã®ãã¨ãè¡ãã
pythonã®unittestã®ããæ¹ãããå¿ããã®ã§ã¡ã¢ï¼ã¾ã¨ãã ãã¹ãã±ã¼ã¹ãä½ã import HogeModule # ãã¹ã対象ã®ã¢ã¸ã¥ã¼ã« import unittest class testHogeModule(unittest.TestCase): # HogeModuleãã¹ãã±ã¼ã¹ def test_foo(self): # fooé¢æ°ã®ãã¹ãã¡ã½ãã self.assertEquals(HogeModule.foo(1, 2), 3) def test_bar(self): # baré¢æ°ã®ãã¹ãã¡ã½ãã ã»ã»ã»ã» ãã¹ãã¡ã½ããã¯ãprefixã«testãä»ãããããããã¨ãã¬ã¼ã ã¯ã¼ã¯å´ã§åæã«å¼ã³åºãã¦ãããããã¹ãã®éãåæåãçµäºå¦çãªã©ãå¿ è¦ãªå ´åãããããsetUpã¡ã½ããã¨tearDownã¡ã½ããã§è¡ãã ãã¹ãã¹ã¤ã¼ããä½ã ãã¹ãã±ã¼ã¹ãæ¸ããã
Ãø¼Ã: Steve Purcell, <stephen_purcell at yahoo dot com> Project website: http://pyunit.sourceforge.net/ ÃâÃà ³µ´à ¥·¥¹¥Ã¥à Ã÷ï PyUnit ¤ò»Ã¤Ã¤Ã¥å¹¥Ã¤ò½ñ¤¯¤Ã¤à ¥¤¥ó¥¹¥Ã¡¼¥ëÃýá TestCases ¤Ã¾Ã²ð ñ½ã¤Ã¥å¹¥Ã¡¦¥±¡¼¥¹¤òºî¤ë ð½à Ã÷¥³¡¼¥Ã¤ÃºÃÃøÃÃ: ¡Ãºî¤êÃ䱡äòºî¤ë ã¿ô¤Ã¥å¹¥Ã¡¦¥á¥½¥Ã¥äò¤â¤Ã¤¿ TestCase ¥¯¥é¥¹ ¥å¹¥Ã¡¦¥±¡¼¥¹¤ò¥Ã¥¹¥Ã¡¦¥¹¡¼¥Ã¤Ã¤Ã¤Ã¤á¤ë ¥å¹¥Ã¡¦¥¹¡¼¥Ã¤òÃþ¤ì»Ã¤Ã¤¹¤ë ¥å¹¥Ã¤ò¤¹¤ë¥³¡¼¥Ã¤ÃÃÃ
pyglet ããã°ã©ãã³ã°ã¬ã¤ãã¯pygletãç¨ããã¢ããªã±ã¼ã·ã§ã³ä½æã®ãã㮠詳細ãªããã¥ã¡ã³ãã§ãããããã«è¨è¿°ãããé ç®ã¯pyglet API referenceã« ã詳ããæ¸ããã¦ããã®ã§ãåç §ããããã ããããã®ããã°ã©ãã³ã°ã¬ã¤ããpygletã«é¢ãã¦åãåãã¦èªããã®ãªãã æã ã¯ã¾ã pygletã¢ããªã±ã¼ã·ã§ã³ã®æ¸ãæ¹ ãèªããã¨ãå§ããã ã¤ã³ã¹ãã¼ã« pygletã¯ä»ã®ã©ã¤ãã©ãªã«ãããã¡ãªã¤ã³ã¹ãã¼ã«ä½æ¥ãå¿ è¦ã¨ããªãã pygletã¯å¤é¨ã©ã¤ãã©ãªãã³ã³ãã¤ã«æ¸ã¿ãã¤ããªãã¡ã¤ã«ãå¿ è¦ã¨ããªãã ãããã®å ´ã§å®è¡ãããã¨ãåºæ¥ããpygletã®ã½ã¼ã¹ã³ã¼ããã©ã³ã¿ã¤ã eggãã¡ ã¤ã«ãåã®ä½æããã¢ããªã±ã¼ã·ã§ã³ã½ã¼ã¹ã³ã¼ãã«å«ãã¦é å¸ãããã¨ãåº æ¥ã( é å¸ ãè¦ã)ã éçºç°å¢ã§ãpygletãã¤ã³ã¹ãã¼ã«ããã«pygletãç¨ããå®é¨ããµã³ãã«ãã
æ®æ®µvim7.1ã®èªåãã«ãã使ã£ã¦ãããã ãã©ãPythonã®ã½ã¼ã¹ã³ã¼ããæ¸ãã¨ããã³ã¡ã³ãè¡ãæ¸ããã¨ãã¦ãè¡é ã«#ãæ¸ããç¬éã«ã¤ã³ãã³ããç¡ããªã£ã¦è¡ã左端ã«è¡ã£ã¦ãã¾ãã>>ã¨ã==ã¨ãã§ãä¿®æ£ã§ããªãã£ãã set cinkeys= ã¨ã set noautoindent, nocindent, nosmartindent ã¨ããã£ã¦ãã©ãã«ããªããªãã£ããã ãã©ã解決æ³ã http://henry.precheur.org/2008/4/18/Indenting%20Python%20with%20VIM.html ã§è¦ã¤ããã ã¨ããããã~/.vim/indent/python.vim ããããªæãã«ãã¦ã¿ãã setlocal indentkeys+=0#autocmdã«ããæ¹ãè¯ãã®ããªï¼ au BufEnter *.py setlocal indentkeys+=
ãç¥ãã
é害
ã©ã³ãã³ã°
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}