Python
以åæ¸ãããã®ã®åå ãåãã£ãã masahero.hatenablog.jpã¯ã¤ãæååããã¡ã¿ããã "CallWindowProcW"ã¿ããã«æå¾ã«"W"ãã¤ãé¢æ°ããã¹ã¦"A"ã«ç½®ãæããã¨åä½ãããPythonã¨ãããpywin32å´ã®ä»æ§ãå¤ãã£ãã®ã ãããã
以å以ä¸ã®ãããªè¨äºãæ¸ããã masahero.hatenablog.jpæéããã£ã¦ãã®ã¾ã¾ã§ã¯åä½ããªããªã£ã¦ãããããªã®ã§ä¿®æ£çãä½ã£ãã Python 3.6.9ã§ã¯åä½ããããPython 3.7.3ã§ã¯å ã®ã¦ã£ã³ãã¦ããã·ã¼ã¸ã£ãå¼ã³åºãç®æã§"Access violation"ãçºçããâ¦
ãã£ã¼ãã©ã¼ãã³ã°ç¨ã®ããã±ã¼ã¸ã§ããchainerãCUDAã«ãã対å¿ãã¦ããªãã£ãã®ã§OpenCLã¸å¤ãã¦ã¿ãã masa.h / Chainer-CL â Bitbucket æçµç®æ¨ã¯CUDAã®æé¤ã
Windows10ã«ãã¦MSMQããã¤ã®éã«ãåãã¦ããã®ã§ãæ´»ç¨ãã¹ãPythonããã³ãã¨ã³ããæ¸ãå§ãã¦ã¿ãã https://bitbucket.org/masa.h/pymsmq http://redmine.masahase.info/projects/pymsmqã¨ãã£ã¦ãç¾ç¶ã¯COMãªãã¸ã§ã¯ãã«å¯¾ããé常ã«èãã©ããã
Python3.4以éã«ã¯statisticsã¨ããã¢ã¸ã¥ã¼ã«ãæ¨æºã©ã¤ãã©ãªã«è¿½å ããããæ¨æºã©ã¤ãã©ãªãªã®ã§ä½¿ã人ãå¤ããªãå¯è½æ§ãããããNumPyã使ãããªãå½ç¶ã®ããã«ãã¡ãã®ã»ããæ©ãã é©å½ã«ãã³ããã¼ã¯ãã¦ã¿ãçµæã示ãã
Arcadiaç¨recipe - MasaHeroã®æ¥è¨ãæ¹è¯ãããã¨ããããããã¼ãã«çµçã§ãªãã¹ã¿ã¤ã«ã·ã¼ãçãåç §ããããã«ããã from calibre.web.feeds.recipes import BasicNewsRecipe class Subscription(BasicNewsRecipe): u'Arcadiaã®ä½åãèªã¿è¾¼ã' title = â¦
Calibreã¯recipeãèªåã§ç¨æãããã¨ã§webãµã¤ããèªåã§é»åæ¸ç±ã«ä»ä¸ãã¦ããããã§ãArcadiaç¨ã®recipeãä½ã£ã¦ã¿ãã # -*- coding: utf8 -*- from calibre.web.feeds.recipes import BasicNewsRecipe import re class Arcadia_BBS_subscription(Basicâ¦
æ¨æºã©ã¤ãã©ãªãªãã¡ã¬ã³ã¹ãèªãã¨Tkdndã使ããã¿ãããªãã¨ãæ¸ãã¦ãããããªãã¡ã¬ã³ã¹ã«ã¯èª¬æããªãã½ã¼ã¹ãèªãã¨è¨ããã°ããã®ç¶æ ãTkdnd.pyãè¦ã¦ãè¦ç´ ãã¦ã£ã³ãã¦éã§ããåãã§ãããD&Dããããã¡ã¤ã«ã®æ å ±ã®åãåãæ¹ã¯ãã£ã±ããçµå±wâ¦
CheckListBoxããã¾ãæ±ããªããSizerã«ããã¦Layout()ã¨ããã¨ç¸¦æ¹åã®ãµã¤ãºã0ã«ãªã£ã¦ãã¾ã以éã®ã³ã³ããã¼ã«ã®é ç½®ããããããªãã å ·ä½çã«ã¯ä»¥ä¸ã®ã³ã¼ãã§çã£ãã¨ããã®é ç½®ãã§ããªãã class AllMovePanel(wx.Panel): u"""å ¨ä½ç§»åç¨ã®ããã«"â¦
[python] åªãã Python ããã°ã©ããè¦åãã10+1ã®è³ªå - methaneã®ããã° æè¿ã¯Pythonã°ãããªã®ã§çãã¦ã¿ããããã¾ãã«ãã¡ãã¡ãããå 容ãªã®ã§ããã¡ãã£ã¨åå¼·ãã¦ã¿ãããªã èªåã§æ¸ãã¦ãåã«ã¯IPythonã§Try&Errorããã°ã©ãã«ããªããããã¾ãâ¦
tkFileDialog.openfilenamesã§è¤æ°ãã¡ã¤ã«é¸æãããéãPythonãªãã ããå½ç¶ãªã¹ãã§è¿ã£ã¦ãããã®ã ã¨æã£ãããã¹ãã¼ã¹åºåãã®åä¸æååãè¿ãããã tclã®ææ³ãå¼ããã£ã¦ãã¿ããã§ãè¦ç´ ä¸ã«ã¹ãã¼ã¹ãå«ã¾ããã¨"{}"ã§å²ããããããããªãã"â¦
ã¾ã ã¾ã å®è£ ãã¦ããªãæ©è½ãããããã¨ããããviã§ãã¡ã¤ã«ã®ç·¨éãã§ããç¨åº¦ã«ã¯ãªã£ãã ãã¾ãã«æéãããããããããã欲ããã£ãæ©è½(éè¤åé¤)ãZFSã«å®è£ ããã¦ãã¾ã£ãããã¨ãã¨ã¯PyDumpFSç¨ã¨ãã¦ä½ãå§ããã®ã§ããã¡ãç¨ã«ã¯ã¾ã 価å¤ã¯ãâ¦
ã¨ããããéå»ãã°åã§ã¯ãã¾ãããä¸æ®µè½ããã®ã§å ¬éãã¦ã¿ããææ³ã¨ãã¦ã¯ãä¸å®åã®HTMLã®ãã¼ã¹ã¯ããå«ãè¦ãç®å®åã«è¦ãã¦ããidãä»ãã¦ããã¿ã°ãéã£ãããidã®å 容ã®ãã©ã¼ããããéä¸ããå¤ãã£ãããè¦ç´ ãå¿ ãããã¿ã°ã§å²ã¾ãã¦ããããâ¦
"abc"ã¨ãããã¡ã¤ã«ãããç¶æ³ã§ $ cp abc hij cp: writing `hij': å ¥å/åºåã¨ã©ã¼ã§ãã¨ãªãããã®ã¨ãã®FUSEå´ã®ãã°ã unique: 94, opcode: LOOKUP (1), nodeid: 1, insize: 44 LOOKUP /hij getattr /hij *** getattr : /hij unique: 94, error: -2 (Noâ¦
FUSEã®readdirã§è©°ã¾ã£ã - MasaHeroã®æ¥è¨ 解決編ã話ã¯åç´ãã¤ãã¤ãæåååã¨ãã¦Unicodeåã使ã£ã¦ãã¾ã£ã¦ãããFUSEå´ã¯Byteåã§æ±ºãæã¡ãã¦ããããããåºæ¬çã«èªåã§å¤æãããã¯ã*1ã ããä»åã¯ãªããå¤æããã¦ããªãã£ããããªã®ã§ãé©å½ã«"â¦
FusePythonã§èªä½ã®ãã¡ã¤ã«ã·ã¹ãã ã®ã©ããã¼ãä½ã£ã¦OSããæ±ããããã«ãã¦ã¿ããã¨ããã®ã ãè©°ã¾ã£ããreaddirããã¾ããããªãã ãã®é¨åãæç²ããã¨ãããªæã: def readdir(self, path, offset): print "*** readdir", path, offset yield fuse.Dâ¦
FUSEã®Pythonãã¤ã³ãã£ã³ã°ã«ã¤ãã¦èª¿ã¹ã¦ãããä¸ã®ãããªè¨è¿°ãè¦ã¤ãã£ãã python-fuseï¼ ãããåãããããã¤ããã ããããã¥ã¡ã³ããã»ã¨ãã©ãªã ã½ã¼ã¹ãèªããã¨ãã硬派ãªã¢ããã¼ãã è»å¼±è ã®ç§ã«ã¯è·ãéã FUSE - skobayasã®æ¥è¨ 確ãã«å°â¦
FUSEã®ããã¯ã¨ã³ãã«sqliteã使ã£ã¦ã¿ãã以ä¸ã®ãããªã¨ã©ã¼ãåºãã Traceback (most recent call last): File "/usr/lib/python2.6/site-packages/fuse.py", line 361, in __call__ return apply(self.func, args, kw) File "sqlitefs.py", line 139, inâ¦
ã¾ãã class Base(type): def __new__(cls, clsname, clsbases, clsdict): parents = [b for b in clsbases if isinstance(b,Base)] print parents return super(cls, Base).__new__(cls, clsname, clsbases, clsdict) class Child(object): __metaclass__ â¦
åå¼·ç¨ã«O/R Mapperãèªä½ä¸ - MasaHeroã®æ¥è¨ã®ç¶ã ã¡ã¿ã¯ã©ã¹ã¨ã使ã£ãããã¡ãã£ã¨ä½¿ãããããªãã®ã§ã¯ã¨æãç¾æç¹ã¾ã§åºæ¥ã¦ãããã®ãå»æ£ããã£ãããªãã®ã§ä¸å¿è¨å¿µã«ããã«æ®ãã¦ããã
Djangoã®ã¢ãã«å®ç¾©ã§ class Hoge(models.Model) hoge = models.TextField() ã¨ããã¨ãHoge.hogeã¯ä½ãããé åHoge._meta.fieldsã«è¿½å ãããã¿ããã ãã©ããã£ã¦ãã®ã ãããã
PyDumpFSãwin32対å¿ã«ããããã®éç¨ã§sqliteã使ããã¨ã«ããã®ã§ããããã®O/R Mapperãåå¼·ãã¦ãä½ã£ã¦ããã å®ç¨ã«èãããã®ã欲ãããªãSQLObjectã¨ãSQLAlchemyã¨ã使ã£ãã»ããè¯ããã ãããã©ãsqlite3ã¢ã¸ã¥ã¼ã«ã使ãã®ã¯åãã¦ã ãO/R Mappeâ¦
家ã«ããPython2.5 on Fedora9㧠import sys import gettext from optparse import OptionParser t=gettext.translation('hogehoge',) _=t.ugettext parser=OptionParser() parser.add_option("-e","--exclude",dest="exclude_expr",action="append", metavaâ¦
gettextã使ãã¨ã¡ãã»ã¼ã¸ã«ã¿ãã°ãå¿ è¦ã«ãªããã¤ã³ã¹ãã¼ã©ã¼ã¨ãã¦distutilã®ã¿ãèãããªã data_files=[ ('share/locale/ja_JP/LC_MESSAGES',['src/locale/ja_JP/PyDumpFS.mo']) ], ã¨ãã£ãå½¢ã§æ¸ãã¦ããã°æå®ããå ´æã«ããã¦ãããããsetuptoolâ¦
ln -s . hogeã¨ããã¦ããã¨ãããããã¯ã¢ãããããã¨ããã¨symlinkã延ã ã¨ãã©ã£ã¦ãã¾ãããã¹ãé常ã«é·ããªã£ã¦ãã¾ãã¨ã©ã¼ãåãã¦è½ã¡ããsymlinkã®ãªã³ã¯å ããã©ãããã«ããå¼å®³ãåºãããã£ã¬ã¯ããªããªã¼ãã«ã¼ãã«ãªã£ã¦ãããã¨ãå¤å¥ããâ¦