Twisted code samples