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 bash | |
# Generates gource video out of multiple repositories. | |
# First, get a local branch/clone of each repository. | |
# Then, pass the repositories as command line arguments. | |
# | |
# Example: | |
# $ gource-multiple-repositories.sh /path/to/repo1 /path/to/repo2 | |
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 bash | |
# Generate gource video out of bzr repositories for Ubuntu Touch Core Apps. | |
# | |
# Corey Goldberg 2013 | |
# | |
# Usage: | |
# gource-ubuntu-core-apps.sh /path/to/repo1 /path/to/repo2 | |
# | |
# Example - generate video for all Ubuntu Touch Core Apps: |
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 | |
# | |
# gexiv2 image Exif date fixer. | |
# Corey Goldberg, 2014 | |
"""Recursively scan a directory tree, fixing dates | |
on all jpg/png image files. | |
Each file's Exif metadata and atime/mtime are all |
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 | |
# | |
# image metadata remover and date fixer. | |
# Corey Goldberg, 2014 | |
"""Recursively scan a directory tree for image files, and fix metadata. | |
* removes all metadata (Exif, IPTC, XMP, GPS Info, comment, thumbnail) | |
* sets metadata and file timestamps to oldest datetime found. |
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 | |
""" | |
helloworld.py | |
Python3 and Qt5 | |
""" | |
from PyQt5 import QtWidgets | |
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 logging | |
import re | |
from subunit import ByteStreamToStreamResult | |
from testtools import StreamToExtendedDecorator, TestResult | |
logging.basicConfig(level='INFO') |
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 | |
# | |
# This example adds testtools Details from a testtools TestCase. | |
# | |
# For more information about: testtools, Details, and Content Objects, visit: | |
# * https://testtools.readthedocs.org/en/latest/for-test-authors.html#details | |
from testtools import TestCase | |
from testtools.content import ( | |
ContentType, |
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
/* send a metric to hosted graphite via HTTP POST (async). */ | |
function sendMetricToGraphite(metricName, value) { | |
var apiKey = YOUR-API-KEY; | |
var url = "https://" + apiKey + "@www.hostedgraphite.com/api/v1/sink"; | |
var request = new XMLHttpRequest(); | |
request.open("POST", url, true); | |
request.send(metricName + " " + value); | |
}; |
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 collections | |
import re | |
from operator import itemgetter | |
import numpy | |
DATA_FILE = 'perflog-everything-onload.csv' | |
NUM_RESULTS = 50 |
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 collections | |
import re | |
from operator import itemgetter | |
import urlparse | |
import numpy | |
import sys |