タグ

2007年7月12日のブックマーク (6件)

  • MySQLノウハウ

    いろいろなからメモってきたメモのメモ。出典を書いておくのを忘れた。思い出し次第補完するかも。 deleteのコストは高いので、無効化を示すフィールドを作ってupdateすべき slow query logに要注意 多くのエントリでほとんどのフィールドが同じ値を持つ場合はインデックスの効果が小さい →複合インデックスの効果が大きい 複合インデックスは指定の順番が大切。AとBという指定の場合、A単独でもインデックスの効果がある。逆は真でない。 インデックスが使われる場面は フィールド値を定数と比較するとき (where name = 'hogehoge') フィールド値でJOINするとき (where a.name = b.name) フィールド値の範囲を求めるとき (<,>,between) LIKE句が文字列から始まるとき (where name like 'hoge%') min(),

  • [Python] setuptools - SumiTomohiko's blog

    この記事について この記事は、setuptools - The PEAK Developer's Centerの日語訳です。まだ途中ですが、先が長いので、ここで一旦公開します。 なお、訳者は翻訳しただけで、記事の内容については確認していません。悪しからずご了承下さい。 setuptoolsを使ったパッケージのビルドと配布 setuptoolsは、Pythonのdistutils(ほとんどのプラットフォームではPython 2.3.5以上に対応します; 64ビットのプラットフォームでは、Python 2.4以上が必要です)を多く拡張します。これにより、Pythonのパッケージをビルドし、配布することが容易になります。他のパッケージに依存しているパッケージでは、とくにそうなります。 setuptoolsを使ってビルドされ、配布されたパッケージは、ユーザにはdistutilsを使った普通のPy

    [Python] setuptools - SumiTomohiko's blog
  • setuptoolsを使ってコマンドツールを作る - aodagの日記

    pasterでsetuptoolsを使った最小プロジェクトを作成する。 paster create hellosetup.pyを編集。 コマンドツールのスクリプトを追加する。 ここでは、helloモジュールのhello関数をpyhelloという名前のコマンドにする。 entory_pointsにconsole_scriptsセクションを作りその中に追加する。 from setuptools import setup, find_packages import sys, os version = '0.0' setup(name='hello', version=version, description="", long_description="""\ """, classifiers=[], # Get strings from http://www.python.org/pypi?%3

    setuptoolsを使ってコマンドツールを作る - aodagの日記
  • Rolling with Ruby on Rails

    Now, next, and beyond: Tracking need-to-know trends at the intersection of business and technology AI/ML Few technologies have the potential to change the nature of work and how we live as artificial intelligence (AI) and machine learning (ML). Future of the Firm Everything from new organizational structures and payment schemes to new expectations, skills, and tools will shape the future of the fi

    Rolling with Ruby on Rails
  • Pyline: a grep-like, sed-like command-line tool. « Python recipes « ActiveState Code

    Pyline: a grep-like, sed-like command-line tool. (Python recipe) by Graham Fawcett This utility was born from the fact that I keep forgetting how to use "sed", and I suck at Perl. It brings ad-hoc command-line piping sensibilities to the Python interpeter. (Version 1.2 does better outputting of list-like results, thanks to Mark Eichin.) #!/usr/bin/env python # updated 2005.07.21, thanks to Jacob O

  • 5 Regular Expressions Every Web Programmer Should Know - I’m Mike

    I’m going to assume you have a basic understanding of regular expressions at this point. If you’re a regex n00b (or /n0{2}b/, as I like to call them), or if you need a quick refresher, check out my previous post on the absolute bare minimum that every programmer should know about regular expressions. You won’t be disappointed. So, without further adu, here are the five regular expressions that I