mkdir ~/mongodb # use --fork to run mongodb server as daemon mongod --dbpath ~/mongodb/ --fork --logpath ~/mongo/mongodb.log
Technical stuff
Friday, 17 July 2015
Starting mongodb without root permission
Thursday, 19 March 2015
Summary of concurrency and parallelism in Python
1. For IO bound code, both threading and multiprocessing will work. Multiprocessing is easier to setup using multiprocessing.Pool than threading (with Queue and threading.Thread) , but it has to keep multiple copies of data in memory, resulting in a higher memory overhead.
2. For CPU bound code, multiprocessing is more likely to be better because it has true parallelism. Threading doesn’t in Python due to GIL.
3. For CPU bound code that needs to copy around big chunks of data, which may not fit into the memory, then explicitly share the data using multiprocessing.Value and multiprocessing.Array.
Reference:
Friday, 9 August 2013
Thursday, 10 January 2013
Succinct explanation of the relationships between X,X Window ,X11, XFree86 and X.org
http://en.kioskea.net/faq/869-what-is-x-x-window-x11-xfree86-and-x-org
a Chinese one, also fairly clear, but more verbose, and a bit outdated
http://shenlan.blog.51cto.com/55742/441593
a Chinese one, also fairly clear, but more verbose, and a bit outdated
http://shenlan.blog.51cto.com/55742/441593
Saturday, 29 December 2012
Thursday, 27 December 2012
my emacs cheatsheet
# using emacs to make a list macro (e.g. 0, 1, 2, 3, 4) F3 F3C+n C+a F4 # move point forward to the matching } bracket; C-M-f # Insert the output of shell command into emacs buffer C-u M-! # inplace shell command M-| # the following three are for getting help defun: eldoc C-h f C-h S # compilation emacs --batch --eval '(byte-recompile-directory "~/.emacs.d")' or to recompile a single file as from a Makefile, emacs --batch --eval '(byte-compile-file "your-elisp-file.el")'
Subscribe to:
Posts (Atom)