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
from collections import defaultdict | |
counters = defaultdict(int) | |
counters['foo'] += 1 | |
counters['foo'] | |
# Out: 1 | |
counters['bar'] | |
# Out: 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
# Prerequisites: | |
sudo apt-get install g++ make libssl-dev git-core pkg-config | |
# pkg-config: is needed so that configure will be able to verify that openssl is | |
# installed. | |
# curl: is handy, but not needed for node.js to work. | |
# Install into user-specific local bin: | |
mkdir ~/local | |
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc |