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
| import re | |
| from Misuzilla.Applications.TwitterIrcGateway.AddIns.DLRIntegration import DLRIntegrationAddIn | |
| re_source = re.compile(r"<.*?>") | |
| def OnPreSendMessageTimelineStatus(sender, e): | |
| e.Text = e.Text + " (via "+ re_source.sub("", e.Status.Source) +")" | |
| def OnBeforeUnload(sender, e): | |
| CurrentSession.PreSendMessageTimelineStatus -= OnPreSendMessageTimelineStatus |
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
| --- TwitterService.cs.org 2010-05-14 19:46:25.000000000 +0900 | |
| +++ TwitterService.cs 2010-05-14 19:39:37.000000000 +0900 | |
| @@ -545,9 +545,19 @@ | |
| /// <exception cref="TwitterServiceException"></exception> | |
| public Statuses GetMentions() | |
| { | |
| + return GetMentions(1); | |
| + } | |
| + | |
| + /// <summary> |
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 | |
| # -*- encoding: utf-8 -*- | |
| import sys | |
| import re | |
| from System import String | |
| from System.Text import Encoding | |
| from System.IO import StringReader | |
| from System.Net import WebClient, WebException | |
| from Misuzilla.Applications.TwitterIrcGateway import NilClasses, Status, Statuses, User, Users | |
| from Misuzilla.Applications.TwitterIrcGateway.AddIns import TypableMapSupport, ShortenUrlService |
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 | |
| # -*- encoding: utf-8 -*- | |
| import urllib | |
| import urllib2 | |
| import simplejson as json | |
| from datetime import datetime, timedelta, tzinfo | |
| from getpass import getpass | |
| def parse_datetime(str): | |
| class FixedOffset(tzinfo): |
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 | |
| # -*- encoding: utf-8 -*- | |
| import time | |
| import urllib | |
| from threading import Thread | |
| from Queue import Queue | |
| from getpass import getpass | |
| import tweepy | |
| class StreamWatcherListener(tweepy.StreamListener): |
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
| #include <boost/proto/proto.hpp> | |
| #include <iostream> | |
| namespace mel { namespace math { | |
| namespace detail { | |
| template <typename Expr> | |
| struct expr; |
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 | |
| # -*- encoding: utf-8 -*- | |
| import sys | |
| class OStream(object): | |
| def __init__(self, ostream): | |
| self.ostream = ostream | |
| def __lshift__(self, input): | |
| if hasattr(input, '__call__'): |
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 | |
| # -*- encoding: utf-8 -*- | |
| def filter2(function, iterable): | |
| if isinstance(iterable, dict): | |
| return dict([(k, iterable[k]) for k, v in iterable.iteritems() if function(k, v)]) | |
| else: | |
| return filter(function, iterable) | |
| l = [1, None, 3, None, 5] | |
| d = {"a": 1, "b": None, "c": 3} |
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 | |
| # -*- encoding: utf-8 -*- | |
| from System.Reflection import BindingFlags | |
| from Misuzilla.Applications.TwitterIrcGateway.AddIns.DLRIntegration import DLRIntegrationAddIn | |
| def invoke(instance, name, *args): | |
| type = instance.GetType() | |
| method = type.GetMethod(name, BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public) | |
| method.Invoke(instance, args) |
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 | |
| # -*- encoding: utf-8 -*- | |
| class Enumerable(object): | |
| def __init__(self, source, inext): | |
| self.source = source | |
| self.inext = inext | |
| def __iter__(self): | |
| return self |