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/sh | |
# GCC | |
## Prerequisites for GCC | |
## http://gcc.gnu.org/install/prerequisites.html | |
## Installing GCC: Configuration | |
## http://gcc.gnu.org/install/configure.html | |
GCC_VER=4.7.1 | |
WORK_DIR=$HOME/Builds/GCC |
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
[gccgo] | |
http://gcc.gnu.org/install/ | |
安装gmp|mpfr|mpc后(./configure --prefix=/data1/home/xueminzhao/gcc4.7.1/install/gmp|mpfr|mpc, make install) | |
export gmp|mpfr|mpc的lib到LD_LIBRARY_PATH | |
然后运行 | |
./configure \ | |
--prefix=/data1/home/xueminzhao/gcc4.7.1/install/gcc \ | |
--with-local-prefix=/data1/home/xueminzhao/gcc4.7.1/install/gcc \ |
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
[编译libhdfs] | |
https://github.com/forward/node-hdfs | |
[编译github.com/zyxar/hdfs] | |
因为zyxar/hdfs是根据hadoop 1.0.3编写, 需要修改: | |
1. cgo部分 | |
删除github.com/zyxar/hdfs/hdfs.h, 修改import "C"为: | |
/* |
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://coderplay.iteye.com/blog | |
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://www.thecloudavenue.com/2011/11/passing-parameters-to-mappers-and.html | |
There might be a requirement to pass additional parameters to the mapper and reducers, besides the the inputs which they process. Lets say we are interested in Matrix multiplication and there are multiple ways/algorithms of doing it. We could send an input parameter to the mapper and reducers, based on which the appropriate way/algorithm is picked. There are multiple ways of doing this | |
Setting the parameter: | |
1. Use the -D command line option to set the parameter while running the job. | |
2. Before launching the job using the old MR API |
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://blog.golang.org/2011/06/profiling-go-programs.html | |
go tool pprof http://10.168.152.18:12345/debug/pprof/profile |
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 bisect | |
class NFA(object): | |
EPSILON = object() | |
ANY = object() | |
def __init__(self, start_state): | |
self.transitions = {} | |
self.final_states = set() | |
self._start_state = start_state |
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
from gevent import monkey | |
monkey.patch_socket() | |
import logging | |
import gevent | |
from gevent.queue import Queue | |
import pymysql as db | |
logging.basicConfig(level=logging.DEBUG) | |
LOGGER = logging.getLogger("connection_pool") |
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
# based on the following: | |
# http://saintgimp.org/2013/01/22/merging-two-git-repositories-into-one-repository-without-losing-file-history/ | |
# http://blog.caplin.com/2013/09/18/merging-two-git-repositories/ | |
git clone Task (保证在master) | |
git clone DopNluServer (保证在master) | |
cd Task | |
git remote add DopNluServer ../DopNluServer | |
git fetch DopNluServer |