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
/* | |
* given a list of input leveldb's, merge them into a single output leveldb | |
* | |
*/ | |
#include <iostream> | |
#include <algorithm> | |
#include <boost/program_options.hpp> | |
#include <boost/cstdint.hpp> |
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
#include <cstdlib> | |
#include <cstring> | |
#include <iostream> | |
#include <boost/array.hpp> | |
#include <boost/bind.hpp> | |
#include <boost/asio.hpp> | |
namespace posix = boost::asio::posix; | |
class echo_client |
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
#include <cstdlib> | |
#include <cstring> | |
#include <iostream> | |
#include <boost/array.hpp> | |
#include <boost/bind.hpp> | |
#include <boost/asio.hpp> | |
namespace posix = boost::asio::posix; | |
class posix_chat_client |
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
erik@roastbeef:~/proj$ time node child.js < bigfile > derp | |
real 0m6.176s | |
user 0m4.176s | |
sys 0m1.916s | |
erik@roastbeef:~/proj$ time cat bigfile | node child.js | cat > derp | |
real 0m1.504s | |
user 0m0.560s | |
sys 0m0.892s |
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
erik@roastbeef:~/proj$ cat child2.js | |
var readline = require('readline'), | |
rl = readline.createInterface(process.stdin, process.stdout); | |
rl.on('line', function(line) { | |
console.log(line); | |
}); | |
erik@roastbeef:~/proj$ time node child2.js < bigfile > derp |
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
erik@roastbeef:~/proj$ cat child.py | |
import sys | |
line = sys.stdin.readline() | |
while line: | |
line = sys.stdin.readline() | |
erik@roastbeef:~/proj$ time python child.py < bigfile > derp | |
real 0m0.073s | |
user 0m0.056s |
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
>>> not None | |
True | |
>>> True is not None | |
True | |
>>> not not None | |
False | |
>>> False is not not None | |
File "<stdin>", line 1 | |
False is not not None | |
^ |
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
>>> not None | |
True | |
>>> True is not None | |
True | |
>>> not not None | |
False | |
>>> False is not not None | |
File "<stdin>", line 1 | |
True is not not None | |
^ |
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
>>> not None | |
True | |
>>> True is not None | |
True | |
>>> not not None | |
False | |
>>> True is not not None | |
File "<stdin>", line 1 | |
True is not not None | |
^ |
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
Philosophy - Wikipedia, the free encyclopedia | |
Modern philosophy - Wikipedia, the free encyclopedia | |
Property (philosophy) - Wikipedia, the free encyclopedia | |
Quantity - Wikipedia, the free encyclopedia | |
Mathematics - Wikipedia, the free encyclopedia | |
Finite set - Wikipedia, the free encyclopedia | |
Information - Wikipedia, the free encyclopedia | |
Fact - Wikipedia, the free encyclopedia | |
Knowledge - Wikipedia, the free encyclopedia | |
Science - Wikipedia, the free encyclopedia |