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
#!/bin/bash | |
# (C) 2008 Canonical Ltd. | |
# Author: Martin Pitt <martin.pitt@ubuntu.com> | |
# License: GPL v2 or later | |
# modified by David D Lowe and Thomas Detoux | |
# Debian 7 support by pixline <pixline@gmail.com> | |
# It NEEDS /bin/bash, dash won't work (sed issues). | |
# | |
# Setup user and temporary home directory for guest session. |
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
def format_time(secs): | |
return "%d:%02d" % (secs / 60, secs % 60) | |
def invert(arr): | |
""" | |
Make a dictionary that with the array elements as keys and | |
their positions positions as values. | |
>>> invert([3, 1, 3, 6]) |
NewerOlder