cat /etc/resolv.conf
This file contains 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
hello this my first gist |
This file contains 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
Just Entry |
This file contains 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
add file reduce.py; | |
FROM ( | |
select * | |
from | |
( | |
select | |
dep_airport, | |
arr_airport, | |
dep_time, |
This file contains 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
#!/usr/bin/env python | |
url = 'http://foo.com/bar' | |
d = pq(url=url) | |
a_tags = d('a').filter(lambda i, this: pq(this).text() == 'some pattern here'.decode('utf-8')) | |
urls = filter(lambda x: re.search('edocfare.travelsky.com', x), map(lambda x: x.attrib['href'], a_tags)) | |
print urls | |
url = urls[0] |
This file contains 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
time echo "scale=5000; a(1)*4" | bc -l > /dev/null |
- CPU: Intel(R) Xeon(R) CPU E5-2630 0 @ 2.30GHz (文档里面说最好使用gcc >= 4.6)
- Memory: 64GB 4X
- Kernel: 3.2.34
- Issue: CentOS 6.2
- Postgresql: 9.2
- GCC: 4.8.0
- CFLAGS: -march=native -O3 -mavx -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard
- LDFLAGS: -Wl,--as-needed -Wl,-rpath,'/opt/pg92/lib',--enable-new-dtags
This file contains 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
hadoop jar ./contrib/streaming/hadoop-streaming-0.20.2-cdh3u4.jar -input /home/xiaoxu.lv/publish_fare/raw_data/blacketermmergeresults_zip_2013-05-10.txt -output /home/xiaoxu.lv/publish_fare/rule_detail/ -mapper extract_raw.py -file extract_raw.py -reducer cat -numReduceTasks 41 | |
hadoop jar ./contrib/streaming/hadoop-streaming-0.20.2-cdh3u4.jar -input /home/xiaoxu.lv/publish_fare/rule_detail/ -output /home/xiaoxu.lv/publish_fare/rule_detail_count_finger/ -mapper "cut -f 1" -reducer "uniq -c" -numReduceTasks 41 |
OlderNewer