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
| import threading | |
| from queue import Queue | |
| import time | |
| # lock to serialize console output | |
| lock = threading.Lock() | |
| def do_work(item): | |
| time.sleep(1.0) # pretend to do some lengthy work. | |
| # Make sure the whole print completes or threads can mix up output in one line. |
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
| #!/bin/sh | |
| # | |
| # install required packages | |
| # | |
| apt-get install apache2 git-core gitweb | |
| # | |
| # create folder to host the repositories | |
| # |