サービス終了のお知らせ いつもYahoo! JAPANのサービスをご利用いただき誠にありがとうございます。 お客様がアクセスされたサービスは本日までにサービスを終了いたしました。 今後ともYahoo! JAPANのサービスをご愛顧くださいますよう、よろしくお願いいたします。
Presentation Overview 10 to 15 minutes of slides and examples. 15 to 20 minutes audience-directed. What? Python scripting in vim. (Not coding Python with vim) vim compiled with "+python" As present in: Fedora/CentOS (vim-enhanced) Debian/Ubuntu (vim-python) "Macros" in vim, but with a serious language behind them Like Emacs use of LISP (but, you know, better :-) More powerful than "vim script" Muc
Pythonで自分用の小物アプリを結構書き溜めてるんですけど、実はそのほとんどにプラグインシステムみたいなのをつくってたりします。 たとえばファイルの整理自動化みたいなの。ファイルの移動前に処理を追加する、てな部分をプラグインにしてあるわけです。 まぁ機能的にはCPANのClass::Componentっぽいもんですね。ですがそこまで高機能なのはいらないので、シンプルに自分が必要な部分だけまとめてみました。 1from inspect import getmembers, ismethod 2import types 3 4class Pluggable(object): 5 def __init__(self): 6 self.hooks = {} 7 8 def load(self, *config): 9 self.load_config(*config) 10 self.load_
最終更新日:2007年7月27日 18: Device Context (wxDC) の内容を追加 1: はじめに 2: 最初のスクリプト 2-1: ウィンドウの表示 2-2: エラー内容の書き出し 2-3: ボタンの表示 2-4: ボタンによるイベントの例(ウィンドウを閉じる) 2-5: ウィジェットの位置とサイズ 2-6: ボタンによるイベントの例(テキストのコピー) 3: 基本的なコントロール1(単独タイプ) 3-1: 固定テキスト (wxStaticText) 3-2: テキストコントロール (wxTextCtrl) 3-3: ボタン (wxButton) 3-4: トグルボタン(wxToggleButton) 3-5: スピンコントロール (wxSpinCtrl) 3-6: スライダー (wxSlider) 4: 基本的なコントロール2(項目選択タイプ) 4
ローカルのPC環境で,サーバーにアップロードすることを前提としたファイル,例えばHTMLファイルやCGIスクリプトなどを編集するときは,表示の確認やスクリプトの動作確認のために,以下のプロセスを繰り返すことになります. ファイルを更新 サーバーにアップロード (動作|表示)確認 更新したファイルをサーバーにファイルをアップロードする際には,Linuxではftp,scpやrsyncといったコマンド,WindowsではFFFTP,WinSCPなどのツールを使うことが多いと思います.このとき問題になるのが たとえコマンド1回で済むとしても,ファイルを更新するたびにアップロードして確認するのが,激しく面倒くさい ということです.個人的にこの面倒くささを解消したくて,過去に色々と対応策を試しましたが,どれも一長一短だというのが結論です. リモートに編集環境を構築する場合の問題点 ファイルの編集に必要
Pydiction allows you to Tab-complete Python code in Vim such as keywords, built-ins, standard library, and third-party modules. For the latest version of Pydiction and full documentation, see: http://rkulla.github.io/pydiction/ It doesn't require installing any dependencies. It simply consists of three files: python_pydiction.vim -- Vim plugin that autocompletes Python code. complete-dict
A terminal/shell buffer script for python enabled [g]vim (+python). Allows execution of shell commands in a vim buffer. It does not use r! <cmd>. Some of it's features: * It retains state because it's interactive. Set an environment variable and it "stays" because the shell process is the same through the whole session. * It can run interactive line based programs like ftp/telnet/python/ssh/etc
One day I fought on a boxing ring using my Thinkpad. It is a festival for nerds who loves lightweight language. (See Boxing in the LLRing?) My session was "Janken2.0", to make program to connect a server and play "Paper-Scissors-Rock". This entry is a FAQ, notFrequently Asked Question to make Python oneliner. Is it difficult to make oneliners in Python? You should learn Python more. Python use an
これはLL Ringというイベントの「じゃんけん2.0」に出場する際に「多くの構文に改行が必須であるPythonで書かれたじゃんけんエージェントをワンライナーにしていたらウケるかな」と思ってワンライナー化しているときに書いたメモです。自分用のメモのつもりだったので書き殴ってありますが、意外と人気のようなので近いうちに加筆します。 実は後から書いた英語版(How to make oneliner in Python?)の方が整理されているのかも。 完成したワンライナー def文を式にする defは改行を要求するのでlambdaに置き換える必要がある。 def foo(x): return x + 1(ここに改行) foo = lambda x: x + 1 globals().__setitem__("foo", lambda x: x + 1) lambdaは式しか含むことが出来ないので、
TheSchwartzの概要は分かってきたので、実践投入に向けてより実用的なコードを書いてみます。TheSchwartz::Worker::SendEmailを使ってメールの配信というのが、簡単そう、かつ切実に必要なので、これを試してみました。 まず、PythonとTheSchwartzを媒介するGearmanベースのTheSchwartzを用意します。基本的には昨日言及したコードを利用し、データベースの設定だけ書き換えます。 # myschwartzd use Gearman::Worker; use TheSchwartz; use JSON::Any; my $j = JSON::Any->new; my $ts = TheSchwartz->new(databases => [{ dsn => "dbi:mysql:database=schwartz", user => "root
これはなんですか? 奥村晴彦氏の著書「C言語による最新アルゴリズム事典」をPythonでやろうと決意。Rubyに翻訳されていたので、Pythonでもやってみようと。でも実は書籍はもっていなくてCとRubyのソースを見つつ翻訳しています。1日1個ペースで進んでいます。 やっているうちにこの本が欲しくなってきました。 個人のPython力を高めるために始めましたので、間違いが含まれているかもしれません。ご指摘等ございましたら連絡[syobosyobo at gmail dot com]ください。 ちょっと方針をかえて、ctopyで訳すことにした。またまた方針をかえて、、、ctopyはあまりつかえない。ちょっといじってやらないと、出力がよくない。コメントとか入ってると、うまく変換してくれないし。 で、そのあとPythonらしい書き方で書いていこう、かと。どうなるかわかりませんが。
Projects I write software. Python, Javascript and Haskell are some of my favorite languages although learning new programming languages is a hobby of mine. More Interests Distributed Systems, Test Driven Development, gaming, and homebrewing. More Contact I’m always open to hear about new opportunities and to discuss projects. More
これは便利。Vim上でシェルが動かせる。 vimsh.tar.gz - terminal/shell buffer script for python enabled gvim : vim online +pythonが必要。 使い方がちょっと特殊。source ~/.vim/vimsh.vimという感じで使うのでmapして使う。 なんといっても、ウィンドウを分割して表示出来るのが魅力的。 補完が全然効かないので、zshを動かすのには向いてないが、インタプリタを動かすときは効果絶大。かゆいところにちょっとだけ手が届く感じ。 早速,Life Changingにrateしといた。 追記 ソースをちょっと読んでみた。スゲー丁寧に書かれててびびった。 Pythonのソースを真面目に眺めたのは初めてかも、凄くシンプルな文法っぽくて好感が持てる。何処かで聞いたな・・・括弧の無いScheme・・・Pyt
Blog Search when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: ${entry.path} [in template "__entry.ftlh" at line 3, column 25] - Reached through: #include "__entry.ftlh" [in template "entry.ftlh" at
What is Gearman? Gearman provides a generic application framework to farm out work to other machines or processes that are better suited to do the work. It allows you to do work in parallel, to load balance processing, and to call functions between languages. It can be used in a variety of applications, from high-availability web sites to the transport of database replication events. In other word
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く