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 | |
"""Convert ogg files to mp3""" | |
from optparse import OptionParser | |
import tempfile | |
import os | |
import subprocess | |
class CommandException(Exception): | |
"""Exception that is raised if calling an external command fails""" | |
def __init__(self, command): |
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 | |
""" | |
Remove all .pyc files in the path recursively | |
""" | |
from __future__ import print_function | |
import argparse | |
import os | |
import shutil |
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 python3 | |
import os | |
LF_BYTES = b'\n' | |
LF_BYTE = b'\n'[0] | |
def get_filetypes(): | |
types = [] | |
for line in open('.gitattributes').readlines(): | |
line = line.split() |
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 python3 | |
import argparse | |
import os | |
import subprocess | |
def mr_register(root): | |
dirs = os.listdir(root) | |
for _dir in dirs: |
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 | |
import random | |
import operator | |
import time | |
from collections import OrderedDict | |
import unittest | |
class ordered_dict(dict): | |
def __init__(self): | |
self.order = {} |
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
__pycache__/ |
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 | |
import subprocess | |
import sys | |
import time | |
def main(): | |
start_time = time.time() | |
subprocess.call(' '.join(sys.argv[1:]), shell=True) | |
delta = time.time() - start_time | |
hours = int(round(delta / 3600, 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 python3 | |
import argparse | |
import base64 | |
import xml.etree.ElementTree as ET | |
import urllib.request, urllib.error, urllib.parse | |
import operator | |
import time | |
from canadapostconf import username, password |
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 python3 | |
""" | |
A utility to find what labs from Excelleris are missing from OSCAR | |
""" | |
import argparse | |
import csv | |
import datetime | |
from operator import itemgetter | |
import unittest |
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 python2 | |
""" | |
Search for swimming lessons on the Vancouver Aquatic Services web page | |
that match certain criteria. | |
""" | |
import urllib2 | |
import json | |
#WP=Lord Byng |
NewerOlder