This file contains hidden or 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
# install bzr and gource | |
# get a branch of Mir's trunk code | |
# create gource video | |
$ sudo apt-get install bzr gource | |
$ bzr branch lp:mir | |
$ cd mir | |
$ gource \ | |
-s .06 \ |
This file contains hidden or 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 | |
# | |
# Example using `concurrencytest`: | |
# https://github.com/cgoldberg/concurrencytest | |
import unittest | |
from concurrencytest import ConcurrentTestSuite, fork_for_tests | |
This file contains hidden or 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 | |
# | |
# Example using `concurrencytest`: | |
# https://github.com/cgoldberg/concurrencytest | |
import time | |
import unittest | |
from concurrencytest import ConcurrentTestSuite, fork_for_tests |
This file contains hidden or 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
[tox] | |
envlist = | |
py26 | |
py27 | |
[testenv] | |
deps = | |
nose | |
commands = | |
{envpython} setup.py install |
This file contains hidden or 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 | |
# | |
# Corey Goldberg, 2013 | |
# | |
# Python 2.7 | |
"""validate and analyze dimensions of image files. Supports: PNG, JPG, GIF.""" | |
This file contains hidden or 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 struct | |
def get_image_info(data): | |
if is_png(data): | |
w, h = struct.unpack('>LL', data[16:24]) | |
width = int(w) |
This file contains hidden or 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 | |
"""Selenium WebDriver - Browser Benchmark | |
run 10 iterations of simple local test case with each driver: | |
Firefox (webdriver) vs. Chrome (chromedriver) vs. PhantomJS (ghostdriver). | |
""" | |
import unittest |
This file contains hidden or 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
""""Create "The Matrix" of binary numbers scrolling vertically in your terminal. | |
original code adapted from juancarlospaco: | |
- http://ubuntuforums.org/showpost.php?p=10306676 | |
Inspired by the movie: The Matrix | |
- Corey Goldberg (2013) | |
Requires: |
This file contains hidden or 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 | |
"""Python unit test using PhantomJS and Selenium WebDriver.""" | |
# requires: selenium python bindings, phantomjs 1.8+ | |
# | |
# if you have phantomjs installed and on your PATH, | |
# you can instantiate a PhantomJS WebDriver like this: | |
# | |
# from selenium import webdriver |
This file contains hidden or 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 json | |
import os | |
import urllib | |
"""Download latest source release from PyPI. |