Example #1
0
    def __init__(self):

        print '''\033[95m
 _   __                      _               
| | / /                     | |              
| |/ /  ___  _ __  _   _ ___| | ____ _ _ __  
|    \ / _ \| '_ \| | | / __| |/ / _` | '_ \ 
| |\  \ (_) | | | | |_| \__ \   < (_| | | | |
\_| \_/\___/|_| |_|\__,_|___/_|\_\__,_|_| |_|
\033[0m'''
        print '\033[92mMerhaba, ben Konuşkan. Özelliklerim hakkında bilgi almak için \'bilgi\' yaz.\033[0m'
        sys.stdout.write('[Ben] ')
        sys.stdout.flush()
        while 1:
            giris = sys.stdin.readline().replace('\n', '')
            cikis = zeka.__init__(giris)
            if cikis:
                print '\033[94m[Konuşkan] ' + cikis + '\033[0m'
            sys.stdout.write('[Ben] ')
            sys.stdout.flush()
Example #2
0
    def __init__(self):

        print """\033[95m
 _   __                      _               
| | / /                     | |              
| |/ /  ___  _ __  _   _ ___| | ____ _ _ __  
|    \ / _ \| '_ \| | | / __| |/ / _` | '_ \ 
| |\  \ (_) | | | | |_| \__ \   < (_| | | | |
\_| \_/\___/|_| |_|\__,_|___/_|\_\__,_|_| |_|
\033[0m"""
        print "\033[92mMerhaba, ben Konuşkan. Özelliklerim hakkında bilgi almak için 'bilgi' yaz.\033[0m"
        sys.stdout.write("[Ben] ")
        sys.stdout.flush()
        while 1:
            giris = sys.stdin.readline().replace("\n", "")
            cikis = zeka.__init__(giris)
            if cikis:
                print "\033[94m[Konuşkan] " + cikis + "\033[0m"
            sys.stdout.write("[Ben] ")
            sys.stdout.flush()
Example #3
0
    def __init__(self):
        
        twitter_auth    = twitter.OAuth(
            consumer_key    = CONSUMER_KEY,
            consumer_secret = CONSUMER_SECRET,
            token           = ACCESS_TOKEN,
            token_secret    = ACCESS_TOKEN_SECRET
        )
        twitter_api     = twitter.Twitter(auth=twitter_auth)
        twitter_ustream = twitter.TwitterStream(auth=twitter_auth, domain='userstream.twitter.com')
        
        print "Listening for new direct messages..."
        for msg in twitter_ustream.user():
            if 'direct_message' in msg:
                dm     = msg['direct_message']
                sender = dm['sender']['screen_name']
                text   = dm['text']
                
                if text and sender != TWITTER_USERNAME:
                    print "Sender: @%s\nMessage: %s\n" % (sender, text)

                    cikis = zeka.__init__(text)
                    if cikis:
                        twitter_api.direct_messages.new(user=sender, text=cikis)
Example #4
0
 def __init__(self):
     
         giris = sys.argv[1].replace('\n', '')
         cikis = zeka.__init__(giris)
         if cikis:
             print cikis
Example #5
0
    def __init__(self):

        giris = sys.argv[1].replace('\n', '')
        cikis = zeka.__init__(giris)
        if cikis:
            print cikis