diff options
author | yvesf <yvesf@d0e8fea9-7529-0410-93fb-d39fd5b9c1dd> | 2009-06-11 20:58:29 +0000 |
---|---|---|
committer | yvesf <yvesf@d0e8fea9-7529-0410-93fb-d39fd5b9c1dd> | 2009-06-11 20:58:29 +0000 |
commit | bcbd91805a9a2ea27772e404d421234e59841e19 (patch) | |
tree | f93153c4aa617f9790492d5e8920c8ae09178a4f /megahal_local.py | |
parent | 4a71dd2884f207cfbecc94f6d3b256380e658d38 (diff) | |
download | omegle-bcbd91805a9a2ea27772e404d421234e59841e19.tar.gz omegle-bcbd91805a9a2ea27772e404d421234e59841e19.zip |
blah
git-svn-id: http://xapek.org/svn/common/omegle@1121 d0e8fea9-7529-0410-93fb-d39fd5b9c1dd
Diffstat (limited to 'megahal_local.py')
-rw-r--r-- | megahal_local.py | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/megahal_local.py b/megahal_local.py deleted file mode 100644 index 024d053..0000000 --- a/megahal_local.py +++ /dev/null @@ -1,34 +0,0 @@ -import mh_python -import pyPgSQL.PgSQL - -mh_python.initbrain() - - -conn = pyPgSQL.PgSQL.connect(database="omegle") - -cur = conn.cursor() -cur.execute(""" -SELECT message FROM omegle_messages -WHERE NOT ( message ILIKE '%www.%' - OR message ILIKE '%http:%' - OR message ILIKE '%@%.%'); -""") -c=0 -while True: - messages = cur.fetchmany(1000) - if len(messages)==0: - break - for message in messages: - c+=1 - if c%50==0: - print "%s%s" % ("\033[2K\033[E",c), - mh_python.learn("%s"%message[0]) - -print "all learned" -cur.close() -conn.close() -import sys -while True: - print ">>> ", - x=sys.stdin.readline().strip() - print "<<< %s " % mh_python.doreply(x) |