summaryrefslogtreecommitdiff
path: root/megahal_local.py
diff options
context:
space:
mode:
authoryvesf <yvesf@d0e8fea9-7529-0410-93fb-d39fd5b9c1dd>2009-06-10 08:17:19 +0000
committeryvesf <yvesf@d0e8fea9-7529-0410-93fb-d39fd5b9c1dd>2009-06-10 08:17:19 +0000
commitc6bb1110cbe9b2a9e9b31c5fc66e1e5c7aa5deba (patch)
tree99a4f40bd3df9c79bd23a7a2850144932bb96a24 /megahal_local.py
parent7279c2ba6e9ad29a8e635c21d5549b21d7b8c461 (diff)
downloadomegle-c6bb1110cbe9b2a9e9b31c5fc66e1e5c7aa5deba.tar.gz
omegle-c6bb1110cbe9b2a9e9b31c5fc66e1e5c7aa5deba.zip
ibo
git-svn-id: http://xapek.org/svn/common/omegle@1098 d0e8fea9-7529-0410-93fb-d39fd5b9c1dd
Diffstat (limited to 'megahal_local.py')
-rw-r--r--megahal_local.py27
1 files changed, 27 insertions, 0 deletions
diff --git a/megahal_local.py b/megahal_local.py
new file mode 100644
index 0000000..cb96a0f
--- /dev/null
+++ b/megahal_local.py
@@ -0,0 +1,27 @@
+import mh_python
+import pyPgSQL.PgSQL
+
+mh_python.initbrain()
+print "\033[2J"
+
+
+conn = pyPgSQL.PgSQL.connect("")
+
+cur = conn.cursor()
+cur.execute("SELECT message FROM omegle_messages")
+messages = cur.fetchall()
+c=0
+for message in messages:
+ c+=1
+ if c%20==0:
+ print "%s%s/%s" % ("\033[2K\033[E",c,len(messages)),
+ mh_python.learn(message[0])
+
+print ""
+cur.close()
+conn.close()
+import sys
+while True:
+ print ">>> ",
+ x=sys.stdin.readline().strip()
+ print "<<< %s " % mh_python.doreply(x)