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
#!/usr/bin/env python | |
from os import popen | |
from sys import stdout | |
from time import sleep | |
largest_max = 0 | |
while True: | |
with open('progress') as f: | |
progress = int(f.read()) or 0 |
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
#!/usr/bin/env python | |
# ssh-keyscan-aliases (version is in first parser line) | |
# Sebastian Weigand, February 2010 (and later modifications) | |
# Requires Python 2.5 - 2.x | x > 5, and a UNIX-like OS | |
# A smarter `ssh-keyscan` | |
from os import access, R_OK, putenv | |
from socket import getfqdn, gethostbyname, gethostbyname_ex, gaierror, herror | |
from subprocess import Popen, PIPE | |
from sys import stdin, stderr |
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
#!/usr/bin/env python | |
# coding: utf-8 | |
''' | |
=============================================================================== | |
__ __ _ | |
\ \ / /__ _ __ __| |_ __ | |
\ \ /\ / / _ \| '__/ _` | '__| | |
\ V V / (_) | | | (_| | | | |
\_/\_/ \___/|_| \__,_|_| |
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
for i, highlightable_item in enumerate(highlightable_items): | |
hue = (360 / len(highlightable_items)) * i | |
yield '<span style="color: hsl(%s,50%%, 50%%);">%s</span>' % (hue, highlightable_item) |
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
class EmbeddedTimer(): | |
def __init__(self): | |
self.start = time() | |
def stop(self): | |
end = time() | |
diff = end - self.start | |
if 1 < diff: |
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
Visit https://github.com/sebastianweigand/multimedia |
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
Visit https://github.com/sebastianweigand/multimedia |
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
#!/usr/bin/env python | |
# Sebastian Weigand 2011 | |
from mutagen.easymp4 import EasyMP4 | |
from subprocess import * | |
import sys, time | |
print 'Proof that Microsoft sucks ass at parsing media files:\n' | |
raw_input('Press enter when ready.') |