01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
2008 : 01 02 03 04 05 06 07 08 09 10 11 12
2007 : 01 02 03 04 05 06 07 08 09 10 11 12
2006 : 01 02 03 04 05 06 07 08 09 10 11 12
2005 : 01 02 03 04 05 06 07 08 09 10 11 12
DNS はローカルでキャッシュすると、平均的には速くなることもあるかもしれない。
# 大学の環境ではLANが十分に速いので、基幹DNSの応答とローカルDNSの応答がほとんど変わらないっぽい
dnscacheの設定
HOWTO Setup a DNS Server with DJBDNS - Gentoo Linux Wiki
# dnscache-setup
で forward IP に /etc/resolv.conf の中身を入れれば、
動く。
基本的に、TCP汎用のプロキシ。
<http://d.hatena.ne.jp/lurker/20060731/1154349129>
ssh -D 1080 login-server
で、プロキシをローカルに立ち上げる。
login-server はリモートにある閉じたネットワークへのログインサーバー。
プロキシの使いかた:
TSOCKS_CONF_FILE=/home/matubara/.tsocks.conf ssh 192.168.123.45
firefox だと URLパターンで細かい場合分けができる foxyproxy が便利かも。
富豪的プログラマは
javax.swing.tree.TreeNodeのインターフェイスで、実装は DefaultMutableTreeNode を使うらしい。
ふつうにできるのを知ってショックでした。
以前、それらしく書いてみたらコンパイルエラーだったので、
できないと思い込んでいた。
// パラメータとして型を渡す template class template< typename T > class T0 {}; // パラメータとして1階テンプレートクラスを渡す template class template< template<typename> class T > class T1 {}; // パラメータとして2階テンプレートクラスを渡す template class template< template<template<typename> class> class T > class T2 {}; // パラメータとしてテンプレートと型を受け取り、テンプレート適用をする template<template<typename> class TMPL, typename T> class ApplyTmpl { public: typedef TMPL<T> type; type constructor() { return type(); } type* newInstance() { return new type(); } }; // パラメータとして値を渡す関数 int f0(int x) { return 0; } // パラメータとして1階関数を渡す関数 int f1(int (*x)(int)) { return 0; } // パラメータとして2階関数を渡す関数 int f2(int (*x)(int (*)(int))) { return 0; } // パラメータとして関数と値を受け取り、関数適用をする int apply_func(int (*x)(int), int y) { return x(y); }
<http://chasen.org/~daiti-m/text/zsh-exec.html>
# csh なら, .cshrc に
if ($?prompt) then
setenv SHELL /usr/local/bin/zsh
if ( -x $SHELL ) exec $SHELL
endif
# sh, bash なら, .profile に
[ -x /usr/local/bin/zsh ] && exec zsh
<http://dx.doi.org/10.1016/0925-7721(94)00014-X>
<http://docs.sun.com/source/806-4847/ncgTOC.html>
浮動小数点演算の説明がかなり詳細。
via 浮動小数点数 - Wikipedia -
<http://gcc.gnu.org/onlinedocs/gcc-4.0.3/gcc/Optimize-Options.html#index-fstrict_002daliasing-511>
int i = 10; float f = *( (int*)&i );は移植性が低いだけでなく、GCC4の最適化
-O2
-O1 -fstrict-aliasing -fschedule-insns
によって意味が変わる。
訂正版
union int_float { int as_int; float as_float; } int_float x; int i = 10; x.as_int = i; float f = x.as_float;
Text Highlighting Script [perl][net]:
<http://planet.gentoo.org/developers/yuval/2006/10/07/text_highlighting_script>
Getoptはハッシュで受け取れたのか。
#!/usr/bin/perl
use Getopt::Std;
use Term::ANSIColor;
my $word = shift;
my %hash;
getopts('c:', \%hash);
$colour = $hash{'c'} || 'red';
while (<STDIN>) {
s/($word)/colored($1, $colour)/ge;
}
unison -sshargs=-1 -ui=text -servercmd=/space/home/matubara/bin/unison ~/public_html ssh://www-tsujii//space/home/matubara/public_html
やたら長いが、
-sshargs=-1
は ssh コマンドのオプションで、SSH version 1 の指定。
-servercmd=...
はサーバー側の unison 実行ファイルのありか。
色々なアーキテクチャに対するバイナリが配布されているので、
ssh で入れるマシン間の同期はこれでOK。
# バイナリがなければOcamlコンパイラが必要
<http://doc.trolltech.com/4.2/tutorial.html>
一見 Java awt, swing と似ている。
SIGNAL & SLOT のイベント処理のところは違うけれど。
qmake -project
qmake
make
<http://boost.org/doc/html/boost_staticassert.html>
コンパイル時に、型変数の値チェックとかできる。
かなり便利かも。
#include <iterator> #include <boost/static_assert.hpp> #include <boost/type_traits.hpp> template <class RandomAccessIterator > RandomAccessIterator foo(RandomAccessIterator from, RandomAccessIterator to) { // this template can only be used with // random access iterators... typedef typename std::iterator_traits< RandomAccessIterator >::iterator_category cat; BOOST_STATIC_ASSERT((boost::is_convertible<cat, const std::random_access_iterator_tag&>::value)); // // detail goes here... return from; }
目的:wav2txt
動かすだけなら、すごく簡単です。
まともに使えるようにするのは、かなり大変です。
Julius ディクテーションキットをダウンロードする。
fast.jconf の
-input
-sscalc
などを適切に編集する。
run_fast.bat
として動かす。
Julius は基本的にはデコーダ。
雑音通信路モデルでいうと、
・通信路モデルに相当する triphone HMM の定義
・情報源に相当する 3-gram 言語モデル
さらに、
・言語モデルの単語に対する読みの辞書
を必要とする。
HMM は対象音声の特性にあったもの、
言語モデルは対象分野にあったものが望ましい。
特に背景雑音が音響モデルの想定外な音声や、
標本化周波数が音響モデルの想定外な音声は、
ほとんど認識できない。
背景雑音はともかく、
標本化周波数は、人間が聞いた場合はあまり違いがないように聞こえるので、
注意が必要。
本来、背景雑音や標本化周波数は、
よりクリアな方が認識しやすい、という程度の意味しかないが、
それは音響モデルがその条件に合わせて訓練されている、
という前提が成り立っての話。
音響モデルをつくるには、
2008 : 01 02 03 04 05 06 07 08 09 10 11 12
2007 : 01 02 03 04 05 06 07 08 09 10 11 12
2006 : 01 02 03 04 05 06 07 08 09 10 11 12
2005 : 01 02 03 04 05 06 07 08 09 10 11 12
最終更新時間: 2009-02-01 00:57
Powered by chalow