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
import asyncio | |
import functools | |
import unittest | |
class AsyncTest(unittest.TestCase): | |
def __getattribute__(self, name): | |
""" Hack to run async tests in the AsyncIO event loop """ | |
original = super().__getattribute__(name) |
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 until_bytes(input_bytes, ending): | |
""" | |
Yields bytes from input up to and including a given ending. | |
This can be used to seek to the end of a pattern if your | |
input_bytes object is an iterator. | |
""" | |
position = 0 | |
length = len(ending) |
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
[user] | |
email = alistair.broomhead@gmail.com | |
name = Alistair Broomhead | |
[push] | |
default = current | |
[core] | |
autocrlf = input | |
excludesfile = /home/al/.gitignore_global | |
[alias] | |
pushf = push --force-with-lease |
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
import csv | |
def email_next(seq): | |
for address in seq: | |
try: | |
email(address) | |
except Exception as ex: | |
print('Could not email {}, moving onto the next: {}' | |
.format(address, ex)) | |
else: |
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
import asyncio | |
import aiohttp | |
import json | |
from pip.utils import get_installed_distributions | |
#from pip.commands.search import compare_versions | |
from distutils.version import StrictVersion, LooseVersion | |
def package_url(name): | |
return "http://pypi.python.org/pypi/%s/json/" % name |
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
// name: Remove To Do Planned and Done from column headings | |
// placeholder: restui_board | |
tau.mashups | |
.addDependency('tau/core/bus.reg') | |
.addModule('BusListeners', function(reg){ | |
function Listener(bus, event, func){ | |
this.bus = bus | |
this.event = event |