The Python IAQ: Infrequently Answered Questions by Peter Norvig Q:Infrequently Answered Questionって何ですか? ある種の質問は、答えを知る人がほとんどいない、あるいはポイントが曖昧である、理解しづらい問題であるという理由によって(とはいえ、あなたにとってはとても重要なものかもしれません)、めったに答えられることがありません。 Java_IAQ のために、このIAQという用語を作ったのですが、それはとても有名な、 About.comの都市伝説リスト でも見つけられます。PythonのFAQはたくさん見つかりますが、Weiyang Chenによる、 このページの中国語訳 を除けば、これは唯一のIAQです(FAQリストのいくつかには、 C への皮肉が含まれています)。 Q:finally節内のコードの
アクセンスのおまけ 「オープンソースとも呼べない程度の何か」を提供します。ソースコードなら、1000行いかないくらいの小さいやつ。何か役に立ったらいいなという程度のものです。オープンソースだなんて恥ずかしくて言えませんが、それなりの、オープンソース・ライセンスを適用します。ライセンスの詳細については、それぞれのプロジェクトまたはソースコードをご覧下さい。その他、ウィキというよりブログ気味に、何やらつらつらと書いています。うちの仕事とは直接には関係ないことばかりです。誰かの役に立つかというよりは、自分用のメモだったりします。くだらないバグとかでつまずいても、しばらくすると忘れちゃうもので。 雑多 Go言語でイテレータが欲しかった(要らなくなった) Python関係 Cythonのドキュメントを翻訳しました Jinja2 の for ループ内にブロックを定義する SQLAlchemyドキュメン
ホットトピックス インスタは批判の嵐、YouTubeは強化、TikTokは鈍化。大混戦「短編動画」市場のゆくえ
In this post, we have explained in detail how to deal with XML files in Python. We will also see some of the complex terms of ElementTree module. What are XML files?Extensible Markup Language (XML) is a file format that is used for the serialization of data, that is, storing, transmitting, and reconstructing arbitrary data, in a format that is both human-readable and machine-readable. As a markup
Psycopg is the most popular PostgreSQL adapter for the Python programming language. Its core is a complete implementation of the Python DB API 2.0 specifications. Several extensions allow access to many of the features offered by PostgreSQL. The psycopg3 project is currently under active development. Sponsoring this project will help achieve swift completion and ensure the maintenance of psycopg2,
KInterbasDB A Python Extension Package for the Firebird and Interbase® Relational Databases Introduction KInterbasDB is a Python extension package that implements Python Database API 2.0-compliant support for the open source relational database Firebird and some versions of its proprietary cousin Borland® Interbase®. In addition to the minimal feature set of the standard Python DB API, KInterbasDB
はてな日記キーワードの自動リンクって、どういうアルゴリズムでやってるんだろう?と思いググって見たところ、そのものずばりなページを見つけました。 はてなダイアリーキーワード自動リンクAPI http://d.hatena.ne.jp/hatenadiary/20040205/1075960162 なんと正規表現でやってるそうな。これは簡単そう。。。と思ったので、ちょっと手元のcsvを使って実験してみました。 こんな感じの辞書ファイルと、 dict.csv ---------------- 0001,はげ,hage 0002,ほげ,hoge 0003,ほが,huga こんな感じのデータファイルがあるとします。 data.csv ---------------- hage.txt,1,hage,誰がなまはげだ hoge.txt,2,hoga,彼はほがらかだがはげだ hoge.txt,3,hoge
最近追加されたテスティングフレームワークを試したみた。 Djangoは基本的にはPython由来のdoctestやunittestを用いてテストを行う。最近追加されたテスティングフレームワークは、アプリケーションの直下にあるmodels.pyやtests.pyを自動的にAllテストしてくれるというもの+Viewのテストを行う疑似ブラウザともいえるClientというクラス。 Railsと同じく、Djangoもテストの前にテスト用データベース・テーブルを生成し、初期データを流し込み(fixtureは現在実装中)、テストを行い、テスト用データベースを破棄するという流れ。おいおい、そんな流れは業務系とか既存データベース使うアプリにはできんぞ、せめてビューとかシノニムとかに気づいてくれよー。 とか思いつつ。(現実的には、デフォルトのTEST_RUNNER設定であるdjango.test.
最近話題のDjangoをちょっと触ってみることにした。 まずは手始めに、 IBM Python Webフレームワーク、第1回: DjangoとPythonを使ってWeb開発 - Japan を写経してみようと、昨日の晩1:30頃から始めたんだけど結構わかりにくくて何箇所か つまづいた。結局admin画面表示して項目追加して表示するところまでやって、job詳細 がでないまま寝て、起きてまた再挑戦しました。その時のメモを書いておきます。 環境は、WindowsXP+cygwin(python2.4.3)です。 モデルを作成する SQLiteとpysqliteのインストールは、 SQLite 関連 を参考にさせて頂きました。 あ、nakagamiさんのページだったのですね。 SQLite: v3.3.7 pysqlite: 2.3.2 一点、SQLiteをソースからビルドするときに、make i
Years ago John Aycock's SPARK introduced the idea of using docstring to store the pattern and rule definitions for a parser generator. Rather, that's where I first heard of it; someone else could have been first. Here's part of the scanner definition from Biopython for parsing GenBank locations: def t_caret(self, input): r" \^ " self.rv.append(Token("caret")) def t_comma(self, input): r" \, " self
[[ Spyce ]] Web development is fun again! Spyce will not waste your time with Clunky code reuse constructs XML, YAML, or a templating language you've never seen before; everything is Python Manually accessing GET and POST page parameters Writing boilerplate code for form validation Editing multiple files for each user-visible page Writing SQL queries by hand Rolling your own authentication framewo
Edit Area Here is EditArea, a free javascript editor for source code. (That is no way a WYSIWYG editor). This editor is designed to edit souce code files in a textarea. The main goal is to allow text formatting, search and replace and syntax highlight (for small text).ブラウザ上で動作するソースコードエディタ『Edit Area』。 エディタ自体はJavaScriptによって実装されていて、編集対象の言語はPHP, CSS, JavaScript, Pythonに対応しています。 ブラウザ上でWYSIWYGにHTMLを編集でき
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く