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 dbus | |
import xchat | |
__module_name__ = 'xchat-rhythmbox' | |
__module_author__ = 'e' | |
__module_version__ = '0.1' | |
print "Connecting to RhythmBox dbus service." | |
bus = dbus.SessionBus() |
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 urllib | |
from BeautifulSoup import BeautifulSoup | |
from tornado.escape import xhtml_unescape | |
class MetroLyrics(): | |
@staticmethod | |
def search(artist, title): | |
params = urllib.urlencode({'search': ' - '.join((artist, title)), 'category': 'artisttitle', 'submit': 'Search'}) |
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
from Core.ZalgoBase.BaseModule import BaseModule | |
from twisted.web.client import getPage | |
from twisted.internet.defer import DeferredLock, inlineCallbacks | |
from Core.ZalgoUtil.CmdWraps import command | |
class Module(BaseModule): | |
parseCommands = True | |
lock = DeferredLock() | |
pool = [] | |
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
// libWebAssign LOL | |
function putHelp(solutionSet) { | |
title = solutionSet[0] | |
solutionSet = solutionSet[1] || {} | |
if($$('.bread').getNext()[0].innerHTML.replace(/^\s+/, '') != title) { | |
alert("Invalid Solution Set Loaded! I work for '" + title + "'") | |
} | |
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 collections | |
import functools | |
from itertools import ifilterfalse | |
from heapq import nsmallest | |
from operator import itemgetter | |
from twisted.internet.defer import maybeDeferred, succeed, Deferred | |
class Counter(dict): | |
'Mapping where default values are zero' | |
def __missing__(self, key): |
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
from Core.ZalgoBase.BaseModule import BaseModule # I need this, it's the base module to extend off of. | |
from twisted.web.client import getPage # asynchronous page getter | |
from twisted.internet.defer import inlineCallbacks # write async code as synchronous code | |
from urllib import urlencode # escape url args | |
from Core.ZalgoUtil.ModUtil import xhtml_unescape as unescape, utf8 # turn xhtml elements into actual characters, convert utf8 to string to send to irc | |
from Core.ZalgoUtil.CmdWraps import stripColors, needsArg, timeout, command # convenicnce decorators | |
from Core.ZalgoUtil.DeferredCache import deferred_lfu_cache # cache the results from UD for a while. | |
import re | |
class Module(BaseModule): |
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
from twisted.internet.task import LoopingCall | |
from twisted.web.client import getPage | |
from twisted.internet.defer import DeferredLock, inlineCallbacks, returnValue | |
from Core.ZalgoUtil.CmdWraps import command, hook | |
from Core.ZalgoUtil.ModUtil import dateDiff, utf8 | |
from Core.ZalgoBase.BaseModule import BaseModule | |
from Core.ZalgoUtil.DeferredCache import deferred_lfu_cache | |
from Core.ZalgoHooks import Hooks | |
from xml.etree.cElementTree import fromstring | |
import re |
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 | |
# ***** BEGIN LICENSE BLOCK ***** | |
# Version: MPL 1.1/GPL 2.0 | |
# | |
# The contents of this file are subject to the Mozilla Public License | |
# Version 1.1 (the "License"); you may not use this file except in | |
# compliance with the License. You may obtain a copy of the License at | |
# http://www.mozilla.org/MPL/ | |
# | |
# Software distributed under the License is distributed on an "AS IS" |
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
""" | |
Python IRC ASCII to image script by e ([email protected]) | |
""" | |
import Image, ImageFont, ImageDraw | |
import time, re | |
_strip_colors_regex = re.compile('(\x03([0-9]{1,2})(,[0-9]{1,2})?)|[\x0f\x02\x1f\x03\x16]').sub | |
def strip_colors(string): |
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
color_0 = ffff ffff ffff | |
color_1 = 0000 0000 0000 | |
color_2 = 0000 0000 7f7f | |
color_3 = 2a3d 8ccc 2a3d | |
color_4 = ffff 0000 0000 | |
color_5 = 7f7f 0000 0000 | |
color_6 = 9c9c 0000 9c9c | |
color_7 = fcfc 7f7f 0000 | |
color_8 = ffff ffff 0000 | |
color_9 = 0000 fcfc 0000 |
OlderNewer