def on_data(self, data):
        text_i = data.find("text")
        source_i = data.find("source")
        text = data[text_i + 8: source_i].decode('utf_8')
        
        sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
        server_address = ('localhost', 9999)
        print >> sys.stderr, server_address % 'connecting to %s port %s'
        sock.connect(server_address)
        
        try:
            print >>sys.stderr, 'sending "%s"' % text
            sock.sendall(Util.normalize(text) + '\n')

        finally:
            print >>sys.stderr, 'closing socket'
            sock.close()
dataset/ETHPy150Open ambodi/realtime-spark-twitter-stream-mining/tweet.py/TwitterStreamListener.on_data/swapped operands of `%`