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 concurrent.futures import ThreadPoolExecutor | |
from threading import BoundedSemaphore | |
class BoundedExecutor: | |
"""BoundedExecutor behaves as a ThreadPoolExecutor which will block on | |
calls to submit() once the limit given as "bound" work items are queued for | |
execution. | |
:param bound: Integer - the maximum number of items in the work queue |
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
sshemr(){ | |
jobid=`/path/to/elastic-mapreduce --list --active | awk '{ print $1 }' | head -n1` | |
/path/to/elastic-mapreduce --ssh $jobid | |
} |
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
"""Rename a list of figures, making space for a new figure | |
Ex: Figure 1, Figure 2, Figure 3 -> Figure 1, Figure 3, Figure 4 | |
""" | |
import sys | |
import os | |
import re | |