This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| オリジナルは力武さんの投稿 http://erlang-users.jp/ml/erlang/index.cgi?0::166 | |
| アキュムレータ accumulator | |
| アノテーション annotation | |
| アリティ arity | |
| ー致条件 match specification | |
| 入れ子リスト deep list | |
| インターフェイス interface | |
| エクスポート export |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -*- coding: utf-8 -*- | |
| from paver.easy import * | |
| import os | |
| import os.path | |
| import subprocess | |
| def run_git(dirname): | |
| print "git update %s" % dirname | |
| sh("git pull ") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import zmq | |
| import sys | |
| import time | |
| cxt = zmq.Context() | |
| receiver = cxt.socket(zmq.PULL) | |
| receiver.connect("tcp://127.0.0.1:5555") | |
| sum = 0 | |
| while True: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import zmq | |
| import sys | |
| context = zmq.Context() | |
| subscriber = context.socket(zmq.SUB) | |
| subscriber.connect("tcp://localhost:5556") | |
| # receive only message with zipcode being 10001 | |
| zipfilter = sys.argv if len(sys.argv) > 1 else "10001 " | |
| subscriber.setsockopt(zmq.SUBSCRIBE, zipfilter) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -*- coding: utf-8 -*- | |
| """ | |
| This scripts reqire a third party module 'requests'. | |
| You can get it from PyPI, i.e. you can install it using | |
| easy_install or pip. | |
| http://docs.python-requests.org/en/v0.10.4/ | |
| Original source code is written by shin1ogawa, which is in Java. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| IFS=" | |
| " | |
| cd "${1}" | |
| echo "source dir: "${PWD} | |
| echo "target dir: "${2} | |
| for input in `find . -name "*.aiff" -type f` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| find . -iname '*.txt' | xargs python -c 'import sys; print sys.argv[1:]' | |
| find . -iname '*.txt' | python -c 'import sys; print [f.strip() for f in sys.stdin]' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # convert PuTTY's public ssh key file into OpenSSH public key | |
| ssh-keygen -i -f id_rsa_putty.pub > id_rsa.pub |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| % ./configure --prefix=/opt/erlang/R15B01 \ | |
| > --disable-hipe \ | |
| > --disable-native-libs \ | |
| > --enable-smp-support \ | |
| > --enable-threads \ | |
| > --enable-kernel-poll \ | |
| > --enable-darwin-64bit \ | |
| > --without-javac |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #! /bin/bash | |
| source ~/.virtualenvs/sphinx/bin/activate | |
| cd ~/docs/ | |
| make html |