Skip to content

Instantly share code, notes, and snippets.

View jifengwu2k's full-sized avatar

Jifeng Wu jifengwu2k

View GitHub Profile
@benhoyt
benhoyt / atomic_counter.py
Created August 3, 2016 13:12
An atomic, thread-safe incrementing counter for Python
"""An atomic, thread-safe incrementing counter."""
import threading
class AtomicCounter:
"""An atomic, thread-safe incrementing counter.
>>> counter = AtomicCounter()
>>> counter.increment()
@webspectyler
webspectyler / cp.sh
Created October 9, 2013 12:22
Copy all files including hidden directories
cp -a /mnt/sda8/john/. /mnt/sdb2/JOHN103