Merge branch 'carl'

This commit is contained in:
steffen123 2010-10-10 17:48:54 +02:00
commit 43a5fb0f74
28 changed files with 6006 additions and 306 deletions

View File

@ -570,7 +570,8 @@ class GUICashStats(list):
def get_defaults(self): def get_defaults(self):
"""A list of defaults to be called, should there be no entry in config""" """A list of defaults to be called, should there be no entry in config"""
defaults = [ [u'game', u'Game', True, True, u'%s', u'str', 0.0], # SQL column name, display title, display all, display positional, format, type, alignment
defaults = [ [u'game', u'Game', True, True, u'%s', u'str', 0.0],
[u'hand', u'Hand', False, False, u'%s', u'str', 0.0], [u'hand', u'Hand', False, False, u'%s', u'str', 0.0],
[u'plposition', u'Posn', False, False, u'%s', u'str', 1.0], [u'plposition', u'Posn', False, False, u'%s', u'str', 1.0],
[u'pname', u'Name', False, False, u'%s', u'str', 0.0], [u'pname', u'Name', False, False, u'%s', u'str', 0.0],

View File

@ -5,17 +5,17 @@
Create and manage the database objects. Create and manage the database objects.
""" """
# Copyright 2008-2010, Ray E. Barker # Copyright 2008-2010, Ray E. Barker
# #
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or # the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version. # (at your option) any later version.
# #
# This program is distributed in the hope that it will be useful, # This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of # but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details. # GNU General Public License for more details.
# #
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software # along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@ -105,7 +105,7 @@ class Database:
# Data Structures for index and foreign key creation # Data Structures for index and foreign key creation
# drop_code is an int with possible values: 0 - don't drop for bulk import # drop_code is an int with possible values: 0 - don't drop for bulk import
# 1 - drop during bulk import # 1 - drop during bulk import
# db differences: # db differences:
# - note that mysql automatically creates indexes on constrained columns when # - note that mysql automatically creates indexes on constrained columns when
# foreign keys are created, while postgres does not. Hence the much longer list # foreign keys are created, while postgres does not. Hence the much longer list
# of indexes is required for postgres. # of indexes is required for postgres.
@ -147,7 +147,7 @@ class Database:
] ]
, [ # indexes for sqlite (list index 4) , [ # indexes for sqlite (list index 4)
{'tab':'Hands', 'col':'gametypeId', 'drop':0} {'tab':'Hands', 'col':'gametypeId', 'drop':0}
, {'tab':'HandsPlayers', 'col':'handId', 'drop':0} , {'tab':'HandsPlayers', 'col':'handId', 'drop':0}
, {'tab':'HandsPlayers', 'col':'playerId', 'drop':0} , {'tab':'HandsPlayers', 'col':'playerId', 'drop':0}
, {'tab':'HandsPlayers', 'col':'tourneysPlayersId', 'drop':0} , {'tab':'HandsPlayers', 'col':'tourneysPlayersId', 'drop':0}
, {'tab':'HandsActions', 'col':'handsPlayerId', 'drop':0} , {'tab':'HandsActions', 'col':'handsPlayerId', 'drop':0}
@ -204,7 +204,7 @@ class Database:
# (fkcol is used for foreigh key name) # (fkcol is used for foreigh key name)
# mysql to list indexes: (CG - "LIST INDEXES" should work too) # mysql to list indexes: (CG - "LIST INDEXES" should work too)
# SELECT table_name, index_name, non_unique, column_name # SELECT table_name, index_name, non_unique, column_name
# FROM INFORMATION_SCHEMA.STATISTICS # FROM INFORMATION_SCHEMA.STATISTICS
# WHERE table_name = 'tbl_name' # WHERE table_name = 'tbl_name'
# AND table_schema = 'db_name' # AND table_schema = 'db_name'
@ -241,7 +241,7 @@ class Database:
# create index indexname on tablename (col); # create index indexname on tablename (col);
def __init__(self, c, sql = None, autoconnect = True): def __init__(self, c, sql = None, autoconnect = True):
#log = Configuration.get_logger("logging.conf", "db", log_dir=c.dir_log) #log = Configuration.get_logger("logging.conf", "db", log_dir=c.dir_log)
log.debug(_("Creating Database instance, sql = %s") % sql) log.debug(_("Creating Database instance, sql = %s") % sql)
self.config = c self.config = c
@ -265,11 +265,11 @@ class Database:
if autoconnect: if autoconnect:
# connect to db # connect to db
self.do_connect(c) self.do_connect(c)
if self.backend == self.PGSQL: if self.backend == self.PGSQL:
from psycopg2.extensions import ISOLATION_LEVEL_AUTOCOMMIT, ISOLATION_LEVEL_READ_COMMITTED, ISOLATION_LEVEL_SERIALIZABLE from psycopg2.extensions import ISOLATION_LEVEL_AUTOCOMMIT, ISOLATION_LEVEL_READ_COMMITTED, ISOLATION_LEVEL_SERIALIZABLE
#ISOLATION_LEVEL_AUTOCOMMIT = 0 #ISOLATION_LEVEL_AUTOCOMMIT = 0
#ISOLATION_LEVEL_READ_COMMITTED = 1 #ISOLATION_LEVEL_READ_COMMITTED = 1
#ISOLATION_LEVEL_SERIALIZABLE = 2 #ISOLATION_LEVEL_SERIALIZABLE = 2
@ -304,7 +304,7 @@ class Database:
def dumpDatabase(self): def dumpDatabase(self):
result="fpdb database dump\nDB version=" + str(DB_VERSION)+"\n\n" result="fpdb database dump\nDB version=" + str(DB_VERSION)+"\n\n"
tables=self.cursor.execute(self.sql.query['list_tables']) tables=self.cursor.execute(self.sql.query['list_tables'])
tables=self.cursor.fetchall() tables=self.cursor.fetchall()
for table in (u'Actions', u'Autorates', u'Backings', u'Gametypes', u'Hands', u'HandsActions', u'HandsPlayers', u'HudCache', u'Players', u'RawHands', u'RawTourneys', u'Settings', u'Sites', u'TourneyTypes', u'Tourneys', u'TourneysPlayers'): for table in (u'Actions', u'Autorates', u'Backings', u'Gametypes', u'Hands', u'HandsActions', u'HandsPlayers', u'HudCache', u'Players', u'RawHands', u'RawTourneys', u'Settings', u'Sites', u'TourneyTypes', u'Tourneys', u'TourneysPlayers'):
@ -328,7 +328,7 @@ class Database:
result+="\n" result+="\n"
return result return result
#end def dumpDatabase #end def dumpDatabase
# could be used by hud to change hud style # could be used by hud to change hud style
def set_hud_style(self, style): def set_hud_style(self, style):
self.hud_style = style self.hud_style = style
@ -368,7 +368,7 @@ class Database:
self.database = database self.database = database
self.connection = None self.connection = None
self.cursor = None self.cursor = None
if backend == Database.MYSQL_INNODB: if backend == Database.MYSQL_INNODB:
import MySQLdb import MySQLdb
if use_pool: if use_pool:
@ -544,13 +544,13 @@ class Database:
self.cursor.close() self.cursor.close()
self.connection.close() self.connection.close()
self.__connected = False self.__connected = False
def reconnect(self, due_to_error=False): def reconnect(self, due_to_error=False):
"""Reconnects the DB""" """Reconnects the DB"""
#print "started reconnect" #print "started reconnect"
self.disconnect(due_to_error) self.disconnect(due_to_error)
self.connect(self.backend, self.host, self.database, self.user, self.password) self.connect(self.backend, self.host, self.database, self.user, self.password)
def get_backend_name(self): def get_backend_name(self):
"""Returns the name of the currently used backend""" """Returns the name of the currently used backend"""
if self.backend==2: if self.backend==2:
@ -570,7 +570,7 @@ class Database:
c.execute(self.sql.query['get_table_name'], (hand_id, )) c.execute(self.sql.query['get_table_name'], (hand_id, ))
row = c.fetchone() row = c.fetchone()
return row return row
def get_table_info(self, hand_id): def get_table_info(self, hand_id):
c = self.connection.cursor() c = self.connection.cursor()
c.execute(self.sql.query['get_table_name'], (hand_id, )) c.execute(self.sql.query['get_table_name'], (hand_id, ))
@ -591,18 +591,18 @@ class Database:
c.execute(self.sql.query['get_last_hand']) c.execute(self.sql.query['get_last_hand'])
row = c.fetchone() row = c.fetchone()
return row[0] return row[0]
def get_xml(self, hand_id): def get_xml(self, hand_id):
c = self.connection.cursor() c = self.connection.cursor()
c.execute(self.sql.query['get_xml'], (hand_id)) c.execute(self.sql.query['get_xml'], (hand_id))
row = c.fetchone() row = c.fetchone()
return row[0] return row[0]
def get_recent_hands(self, last_hand): def get_recent_hands(self, last_hand):
c = self.connection.cursor() c = self.connection.cursor()
c.execute(self.sql.query['get_recent_hands'], {'last_hand': last_hand}) c.execute(self.sql.query['get_recent_hands'], {'last_hand': last_hand})
return c.fetchall() return c.fetchall()
def get_hand_info(self, new_hand_id): def get_hand_info(self, new_hand_id):
c = self.connection.cursor() c = self.connection.cursor()
c.execute(self.sql.query['get_hand_info'], new_hand_id) c.execute(self.sql.query['get_hand_info'], new_hand_id)
@ -835,7 +835,7 @@ class Database:
query = query.replace("<signed>", 'signed ') query = query.replace("<signed>", 'signed ')
else: else:
query = query.replace("<signed>", '') query = query.replace("<signed>", '')
subs = (self.hand_1day_ago, hand, hero_id, seats_min, seats_max subs = (self.hand_1day_ago, hand, hero_id, seats_min, seats_max
, hero_id, h_seats_min, h_seats_max) , hero_id, h_seats_min, h_seats_max)
c = self.get_cursor() c = self.get_cursor()
@ -864,7 +864,7 @@ class Database:
#print "DEBUG: stat_dict[%s][%s]: %s" %(playerid, name.lower(), val) #print "DEBUG: stat_dict[%s][%s]: %s" %(playerid, name.lower(), val)
stat_dict[playerid][name.lower()] += val stat_dict[playerid][name.lower()] += val
n += 1 n += 1
if n >= 10000: break # todo: don't think this is needed so set nice and high if n >= 10000: break # todo: don't think this is needed so set nice and high
# prevents infinite loop so leave for now - comment out or remove? # prevents infinite loop so leave for now - comment out or remove?
row = c.fetchone() row = c.fetchone()
else: else:
@ -874,7 +874,7 @@ class Database:
#print "session stat_dict =", stat_dict #print "session stat_dict =", stat_dict
#return stat_dict #return stat_dict
def get_player_id(self, config, siteName, playerName): def get_player_id(self, config, siteName, playerName):
c = self.connection.cursor() c = self.connection.cursor()
siteNameUtf = Charset.to_utf8(siteName) siteNameUtf = Charset.to_utf8(siteName)
@ -886,7 +886,7 @@ class Database:
return row[0] return row[0]
else: else:
return None return None
def get_player_names(self, config, site_id=None, like_player_name="%"): def get_player_names(self, config, site_id=None, like_player_name="%"):
"""Fetch player names from players. Use site_id and like_player_name if provided""" """Fetch player names from players. Use site_id and like_player_name if provided"""
@ -897,7 +897,7 @@ class Database:
c.execute(self.sql.query['get_player_names'], (p_name, site_id, site_id)) c.execute(self.sql.query['get_player_names'], (p_name, site_id, site_id))
rows = c.fetchall() rows = c.fetchall()
return rows return rows
def get_site_id(self, site): def get_site_id(self, site):
c = self.get_cursor() c = self.get_cursor()
c.execute(self.sql.query['getSiteId'], (site,)) c.execute(self.sql.query['getSiteId'], (site,))
@ -941,7 +941,7 @@ class Database:
def prepareBulkImport(self): def prepareBulkImport(self):
"""Drop some indexes/foreign keys to prepare for bulk import. """Drop some indexes/foreign keys to prepare for bulk import.
Currently keeping the standalone indexes as needed to import quickly""" Currently keeping the standalone indexes as needed to import quickly"""
stime = time() stime = time()
c = self.get_cursor() c = self.get_cursor()
@ -959,7 +959,7 @@ class Database:
"FROM information_schema.KEY_COLUMN_USAGE " + "FROM information_schema.KEY_COLUMN_USAGE " +
#"WHERE REFERENCED_TABLE_SCHEMA = 'fpdb' #"WHERE REFERENCED_TABLE_SCHEMA = 'fpdb'
"WHERE 1=1 " + "WHERE 1=1 " +
"AND table_name = %s AND column_name = %s " + "AND table_name = %s AND column_name = %s " +
"AND referenced_table_name = %s " + "AND referenced_table_name = %s " +
"AND referenced_column_name = %s ", "AND referenced_column_name = %s ",
(fk['fktab'], fk['fkcol'], fk['rtab'], fk['rcol']) ) (fk['fktab'], fk['fkcol'], fk['rtab'], fk['rcol']) )
@ -976,7 +976,7 @@ class Database:
print "dropping pg fk", fk['fktab'], fk['fkcol'] print "dropping pg fk", fk['fktab'], fk['fkcol']
try: try:
# try to lock table to see if index drop will work: # try to lock table to see if index drop will work:
# hmmm, tested by commenting out rollback in grapher. lock seems to work but # hmmm, tested by commenting out rollback in grapher. lock seems to work but
# then drop still hangs :-( does work in some tests though?? # then drop still hangs :-( does work in some tests though??
# will leave code here for now pending further tests/enhancement ... # will leave code here for now pending further tests/enhancement ...
c.execute("BEGIN TRANSACTION") c.execute("BEGIN TRANSACTION")
@ -996,13 +996,13 @@ class Database:
% (fk['fktab'],fk['fkcol'], str(sys.exc_value).rstrip('\n')) % (fk['fktab'],fk['fkcol'], str(sys.exc_value).rstrip('\n'))
else: else:
return -1 return -1
for idx in self.indexes[self.backend]: for idx in self.indexes[self.backend]:
if idx['drop'] == 1: if idx['drop'] == 1:
if self.backend == self.MYSQL_INNODB: if self.backend == self.MYSQL_INNODB:
print _("dropping mysql index "), idx['tab'], idx['col'] print _("dropping mysql index "), idx['tab'], idx['col']
try: try:
# apparently nowait is not implemented in mysql so this just hangs if there are locks # apparently nowait is not implemented in mysql so this just hangs if there are locks
# preventing the index drop :-( # preventing the index drop :-(
c.execute( "alter table %s drop index %s;", (idx['tab'],idx['col']) ) c.execute( "alter table %s drop index %s;", (idx['tab'],idx['col']) )
except: except:
@ -1019,13 +1019,13 @@ class Database:
#print "after lock, status:", c.statusmessage #print "after lock, status:", c.statusmessage
try: try:
# table locked ok so index drop should work: # table locked ok so index drop should work:
#print "drop index %s_%s_idx" % (idx['tab'],idx['col']) #print "drop index %s_%s_idx" % (idx['tab'],idx['col'])
c.execute( "drop index if exists %s_%s_idx" % (idx['tab'],idx['col']) ) c.execute( "drop index if exists %s_%s_idx" % (idx['tab'],idx['col']) )
#print "dropped pg index ", idx['tab'], idx['col'] #print "dropped pg index ", idx['tab'], idx['col']
except: except:
if "does not exist" not in str(sys.exc_value): if "does not exist" not in str(sys.exc_value):
print _("warning: drop index %s_%s_idx failed: %s, continuing ...") \ print _("warning: drop index %s_%s_idx failed: %s, continuing ...") \
% (idx['tab'],idx['col'], str(sys.exc_value).rstrip('\n')) % (idx['tab'],idx['col'], str(sys.exc_value).rstrip('\n'))
c.execute("END TRANSACTION") c.execute("END TRANSACTION")
except: except:
print _("warning: index %s_%s_idx not dropped %s, continuing ...") \ print _("warning: index %s_%s_idx not dropped %s, continuing ...") \
@ -1043,7 +1043,7 @@ class Database:
def afterBulkImport(self): def afterBulkImport(self):
"""Re-create any dropped indexes/foreign keys after bulk import""" """Re-create any dropped indexes/foreign keys after bulk import"""
stime = time() stime = time()
c = self.get_cursor() c = self.get_cursor()
if self.backend == self.MYSQL_INNODB: if self.backend == self.MYSQL_INNODB:
c.execute("SET foreign_key_checks=1") c.execute("SET foreign_key_checks=1")
@ -1059,7 +1059,7 @@ class Database:
"FROM information_schema.KEY_COLUMN_USAGE " + "FROM information_schema.KEY_COLUMN_USAGE " +
#"WHERE REFERENCED_TABLE_SCHEMA = 'fpdb' #"WHERE REFERENCED_TABLE_SCHEMA = 'fpdb'
"WHERE 1=1 " + "WHERE 1=1 " +
"AND table_name = %s AND column_name = %s " + "AND table_name = %s AND column_name = %s " +
"AND referenced_table_name = %s " + "AND referenced_table_name = %s " +
"AND referenced_column_name = %s ", "AND referenced_column_name = %s ",
(fk['fktab'], fk['fkcol'], fk['rtab'], fk['rcol']) ) (fk['fktab'], fk['fkcol'], fk['rtab'], fk['rcol']) )
@ -1070,8 +1070,8 @@ class Database:
else: else:
print _("Creating foreign key "), fk['fktab'], fk['fkcol'], "->", fk['rtab'], fk['rcol'] print _("Creating foreign key "), fk['fktab'], fk['fkcol'], "->", fk['rtab'], fk['rcol']
try: try:
c.execute("alter table " + fk['fktab'] + " add foreign key (" c.execute("alter table " + fk['fktab'] + " add foreign key ("
+ fk['fkcol'] + ") references " + fk['rtab'] + "(" + fk['fkcol'] + ") references " + fk['rtab'] + "("
+ fk['rcol'] + ")") + fk['rcol'] + ")")
except: except:
print _("Create foreign key failed: ") + str(sys.exc_info()) print _("Create foreign key failed: ") + str(sys.exc_info())
@ -1086,7 +1086,7 @@ class Database:
print _("Create foreign key failed: ") + str(sys.exc_info()) print _("Create foreign key failed: ") + str(sys.exc_info())
else: else:
return -1 return -1
for idx in self.indexes[self.backend]: for idx in self.indexes[self.backend]:
if idx['drop'] == 1: if idx['drop'] == 1:
if self.backend == self.MYSQL_INNODB: if self.backend == self.MYSQL_INNODB:
@ -1135,10 +1135,10 @@ class Database:
c.execute("ALTER TABLE " + inner[j][0] + " DROP FOREIGN KEY " + key) c.execute("ALTER TABLE " + inner[j][0] + " DROP FOREIGN KEY " + key)
self.commit() self.commit()
#end drop_referential_inegrity #end drop_referential_inegrity
def recreate_tables(self): def recreate_tables(self):
"""(Re-)creates the tables of the current DB""" """(Re-)creates the tables of the current DB"""
self.drop_tables() self.drop_tables()
self.resetPlayerIDs() self.resetPlayerIDs()
self.create_tables() self.create_tables()
@ -1189,7 +1189,7 @@ class Database:
self.rollback() self.rollback()
raise raise
#end def disconnect #end def disconnect
def drop_tables(self): def drop_tables(self):
"""Drops the fpdb tables from the current db""" """Drops the fpdb tables from the current db"""
try: try:
@ -1333,7 +1333,7 @@ class Database:
"FROM information_schema.KEY_COLUMN_USAGE " + "FROM information_schema.KEY_COLUMN_USAGE " +
#"WHERE REFERENCED_TABLE_SCHEMA = 'fpdb' #"WHERE REFERENCED_TABLE_SCHEMA = 'fpdb'
"WHERE 1=1 " + "WHERE 1=1 " +
"AND table_name = %s AND column_name = %s " + "AND table_name = %s AND column_name = %s " +
"AND referenced_table_name = %s " + "AND referenced_table_name = %s " +
"AND referenced_column_name = %s ", "AND referenced_column_name = %s ",
(fk['fktab'], fk['fkcol'], fk['rtab'], fk['rcol']) ) (fk['fktab'], fk['fkcol'], fk['rtab'], fk['rcol']) )
@ -1344,8 +1344,8 @@ class Database:
else: else:
print _("creating foreign key "), fk['fktab'], fk['fkcol'], "->", fk['rtab'], fk['rcol'] print _("creating foreign key "), fk['fktab'], fk['fkcol'], "->", fk['rtab'], fk['rcol']
try: try:
c.execute("alter table " + fk['fktab'] + " add foreign key (" c.execute("alter table " + fk['fktab'] + " add foreign key ("
+ fk['fkcol'] + ") references " + fk['rtab'] + "(" + fk['fkcol'] + ") references " + fk['rtab'] + "("
+ fk['rcol'] + ")") + fk['rcol'] + ")")
except: except:
print _(" create foreign key failed: ") + str(sys.exc_info()) print _(" create foreign key failed: ") + str(sys.exc_info())
@ -1382,7 +1382,7 @@ class Database:
"FROM information_schema.KEY_COLUMN_USAGE " + "FROM information_schema.KEY_COLUMN_USAGE " +
#"WHERE REFERENCED_TABLE_SCHEMA = 'fpdb' #"WHERE REFERENCED_TABLE_SCHEMA = 'fpdb'
"WHERE 1=1 " + "WHERE 1=1 " +
"AND table_name = %s AND column_name = %s " + "AND table_name = %s AND column_name = %s " +
"AND referenced_table_name = %s " + "AND referenced_table_name = %s " +
"AND referenced_column_name = %s ", "AND referenced_column_name = %s ",
(fk['fktab'], fk['fkcol'], fk['rtab'], fk['rcol']) ) (fk['fktab'], fk['fkcol'], fk['rtab'], fk['rcol']) )
@ -1399,7 +1399,7 @@ class Database:
print _("dropping pg foreign key"), fk['fktab'], fk['fkcol'] print _("dropping pg foreign key"), fk['fktab'], fk['fkcol']
try: try:
# try to lock table to see if index drop will work: # try to lock table to see if index drop will work:
# hmmm, tested by commenting out rollback in grapher. lock seems to work but # hmmm, tested by commenting out rollback in grapher. lock seems to work but
# then drop still hangs :-( does work in some tests though?? # then drop still hangs :-( does work in some tests though??
# will leave code here for now pending further tests/enhancement ... # will leave code here for now pending further tests/enhancement ...
c.execute("BEGIN TRANSACTION") c.execute("BEGIN TRANSACTION")
@ -1419,14 +1419,14 @@ class Database:
% (fk['fktab'],fk['fkcol'], str(sys.exc_value).rstrip('\n')) % (fk['fktab'],fk['fkcol'], str(sys.exc_value).rstrip('\n'))
else: else:
print _("Only MySQL and Postgres supported so far") print _("Only MySQL and Postgres supported so far")
if self.backend == self.PGSQL: if self.backend == self.PGSQL:
self.connection.set_isolation_level(1) # go back to normal isolation level self.connection.set_isolation_level(1) # go back to normal isolation level
#end def dropAllForeignKeys #end def dropAllForeignKeys
def fillDefaultData(self): def fillDefaultData(self):
c = self.get_cursor() c = self.get_cursor()
c.execute("INSERT INTO Settings (version) VALUES (%s);" % (DB_VERSION)) c.execute("INSERT INTO Settings (version) VALUES (%s);" % (DB_VERSION))
#Fill Sites #Fill Sites
c.execute("INSERT INTO Sites (name,code) VALUES ('Full Tilt Poker', 'FT')") c.execute("INSERT INTO Sites (name,code) VALUES ('Full Tilt Poker', 'FT')")
@ -1458,7 +1458,7 @@ class Database:
c.execute("INSERT INTO Actions (name,code) VALUES ('discards', 'D')") c.execute("INSERT INTO Actions (name,code) VALUES ('discards', 'D')")
c.execute("INSERT INTO Actions (name,code) VALUES ('bringin', 'I')") c.execute("INSERT INTO Actions (name,code) VALUES ('bringin', 'I')")
c.execute("INSERT INTO Actions (name,code) VALUES ('completes', 'P')") c.execute("INSERT INTO Actions (name,code) VALUES ('completes', 'P')")
#end def fillDefaultData #end def fillDefaultData
def rebuild_indexes(self, start=None): def rebuild_indexes(self, start=None):
@ -1487,12 +1487,12 @@ class Database:
p_id = self.get_player_id(self.config, site, self.hero[site_id]) p_id = self.get_player_id(self.config, site, self.hero[site_id])
if p_id: if p_id:
self.hero_ids[site_id] = int(p_id) self.hero_ids[site_id] = int(p_id)
if h_start is None: if h_start is None:
h_start = self.hero_hudstart_def h_start = self.hero_hudstart_def
if v_start is None: if v_start is None:
v_start = self.villain_hudstart_def v_start = self.villain_hudstart_def
if self.hero_ids == {}: if self.hero_ids == {}:
where = "WHERE hp.tourneysPlayersId IS NULL" where = "WHERE hp.tourneysPlayersId IS NULL"
else: else:
@ -1509,7 +1509,7 @@ class Database:
#print "rebuild_sql_cash:",rebuild_sql_cash #print "rebuild_sql_cash:",rebuild_sql_cash
self.get_cursor().execute(self.sql.query['clearHudCache']) self.get_cursor().execute(self.sql.query['clearHudCache'])
self.get_cursor().execute(rebuild_sql_cash) self.get_cursor().execute(rebuild_sql_cash)
if self.hero_ids == {}: if self.hero_ids == {}:
where = "WHERE hp.tourneysPlayersId >= 0" where = "WHERE hp.tourneysPlayersId >= 0"
else: else:
@ -1525,7 +1525,7 @@ class Database:
rebuild_sql_tourney = rebuild_sql_tourney.replace('<tourney_group_clause>', ",t.tourneyTypeId") rebuild_sql_tourney = rebuild_sql_tourney.replace('<tourney_group_clause>', ",t.tourneyTypeId")
rebuild_sql_tourney = rebuild_sql_tourney.replace('<where_clause>', where) rebuild_sql_tourney = rebuild_sql_tourney.replace('<where_clause>', where)
#print "rebuild_sql_tourney:",rebuild_sql_tourney #print "rebuild_sql_tourney:",rebuild_sql_tourney
self.get_cursor().execute(rebuild_sql_tourney) self.get_cursor().execute(rebuild_sql_tourney)
self.commit() self.commit()
print _("Rebuild hudcache took %.1f seconds") % (time() - stime,) print _("Rebuild hudcache took %.1f seconds") % (time() - stime,)
@ -1553,7 +1553,7 @@ class Database:
p_id = self.get_player_id(self.config, site, self.hero[site_id]) p_id = self.get_player_id(self.config, site, self.hero[site_id])
if p_id: if p_id:
self.hero_ids[site_id] = int(p_id) self.hero_ids[site_id] = int(p_id)
q = self.sql.query['get_hero_hudcache_start'].replace("<playerid_list>", str(tuple(self.hero_ids.values()))) q = self.sql.query['get_hero_hudcache_start'].replace("<playerid_list>", str(tuple(self.hero_ids.values())))
c = self.get_cursor() c = self.get_cursor()
c.execute(q) c.execute(q)
@ -1634,20 +1634,20 @@ class Database:
c = self.get_cursor() c = self.get_cursor()
c.execute(q, ( c.execute(q, (
p['tableName'], p['tableName'],
p['gameTypeId'], p['gameTypeId'],
p['siteHandNo'], p['siteHandNo'],
p['tourneyId'], p['tourneyId'],
p['startTime'], p['startTime'],
datetime.utcnow(), #importtime datetime.utcnow(), #importtime
p['seats'], p['seats'],
p['maxSeats'], p['maxSeats'],
p['texture'], p['texture'],
p['playersVpi'], p['playersVpi'],
p['boardcard1'], p['boardcard1'],
p['boardcard2'], p['boardcard2'],
p['boardcard3'], p['boardcard3'],
p['boardcard4'], p['boardcard4'],
p['boardcard5'], p['boardcard5'],
p['playersAtStreet1'], p['playersAtStreet1'],
p['playersAtStreet2'], p['playersAtStreet2'],
@ -1781,14 +1781,14 @@ class Database:
#print "DEBUG: inserts: %s" %inserts #print "DEBUG: inserts: %s" %inserts
#print "DEBUG: q: %s" % q #print "DEBUG: q: %s" % q
c = self.get_cursor() c = self.get_cursor()
if self.import_options['saveActions']: if self.import_options['saveActions']:
for r in inserts: for r in inserts:
c.execute(q, r) c.execute(q, r)
hpid[(r[0], r[1])] = self.get_last_insert_id(c) hpid[(r[0], r[1])] = self.get_last_insert_id(c)
else: else:
c.executemany(q, inserts) c.executemany(q, inserts)
return hpid return hpid
def storeHandsActions(self, hid, pids, hpid, adata, printdata = False): def storeHandsActions(self, hid, pids, hpid, adata, printdata = False):
@ -1834,12 +1834,12 @@ class Database:
update_hudcache = update_hudcache.replace('%s', self.sql.query['placeholder']) update_hudcache = update_hudcache.replace('%s', self.sql.query['placeholder'])
insert_hudcache = self.sql.query['insert_hudcache'] insert_hudcache = self.sql.query['insert_hudcache']
insert_hudcache = insert_hudcache.replace('%s', self.sql.query['placeholder']) insert_hudcache = insert_hudcache.replace('%s', self.sql.query['placeholder'])
#print "DEBUG: %s %s %s" %(hid, pids, pdata) #print "DEBUG: %s %s %s" %(hid, pids, pdata)
inserts = [] inserts = []
for p in pdata: for p in pdata:
line = [0]*85 line = [0]*85
line[0] = 1 # HDs line[0] = 1 # HDs
if pdata[p]['street0VPI']: line[1] = 1 if pdata[p]['street0VPI']: line[1] = 1
if pdata[p]['street0Aggr']: line[2] = 1 if pdata[p]['street0Aggr']: line[2] = 1
@ -1939,7 +1939,7 @@ class Database:
# Test statusmessage to see if update worked, do insert if not # Test statusmessage to see if update worked, do insert if not
# num is a cursor in sqlite # num is a cursor in sqlite
if ((self.backend == self.PGSQL and cursor.statusmessage != "UPDATE 1") if ((self.backend == self.PGSQL and cursor.statusmessage != "UPDATE 1")
or (self.backend == self.MYSQL_INNODB and num == 0) or (self.backend == self.MYSQL_INNODB and num == 0)
or (self.backend == self.SQLITE and num.rowcount == 0)): or (self.backend == self.SQLITE and num.rowcount == 0)):
#move the last 6 items in WHERE clause of row from the end of the array #move the last 6 items in WHERE clause of row from the end of the array
# to the beginning for the INSERT statement # to the beginning for the INSERT statement
@ -1963,7 +1963,7 @@ class Database:
def getGameTypeId(self, siteid, game): def getGameTypeId(self, siteid, game):
c = self.get_cursor() c = self.get_cursor()
#FIXME: Fixed for NL at the moment #FIXME: Fixed for NL at the moment
c.execute(self.sql.query['getGametypeNL'], (siteid, game['type'], game['category'], game['limitType'], game['currency'], c.execute(self.sql.query['getGametypeNL'], (siteid, game['type'], game['category'], game['limitType'], game['currency'],
int(Decimal(game['sb'])*100), int(Decimal(game['bb'])*100))) int(Decimal(game['sb'])*100), int(Decimal(game['bb'])*100)))
tmp = c.fetchone() tmp = c.fetchone()
if (tmp == None): if (tmp == None):
@ -1985,7 +1985,7 @@ class Database:
result = {} result = {}
if(self.pcache == None): if(self.pcache == None):
self.pcache = LambdaDict(lambda key:self.insertPlayer(key[0], key[1])) self.pcache = LambdaDict(lambda key:self.insertPlayer(key[0], key[1]))
for player in pnames: for player in pnames:
result[player] = self.pcache[(player,siteid)] result[player] = self.pcache[(player,siteid)]
# NOTE: Using the LambdaDict does the same thing as: # NOTE: Using the LambdaDict does the same thing as:
@ -2069,7 +2069,7 @@ class Database:
sendFinal = True sendFinal = True
else: else:
self.store_the_hand(h) self.store_the_hand(h)
# optional commit, could be every hand / every N hands / every time a # optional commit, could be every hand / every N hands / every time a
# commit message received?? mark flag to indicate if commits outstanding # commit message received?? mark flag to indicate if commits outstanding
if commitEachHand: if commitEachHand:
self.commit() self.commit()
@ -2115,7 +2115,7 @@ class Database:
def createTourneyType(self, hand):#note: this method is used on Hand and TourneySummary objects def createTourneyType(self, hand):#note: this method is used on Hand and TourneySummary objects
tourneyTypeId = 1 tourneyTypeId = 1
# Check if Tourney exists, and if so retrieve TTypeId : in that case, check values of the ttype # Check if Tourney exists, and if so retrieve TTypeId : in that case, check values of the ttype
cursor = self.get_cursor() cursor = self.get_cursor()
cursor.execute (self.sql.query['getTourneyTypeIdByTourneyNo'].replace('%s', self.sql.query['placeholder']), cursor.execute (self.sql.query['getTourneyTypeIdByTourneyNo'].replace('%s', self.sql.query['placeholder']),
@ -2130,14 +2130,14 @@ class Database:
# Check for an existing TTypeId that matches tourney info, if not found create it # Check for an existing TTypeId that matches tourney info, if not found create it
#print "info that we use to get TT by detail:", hand.siteId, hand.buyinCurrency, hand.buyin, hand.fee, hand.gametype['category'], hand.gametype['limitType'], hand.isKO, hand.isRebuy, hand.isAddOn, hand.speed, hand.isShootout, hand.isMatrix #print "info that we use to get TT by detail:", hand.siteId, hand.buyinCurrency, hand.buyin, hand.fee, hand.gametype['category'], hand.gametype['limitType'], hand.isKO, hand.isRebuy, hand.isAddOn, hand.speed, hand.isShootout, hand.isMatrix
#print "the query:",self.sql.query['getTourneyTypeId'].replace('%s', self.sql.query['placeholder']) #print "the query:",self.sql.query['getTourneyTypeId'].replace('%s', self.sql.query['placeholder'])
cursor.execute (self.sql.query['getTourneyTypeId'].replace('%s', self.sql.query['placeholder']), cursor.execute (self.sql.query['getTourneyTypeId'].replace('%s', self.sql.query['placeholder']),
(hand.siteId, hand.buyinCurrency, hand.buyin, hand.fee, hand.gametype['category'], (hand.siteId, hand.buyinCurrency, hand.buyin, hand.fee, hand.gametype['category'],
hand.gametype['limitType'], hand.maxseats, hand.isKO, hand.gametype['limitType'], hand.maxseats, hand.isKO,
hand.isRebuy, hand.isAddOn, hand.speed, hand.isShootout, hand.isMatrix) hand.isRebuy, hand.isAddOn, hand.speed, hand.isShootout, hand.isMatrix)
) )
result=cursor.fetchone() result=cursor.fetchone()
#print "result of fetching TT by details:",result #print "result of fetching TT by details:",result
try: try:
tourneyTypeId = result[0] tourneyTypeId = result[0]
except TypeError: #this means we need to create a new entry except TypeError: #this means we need to create a new entry
@ -2150,14 +2150,14 @@ class Database:
tourneyTypeId = self.get_last_insert_id(cursor) tourneyTypeId = self.get_last_insert_id(cursor)
return tourneyTypeId return tourneyTypeId
#end def createTourneyType #end def createTourneyType
def createOrUpdateTourney(self, hand, source):#note: this method is used on Hand and TourneySummary objects def createOrUpdateTourney(self, hand, source):#note: this method is used on Hand and TourneySummary objects
cursor = self.get_cursor() cursor = self.get_cursor()
cursor.execute (self.sql.query['getTourneyByTourneyNo'].replace('%s', self.sql.query['placeholder']), cursor.execute (self.sql.query['getTourneyByTourneyNo'].replace('%s', self.sql.query['placeholder']),
(hand.siteId, hand.tourNo)) (hand.siteId, hand.tourNo))
columnNames=[desc[0] for desc in cursor.description] columnNames=[desc[0] for desc in cursor.description]
result=cursor.fetchone() result=cursor.fetchone()
if result != None: if result != None:
if self.backend == Database.PGSQL: if self.backend == Database.PGSQL:
expectedValues = ('comment', 'tourneyname', 'matrixIdProcessed', 'totalRebuyCount', 'totalAddOnCount', expectedValues = ('comment', 'tourneyname', 'matrixIdProcessed', 'totalRebuyCount', 'totalAddOnCount',
@ -2167,7 +2167,7 @@ class Database:
'prizepool', 'startTime', 'entries', 'commentTs', 'endTime') 'prizepool', 'startTime', 'entries', 'commentTs', 'endTime')
updateDb=False updateDb=False
resultDict = dict(zip(columnNames, result)) resultDict = dict(zip(columnNames, result))
tourneyId = resultDict["id"] tourneyId = resultDict["id"]
if source=="TS": if source=="TS":
for ev in expectedValues : for ev in expectedValues :
@ -2196,7 +2196,7 @@ class Database:
tourneyId = self.get_last_insert_id(cursor) tourneyId = self.get_last_insert_id(cursor)
return tourneyId return tourneyId
#end def createOrUpdateTourney #end def createOrUpdateTourney
def createOrUpdateTourneysPlayers(self, hand, source):#note: this method is used on Hand and TourneySummary objects def createOrUpdateTourneysPlayers(self, hand, source):#note: this method is used on Hand and TourneySummary objects
tourneysPlayersIds={} tourneysPlayersIds={}
for player in hand.players: for player in hand.players:
@ -2206,7 +2206,7 @@ class Database:
playerId = hand.dbid_pids[player[1]] playerId = hand.dbid_pids[player[1]]
else: else:
raise FpdbParseError(_("invalid source in Database.createOrUpdateTourneysPlayers")) raise FpdbParseError(_("invalid source in Database.createOrUpdateTourneysPlayers"))
cursor = self.get_cursor() cursor = self.get_cursor()
cursor.execute (self.sql.query['getTourneysPlayersByIds'].replace('%s', self.sql.query['placeholder']), cursor.execute (self.sql.query['getTourneysPlayersByIds'].replace('%s', self.sql.query['placeholder']),
(hand.tourneyId, playerId)) (hand.tourneyId, playerId))
@ -2217,14 +2217,14 @@ class Database:
expectedValues = ('rank', 'winnings', 'winningsCurrency', 'rebuyCount', 'addOnCount', 'koCount') expectedValues = ('rank', 'winnings', 'winningsCurrency', 'rebuyCount', 'addOnCount', 'koCount')
updateDb=False updateDb=False
resultDict = dict(zip(columnNames, result)) resultDict = dict(zip(columnNames, result))
tourneysPlayersIds[player[1]]=result[0] tourneysPlayersIds[player[1]]=result[0]
if source=="TS": if source=="TS":
for ev in expectedValues : for ev in expectedValues :
handAttribute=ev handAttribute=ev
if ev!="winnings" and ev!="winningsCurrency": if ev!="winnings" and ev!="winningsCurrency":
handAttribute+="s" handAttribute+="s"
if getattr(hand, handAttribute)[player]==None and resultDict[ev]!=None:#DB has this value but object doesnt, so update object if getattr(hand, handAttribute)[player]==None and resultDict[ev]!=None:#DB has this value but object doesnt, so update object
setattr(hand, handAttribute, resultDict[ev][player]) setattr(hand, handAttribute, resultDict[ev][player])
elif getattr(hand, handAttribute)[player]!=None and resultDict[ev]==None:#object has this value but DB doesnt, so update DB elif getattr(hand, handAttribute)[player]!=None and resultDict[ev]==None:#object has this value but DB doesnt, so update DB
@ -2250,7 +2250,7 @@ class Database:
tourneysPlayersIds[player[1]]=self.get_last_insert_id(cursor) tourneysPlayersIds[player[1]]=self.get_last_insert_id(cursor)
return tourneysPlayersIds return tourneysPlayersIds
#end def createOrUpdateTourneysPlayers #end def createOrUpdateTourneysPlayers
def getTourneyTypesIds(self): def getTourneyTypesIds(self):
c = self.connection.cursor() c = self.connection.cursor()
c.execute(self.sql.query['getTourneyTypesIds']) c.execute(self.sql.query['getTourneyTypesIds'])
@ -2262,31 +2262,31 @@ class Database:
c = self.get_cursor() c = self.get_cursor()
c.execute(self.sql.query['getTourneyInfo'], (siteName, tourneyNo)) c.execute(self.sql.query['getTourneyInfo'], (siteName, tourneyNo))
columnNames=c.description columnNames=c.description
names=[] names=[]
for column in columnNames: for column in columnNames:
names.append(column[0]) names.append(column[0])
data=c.fetchone() data=c.fetchone()
return (names,data) return (names,data)
#end def getTourneyInfo #end def getTourneyInfo
def getTourneyPlayerInfo(self, siteName, tourneyNo, playerName): def getTourneyPlayerInfo(self, siteName, tourneyNo, playerName):
c = self.get_cursor() c = self.get_cursor()
c.execute(self.sql.query['getTourneyPlayerInfo'], (siteName, tourneyNo, playerName)) c.execute(self.sql.query['getTourneyPlayerInfo'], (siteName, tourneyNo, playerName))
columnNames=c.description columnNames=c.description
names=[] names=[]
for column in columnNames: for column in columnNames:
names.append(column[0]) names.append(column[0])
data=c.fetchone() data=c.fetchone()
return (names,data) return (names,data)
#end def getTourneyPlayerInfo #end def getTourneyPlayerInfo
#end class Database #end class Database
# Class used to hold all the data needed to write a hand to the db # Class used to hold all the data needed to write a hand to the db
# mainParser() in fpdb_parse_logic.py creates one of these and then passes it to # mainParser() in fpdb_parse_logic.py creates one of these and then passes it to
# self.insert_queue_hands() # self.insert_queue_hands()
class HandToWrite: class HandToWrite:
@ -2334,7 +2334,7 @@ class HandToWrite:
print _("HandToWrite.init error: ") + str(sys.exc_info()) print _("HandToWrite.init error: ") + str(sys.exc_info())
raise raise
# end def __init__ # end def __init__
def set_all( self, config, settings, base, category, siteTourneyNo, buyin def set_all( self, config, settings, base, category, siteTourneyNo, buyin
, fee, knockout, entries, prizepool, tourneyStartTime , fee, knockout, entries, prizepool, tourneyStartTime
, isTourney, tourneyTypeId, siteID, siteHandNo , isTourney, tourneyTypeId, siteID, siteHandNo
@ -2342,7 +2342,7 @@ class HandToWrite:
, positions, antes, cardValues, cardSuits, boardValues, boardSuits , positions, antes, cardValues, cardSuits, boardValues, boardSuits
, winnings, rakes, actionTypes, allIns, actionAmounts , winnings, rakes, actionTypes, allIns, actionAmounts
, actionNos, hudImportData, maxSeats, tableName, seatNos): , actionNos, hudImportData, maxSeats, tableName, seatNos):
try: try:
self.config = config self.config = config
self.settings = settings self.settings = settings
@ -2388,7 +2388,7 @@ class HandToWrite:
def get_finished(self): def get_finished(self):
return( self.finished ) return( self.finished )
# end def get_finished # end def get_finished
def get_siteHandNo(self): def get_siteHandNo(self):
return( self.siteHandNo ) return( self.siteHandNo )
# end def get_siteHandNo # end def get_siteHandNo
@ -2406,14 +2406,14 @@ if __name__=="__main__":
# db_connection.recreate_tables() # db_connection.recreate_tables()
db_connection.dropAllIndexes() db_connection.dropAllIndexes()
db_connection.createAllIndexes() db_connection.createAllIndexes()
h = db_connection.get_last_hand() h = db_connection.get_last_hand()
print "last hand = ", h print "last hand = ", h
hero = db_connection.get_player_id(c, 'PokerStars', 'nutOmatic') hero = db_connection.get_player_id(c, 'PokerStars', 'nutOmatic')
if hero: if hero:
print _("nutOmatic is id_player = %d") % hero print _("nutOmatic is id_player = %d") % hero
# example of displaying query plan in sqlite: # example of displaying query plan in sqlite:
if db_connection.backend == 4: if db_connection.backend == 4:
print print
@ -2422,16 +2422,16 @@ if __name__=="__main__":
for row in c.fetchall(): for row in c.fetchall():
print _("query plan: "), row print _("query plan: "), row
print print
t0 = time() t0 = time()
stat_dict = db_connection.get_stats_from_hand(h, "ring") stat_dict = db_connection.get_stats_from_hand(h, "ring")
t1 = time() t1 = time()
for p in stat_dict.keys(): for p in stat_dict.keys():
print p, " ", stat_dict[p] print p, " ", stat_dict[p]
print _("cards ="), db_connection.get_cards(u'1') print _("cards ="), db_connection.get_cards(u'1')
db_connection.close_connection db_connection.close_connection
print _("get_stats took: %4.3f seconds") % (t1-t0) print _("get_stats took: %4.3f seconds") % (t1-t0)
print _("press enter to continue") print _("press enter to continue")

View File

@ -175,6 +175,12 @@ class DerivedStats():
self.handsplayers[player]['rake'] = int(100* hand.rake)/len(hand.collectees) self.handsplayers[player]['rake'] = int(100* hand.rake)/len(hand.collectees)
if self.handsplayers[player]['street1Seen'] == True: if self.handsplayers[player]['street1Seen'] == True:
self.handsplayers[player]['wonWhenSeenStreet1'] = 1.0 self.handsplayers[player]['wonWhenSeenStreet1'] = 1.0
if self.handsplayers[player]['street2Seen'] == True:
self.handsplayers[player]['wonWhenSeenStreet2'] = 1.0
if self.handsplayers[player]['street3Seen'] == True:
self.handsplayers[player]['wonWhenSeenStreet3'] = 1.0
if self.handsplayers[player]['street4Seen'] == True:
self.handsplayers[player]['wonWhenSeenStreet4'] = 1.0
if self.handsplayers[player]['sawShowdown'] == True: if self.handsplayers[player]['sawShowdown'] == True:
self.handsplayers[player]['wonAtSD'] = 1.0 self.handsplayers[player]['wonAtSD'] = 1.0

View File

@ -66,13 +66,16 @@ class Everleaf(HandHistoryConverter):
self.re_SitsOut = re.compile(ur"^%s sits out" % player_re, re.MULTILINE) self.re_SitsOut = re.compile(ur"^%s sits out" % player_re, re.MULTILINE)
def readSupportedGames(self): def readSupportedGames(self):
return [["ring", "hold", "nl"], return [
["ring", "hold", "nl"],
["ring", "hold", "pl"], ["ring", "hold", "pl"],
["ring", "hold", "fl"], ["ring", "hold", "fl"],
["ring", "studhi", "fl"], ["ring", "stud", "fl"],
["ring", "omahahi", "pl"], #["ring", "omahahi", "pl"],
["ring", "omahahilo", "pl"], #["ring", "omahahilo", "pl"],
["tour", "hold", "nl"] ["tour", "hold", "nl"],
["tour", "hold", "fl"],
["tour", "hold", "pl"]
] ]
def determineGameType(self, handText): def determineGameType(self, handText):

View File

@ -62,6 +62,7 @@ class Filters(threading.Thread):
gen = self.conf.get_general_params() gen = self.conf.get_general_params()
self.day_start = 0 self.day_start = 0
if 'day_start' in gen: if 'day_start' in gen:
self.day_start = float(gen['day_start']) self.day_start = float(gen['day_start'])
@ -83,6 +84,7 @@ class Filters(threading.Thread):
self.siteid = {} self.siteid = {}
self.heroes = {} self.heroes = {}
self.boxes = {} self.boxes = {}
self.graphops = {}
for site in self.conf.get_supported_sites(): for site in self.conf.get_supported_sites():
#Get db site id for filtering later #Get db site id for filtering later
@ -103,6 +105,12 @@ class Filters(threading.Thread):
self.sbGroups = {} self.sbGroups = {}
self.numHands = 0 self.numHands = 0
# for use in graphops
# dspin = display in '$' or 'B'
self.graphops['dspin'] = "$"
self.graphops['showdown'] = 'OFF'
self.graphops['nonshowdown'] = 'OFF'
playerFrame = gtk.Frame() playerFrame = gtk.Frame()
playerFrame.set_label_align(0.0, 0.0) playerFrame.set_label_align(0.0, 0.0)
vbox = gtk.VBox(False, 0) vbox = gtk.VBox(False, 0)
@ -143,6 +151,16 @@ class Filters(threading.Thread):
self.fillLimitsFrame(vbox, self.display) self.fillLimitsFrame(vbox, self.display)
limitsFrame.add(vbox) limitsFrame.add(vbox)
# GraphOps
graphopsFrame = gtk.Frame()
#graphops.set_label_align(0,0, 0.0)
graphopsFrame.show()
vbox = gtk.VBox(False, 0)
self.fillGraphOpsFrame(vbox)
graphopsFrame.add(vbox)
# Seats # Seats
seatsFrame = gtk.Frame() seatsFrame = gtk.Frame()
seatsFrame.show() seatsFrame.show()
@ -183,6 +201,7 @@ class Filters(threading.Thread):
self.mainVBox.add(seatsFrame) self.mainVBox.add(seatsFrame)
self.mainVBox.add(groupsFrame) self.mainVBox.add(groupsFrame)
self.mainVBox.add(dateFrame) self.mainVBox.add(dateFrame)
self.mainVBox.add(graphopsFrame)
self.mainVBox.add(self.Button1) self.mainVBox.add(self.Button1)
self.mainVBox.add(self.Button2) self.mainVBox.add(self.Button2)
@ -203,6 +222,8 @@ class Filters(threading.Thread):
groupsFrame.hide() groupsFrame.hide()
if "Dates" not in self.display or self.display["Dates"] == False: if "Dates" not in self.display or self.display["Dates"] == False:
dateFrame.hide() dateFrame.hide()
if "GraphOps" not in self.display or self.display["GraphOps"] == False:
graphopsFrame.hide()
if "Button1" not in self.display or self.display["Button1"] == False: if "Button1" not in self.display or self.display["Button1"] == False:
self.Button1.hide() self.Button1.hide()
if "Button2" not in self.display or self.display["Button2"] == False: if "Button2" not in self.display or self.display["Button2"] == False:
@ -255,6 +276,9 @@ class Filters(threading.Thread):
return self.heroes return self.heroes
#end def getHeroes #end def getHeroes
def getGraphOps(self):
return self.graphops
def getLimits(self): def getLimits(self):
ltuple = [] ltuple = []
for l in self.limits: for l in self.limits:
@ -539,6 +563,14 @@ class Filters(threading.Thread):
self.groups[group] = w.get_active() self.groups[group] = w.get_active()
log.debug( _("self.groups[%s] set to %s") %(group, self.groups[group]) ) log.debug( _("self.groups[%s] set to %s") %(group, self.groups[group]) )
def __set_displayin_select(self, w, ops):
self.graphops['dspin'] = ops
def __set_graphopscheck_select(self, w, data):
#print "%s was toggled %s" % (data, ("OFF", "ON")[w.get_active()])
self.graphops[data] = ("OFF", "ON")[w.get_active()]
def fillPlayerFrame(self, vbox, display): def fillPlayerFrame(self, vbox, display):
top_hbox = gtk.HBox(False, 0) top_hbox = gtk.HBox(False, 0)
vbox.pack_start(top_hbox, False, False, 0) vbox.pack_start(top_hbox, False, False, 0)
@ -770,8 +802,58 @@ class Filters(threading.Thread):
# set_active doesn't seem to call this for some reason so call manually: # set_active doesn't seem to call this for some reason so call manually:
self.__set_limit_select(rb1, 'ring') self.__set_limit_select(rb1, 'ring')
self.type = 'ring' self.type = 'ring'
top_hbox.pack_start(showb, expand=False, padding=1)
def fillGraphOpsFrame(self, vbox):
top_hbox = gtk.HBox(False, 0)
vbox.pack_start(top_hbox, False, False, 0)
title = gtk.Label("Graphing Options:")
title.set_alignment(xalign=0.0, yalign=0.5)
top_hbox.pack_start(title, expand=True, padding=3)
showb = gtk.Button(label="hide", stock=None, use_underline=True)
showb.set_alignment(xalign=1.0, yalign=0.5)
showb.connect('clicked', self.__toggle_box, 'games')
top_hbox.pack_start(showb, expand=False, padding=1) top_hbox.pack_start(showb, expand=False, padding=1)
hbox1 = gtk.HBox(False, 0)
vbox.pack_start(hbox1, False, False, 0)
hbox1.show()
label = gtk.Label("Show Graph In:")
label.set_alignment(xalign=0.0, yalign=0.5)
hbox1.pack_start(label, True, True, 0)
label.show()
button = gtk.RadioButton(None, "$$")
hbox1.pack_start(button, True, True, 0)
button.connect("toggled", self.__set_displayin_select, "$")
button.set_active(True)
button.show()
button = gtk.RadioButton(button, "BB")
hbox1.pack_start(button, True, True, 0)
button.connect("toggled", self.__set_displayin_select, "BB")
button.show()
vbox1 = gtk.VBox(False, 0)
vbox.pack_start(vbox1, False, False, 0)
vbox1.show()
button = gtk.CheckButton("Showdown Winnings", False)
vbox1.pack_start(button, True, True, 0)
# wouldn't it be awesome if there was a way to remember the state of things like
# this and be able to set it to what it was last time?
#button.set_active(True)
button.connect("toggled", self.__set_graphopscheck_select, "showdown")
button.show()
button = gtk.CheckButton("Non-Showdown Winnings", False)
vbox1.pack_start(button, True, True, 0)
# ditto as 8 lines up :)
#button.set_active(True)
button.connect("toggled", self.__set_graphopscheck_select, "nonshowdown");
button.show()
def fillSeatsFrame(self, vbox, display): def fillSeatsFrame(self, vbox, display):
hbox = gtk.HBox(False, 0) hbox = gtk.HBox(False, 0)
vbox.pack_start(hbox, False, False, 0) vbox.pack_start(hbox, False, False, 0)

View File

@ -45,7 +45,7 @@ if os.name == "nt":
class GuiAutoImport (threading.Thread): class GuiAutoImport (threading.Thread):
def __init__(self, settings, config, sql, parent): def __init__(self, settings, config, sql = None, parent = None, cli = False):
self.importtimer = 0 self.importtimer = 0
self.settings = settings self.settings = settings
self.config = config self.config = config
@ -54,9 +54,6 @@ class GuiAutoImport (threading.Thread):
imp = self.config.get_import_parameters() imp = self.config.get_import_parameters()
# print "Import parameters"
# print imp
self.input_settings = {} self.input_settings = {}
self.pipe_to_hud = None self.pipe_to_hud = None
@ -66,13 +63,21 @@ class GuiAutoImport (threading.Thread):
self.importer.setQuiet(False) self.importer.setQuiet(False)
self.importer.setFailOnError(False) self.importer.setFailOnError(False)
self.importer.setHandCount(0) self.importer.setHandCount(0)
# self.importer.setWatchTime()
self.server = settings['db-host'] self.server = settings['db-host']
self.user = settings['db-user'] self.user = settings['db-user']
self.password = settings['db-password'] self.password = settings['db-password']
self.database = settings['db-databaseName'] self.database = settings['db-databaseName']
if cli == False:
self.setupGui()
else:
# TODO: Separate the code that grabs the directories from config
# Separate the calls to the Importer API
# Create a timer interface that doesn't rely on GTK
pass
def setupGui(self):
self.mainVBox = gtk.VBox(False,1) self.mainVBox = gtk.VBox(False,1)
hbox = gtk.HBox(True, 0) # contains 2 equal vboxes hbox = gtk.HBox(True, 0) # contains 2 equal vboxes
@ -355,4 +360,4 @@ if __name__== "__main__":
main_window.show() main_window.show()
gtk.main() gtk.main()
else: else:
pass i = GuiAutoImport(settings, config, cli = True)

View File

@ -35,8 +35,10 @@ import Filters
import Charset import Charset
try: try:
calluse = not 'matplotlib' in sys.modules
import matplotlib import matplotlib
matplotlib.use('GTKCairo') if calluse:
matplotlib.use('GTKCairo')
from matplotlib.figure import Figure from matplotlib.figure import Figure
from matplotlib.backends.backend_gtk import FigureCanvasGTK as FigureCanvas from matplotlib.backends.backend_gtk import FigureCanvasGTK as FigureCanvas
from matplotlib.backends.backend_gtkagg import NavigationToolbar2GTKAgg as NavigationToolbar from matplotlib.backends.backend_gtkagg import NavigationToolbar2GTKAgg as NavigationToolbar
@ -73,6 +75,7 @@ class GuiGraphViewer (threading.Thread):
"Seats" : False, "Seats" : False,
"SeatSep" : False, "SeatSep" : False,
"Dates" : True, "Dates" : True,
"GraphOps" : True,
"Groups" : False, "Groups" : False,
"Button1" : True, "Button1" : True,
"Button2" : True "Button2" : True
@ -144,11 +147,8 @@ class GuiGraphViewer (threading.Thread):
siteids = self.filters.getSiteIds() siteids = self.filters.getSiteIds()
limits = self.filters.getLimits() limits = self.filters.getLimits()
games = self.filters.getGames() games = self.filters.getGames()
graphs = { graphops = self.filters.getGraphOps()
"profit" : True, names = ""
"sawShowdown" : True,
"nonShowdown" : True
}
for i in ('show', 'none'): for i in ('show', 'none'):
if i in limits: if i in limits:
@ -161,6 +161,7 @@ class GuiGraphViewer (threading.Thread):
result = self.db.get_player_id(self.conf, site, _hname) result = self.db.get_player_id(self.conf, site, _hname)
if result is not None: if result is not None:
playerids.append(int(result)) playerids.append(int(result))
names = names + "\n"+_hname + " on "+site
if not sitenos: if not sitenos:
#Should probably pop up here. #Should probably pop up here.
@ -183,13 +184,15 @@ class GuiGraphViewer (threading.Thread):
#Get graph data from DB #Get graph data from DB
starttime = time() starttime = time()
(green, blue, red) = self.getRingProfitGraph(playerids, sitenos, limits, games) (green, blue, red) = self.getRingProfitGraph(playerids, sitenos, limits, games, graphops['dspin'])
print _("Graph generated in: %s") %(time() - starttime) print _("Graph generated in: %s") %(time() - starttime)
#Set axis labels and grid overlay properites #Set axis labels and grid overlay properites
self.ax.set_xlabel(_("Hands"), fontsize = 12) self.ax.set_xlabel(_("Hands"), fontsize = 12)
self.ax.set_ylabel("$", fontsize = 12) # SET LABEL FOR X AXIS
self.ax.set_ylabel(graphops['dspin'], fontsize = 12)
self.ax.grid(color='g', linestyle=':', linewidth=0.2) self.ax.grid(color='g', linestyle=':', linewidth=0.2)
if green == None or green == []: if green == None or green == []:
self.ax.set_title(_("No Data for Player(s) Found")) self.ax.set_title(_("No Data for Player(s) Found"))
@ -225,15 +228,15 @@ class GuiGraphViewer (threading.Thread):
#TODO: Do something useful like alert user #TODO: Do something useful like alert user
#print "No hands returned by graph query" #print "No hands returned by graph query"
else: else:
self.ax.set_title(_("Profit graph for ring games")) self.ax.set_title(_("Profit graph for ring games"+names),fontsize=12)
#Draw plot #Draw plot
if graphs['profit'] == True: self.ax.plot(green, color='green', label=_('Hands: %d\nProfit (%s): %.2f') %(len(green),graphops['dspin'], green[-1]))
self.ax.plot(green, color='green', label=_('Hands: %d\nProfit: $%.2f') %(len(green), green[-1])) if graphops['showdown'] == 'ON':
if graphs['sawShowdown'] == True: self.ax.plot(blue, color='blue', label=_('Showdown (%s): %.2f') %(graphops['dspin'], blue[-1]))
self.ax.plot(blue, color='blue', label=_('Showdown: $%.2f') %(blue[-1])) if graphops['nonshowdown'] == 'ON':
if graphs['nonShowdown'] == True: self.ax.plot(red, color='red', label=_('Non-showdown (%s): %.2f') %(graphops['dspin'], red[-1]))
self.ax.plot(red, color='red', label=_('Non-showdown: $%.2f') %(red[-1]))
if sys.version[0:3] == '2.5': if sys.version[0:3] == '2.5':
self.ax.legend(loc='upper left', shadow=True, prop=FontProperties(size='smaller')) self.ax.legend(loc='upper left', shadow=True, prop=FontProperties(size='smaller'))
else: else:
@ -249,9 +252,17 @@ class GuiGraphViewer (threading.Thread):
#end of def showClicked #end of def showClicked
def getRingProfitGraph(self, names, sites, limits, games):
tmp = self.sql.query['getRingProfitAllHandsPlayerIdSite'] def getRingProfitGraph(self, names, sites, limits, games, units):
# tmp = self.sql.query['getRingProfitAllHandsPlayerIdSite']
# print "DEBUG: getRingProfitGraph" # print "DEBUG: getRingProfitGraph"
if units == '$':
tmp = self.sql.query['getRingProfitAllHandsPlayerIdSiteInDollars']
elif units == 'BB':
tmp = self.sql.query['getRingProfitAllHandsPlayerIdSiteInBB']
start_date, end_date = self.filters.getDates() start_date, end_date = self.filters.getDates()
#Buggered if I can find a way to do this 'nicely' take a list of integers and longs #Buggered if I can find a way to do this 'nicely' take a list of integers and longs

View File

@ -34,10 +34,72 @@ import Filters
import Charset import Charset
import GuiPlayerStats import GuiPlayerStats
from TreeViewTooltips import TreeViewTooltips
#colalias,colshowsumm,colshowposn,colheading,colxalign,colformat,coltype = 0,1,2,3,4,5,6 #colalias,colshowsumm,colshowposn,colheading,colxalign,colformat,coltype = 0,1,2,3,4,5,6
#new order in config file: #new order in config file:
colalias,colheading,colshowsumm,colshowposn,colformat,coltype,colxalign = 0,1,2,3,4,5,6 colalias,colheading,colshowsumm,colshowposn,colformat,coltype,colxalign = 0,1,2,3,4,5,6
ranks = {'x':0, '2':2, '3':3, '4':4, '5':5, '6':6, '7':7, '8':8, '9':9, 'T':10, 'J':11, 'Q':12, 'K':13, 'A':14} ranks = {'x':0, '2':2, '3':3, '4':4, '5':5, '6':6, '7':7, '8':8, '9':9, 'T':10, 'J':11, 'Q':12, 'K':13, 'A':14}
onlinehelp = {'Game':_('Type of Game'),
'Hand':_('Hole cards'),
'Posn':_('Position'),
'Name':_('Name of the player'),
'Hds':_('Number of hands played'),
'Seats':_('Number of Seats'),
'VPIP':_('Voluntarily Putting In the pot\n(blinds excluded)'),
'PFR':_('% Pre Flop Raise'),
'PF3':_('% Pre Flop Re-Raise / 3Bet'),
'AggFac':_('Aggression Factor\n'),
'AggFreq':_('Aggression Frequency\nBet or Raise vs Fold'),
'ContBet':_('Continuation Bet on the flop'),
'RFI':_('% Raise First In\% Raise when first to bet'),
'Steals':_('% First to raise pre-flop\nand steal blinds'),
'Saw_F':_('% Saw Flop vs hands dealt'),
'SawSD':_('Saw Show Down / River'),
'WtSDwsF':_('Went To Show Down When Saw Flop'),
'W$SD':_('Amount Won when Show Down seen'),
'FlAFq':_('Flop Aggression\n% Bet or Raise after seeing Flop'),
'TuAFq':_('Turn Aggression\n% Bet or Raise after seeing Turn'),
'RvAFq':_('River Aggression\n% Bet or Raise after seeing River'),
'PoFAFq':_('Coming Soon\nTotal % agression'),
'Net($)':_('Amount won'),
'bb/100':_('Number of Big Blinds won\nor lost per 100 hands'),
'Rake($)':_('Amount of rake paid'),
'bbxr/100':_('Number of Big Blinds won\nor lost per 100 hands\nwhen excluding rake'),
'Variance':_('Measure of uncertainty\nThe lower, the more stable the amounts won')
}
class DemoTips(TreeViewTooltips):
def __init__(self, customer_column):
# customer_column is an instance of gtk.TreeViewColumn and
# is being used in the gtk.TreeView to show customer names.
# self.cust_col = customer_column
# call base class init
TreeViewTooltips.__init__(self)
def get_tooltip(self, view, column, path):
model = view.get_model()
cards = model[path][0]
title=column.get_title()
display='<big>%s</big>\n<i>%s</i>' % (title,onlinehelp[title])
return (display)
def location(self, x, y, w, h):
# rename me to "location" so I override the base class
# method. This will demonstrate being able to change
# where the tooltip window popups, relative to the
# pointer.
# this will place the tooltip above and to the right
return x + 30, y - (h + 10)
class GuiRingPlayerStats (GuiPlayerStats.GuiPlayerStats): class GuiRingPlayerStats (GuiPlayerStats.GuiPlayerStats):
@ -354,6 +416,7 @@ class GuiRingPlayerStats (GuiPlayerStats.GuiPlayerStats):
print _("***sortcols error: ") + str(sys.exc_info()[1]) print _("***sortcols error: ") + str(sys.exc_info()[1])
print "\n".join( [e[0]+':'+str(e[1])+" "+e[2] for e in err] ) print "\n".join( [e[0]+':'+str(e[1])+" "+e[2] for e in err] )
#end def sortcols #end def sortcols
def addGrid(self, vbox, query, flags, playerids, sitenos, limits, type, seats, groups, dates, games): def addGrid(self, vbox, query, flags, playerids, sitenos, limits, type, seats, groups, dates, games):
counter = 0 counter = 0
@ -466,6 +529,9 @@ class GuiRingPlayerStats (GuiPlayerStats.GuiPlayerStats):
#print treerow #print treerow
sqlrow += 1 sqlrow += 1
row += 1 row += 1
tips = DemoTips(column[colformat])
tips.add_view(view)
vbox.show_all() vbox.show_all()
view.show() view.show()
if len(self.liststore) == 1: if len(self.liststore) == 1:

2
pyfpdb/GuiSessionViewer.py Executable file → Normal file
View File

@ -30,7 +30,7 @@ try:
calluse = not 'matplotlib' in sys.modules calluse = not 'matplotlib' in sys.modules
import matplotlib import matplotlib
if calluse: if calluse:
matplotlib.use('GTK') matplotlib.use('GTKCairo')
from matplotlib.figure import Figure from matplotlib.figure import Figure
from matplotlib.backends.backend_gtk import FigureCanvasGTK as FigureCanvas from matplotlib.backends.backend_gtk import FigureCanvasGTK as FigureCanvas
from matplotlib.backends.backend_gtkagg import NavigationToolbar2GTKAgg as NavigationToolbar from matplotlib.backends.backend_gtkagg import NavigationToolbar2GTKAgg as NavigationToolbar

View File

@ -35,8 +35,10 @@ import Filters
import Charset import Charset
try: try:
calluse = not 'matplotlib' in sys.modules
import matplotlib import matplotlib
matplotlib.use('GTKCairo') if calluse:
matplotlib.use('GTKCairo')
from matplotlib.figure import Figure from matplotlib.figure import Figure
from matplotlib.backends.backend_gtk import FigureCanvasGTK as FigureCanvas from matplotlib.backends.backend_gtk import FigureCanvasGTK as FigureCanvas
from matplotlib.backends.backend_gtkagg import NavigationToolbar2GTKAgg as NavigationToolbar from matplotlib.backends.backend_gtkagg import NavigationToolbar2GTKAgg as NavigationToolbar

View File

@ -2,7 +2,7 @@
<FreePokerToolsConfig xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FreePokerToolsConfig.xsd"> <FreePokerToolsConfig xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FreePokerToolsConfig.xsd">
<import callFpdbHud = "True" interval = "10" fastStoreHudCache="False" hhArchiveBase="~/.fpdb/HandHistories/" saveActions="False"></import> <import callFpdbHud = "True" interval = "10" fastStoreHudCache="False" hhArchiveBase="~/.fpdb/HandHistories/" saveActions="True"></import>
<!-- These values determine what stats are displayed in the HUD <!-- These values determine what stats are displayed in the HUD
@ -578,6 +578,7 @@ Left-Drag to Move"
<hhc site="Carbon" converter="CarbonToFpdb"/> <hhc site="Carbon" converter="CarbonToFpdb"/>
<hhc site="PKR" converter="PkrToFpdb"/> <hhc site="PKR" converter="PkrToFpdb"/>
<hhc site="iPoker" converter="iPokerToFpdb"/> <hhc site="iPoker" converter="iPokerToFpdb"/>
<hhc site="Winamax" converter="WinamaxToFpdb"/>
</hhcs> </hhcs>
<supported_databases> <supported_databases>

29
pyfpdb/HUD_main.pyw Executable file → Normal file
View File

@ -23,10 +23,6 @@
Main for FreePokerTools HUD. Main for FreePokerTools HUD.
""" """
import L10n
_ = L10n.get_translation()
# TODO allow window resizing # TODO allow window resizing
# TODO hud to echo, but ignore non numbers # TODO hud to echo, but ignore non numbers
# TODO no stat window for hero # TODO no stat window for hero
@ -64,6 +60,21 @@ elif os.name == 'nt':
#import Tables #import Tables
import Hud import Hud
import locale
lang = locale.getdefaultlocale()[0][0:2]
print "lang:", lang
if lang == "en":
def _(string):
return string
else:
import gettext
try:
trans = gettext.translation("fpdb", localedir="locale", languages=[lang])
trans.install()
except IOError:
def _(string):
return string
# get config and set up logger # get config and set up logger
c = Configuration.Config(file=options.config, dbname=options.dbname) c = Configuration.Config(file=options.config, dbname=options.dbname)
log = Configuration.get_logger("logging.conf", "hud", log_dir=c.dir_log, log_file='HUD-log.txt') log = Configuration.get_logger("logging.conf", "hud", log_dir=c.dir_log, log_file='HUD-log.txt')
@ -111,8 +122,16 @@ class HUD_main(object):
self.vb.add(self.label) self.vb.add(self.label)
self.main_window.add(self.vb) self.main_window.add(self.vb)
self.main_window.set_title(_("HUD Main Window")) self.main_window.set_title(_("HUD Main Window"))
cards = os.path.join(os.getcwd(), '..','gfx','fpdb-cards.png')
if os.path.exists(cards):
self.main_window.set_icon_from_file(cards)
elif os.path.exists('/usr/share/pixmaps/fpdb-cards.png'):
self.main_window.set_icon_from_file('/usr/share/pixmaps/fpdb-cards.png')
else:
self.main_window.set_icon_stock(gtk.STOCK_HOME)
self.main_window.show_all() self.main_window.show_all()
gobject.timeout_add(100, self.check_tables) gobject.timeout_add(100, self.check_tables)
except: except:
log.error("*** Exception in HUD_main.init() *** ") log.error("*** Exception in HUD_main.init() *** ")
for e in traceback.format_tb(sys.exc_info()[2]): for e in traceback.format_tb(sys.exc_info()[2]):
@ -126,7 +145,7 @@ class HUD_main(object):
print _("hud_main: Client resized") print _("hud_main: Client resized")
print hud, hud.table.name, hud.table.x, hud.table.y print hud, hud.table.name, hud.table.x, hud.table.y
def client_destroyed(self, widget, hud): # call back for terminating the main eventloop def client_destroyed(self, widget, hud): # call back for terminating the main eventloop
print _("hud_main: Client destroyed") print _("hud_main: Client destroyed")
self.kill_hud(None, hud.table.name) self.kill_hud(None, hud.table.name)

View File

@ -3075,6 +3075,40 @@ class Sql:
GROUP BY h.startTime, hp.handId, hp.sawShowdown, hp.totalProfit GROUP BY h.startTime, hp.handId, hp.sawShowdown, hp.totalProfit
ORDER BY h.startTime""" ORDER BY h.startTime"""
self.query['getRingProfitAllHandsPlayerIdSiteInBB'] = """
SELECT hp.handId, ( hp.totalProfit / ( gt.bigBlind * 2 ) ) * 100 , hp.sawShowdown
FROM HandsPlayers hp
INNER JOIN Players pl ON (pl.id = hp.playerId)
INNER JOIN Hands h ON (h.id = hp.handId)
INNER JOIN Gametypes gt ON (gt.id = h.gametypeId)
WHERE pl.id in <player_test>
AND pl.siteId in <site_test>
AND h.startTime > '<startdate_test>'
AND h.startTime < '<enddate_test>'
<limit_test>
<game_test>
AND hp.tourneysPlayersId IS NULL
GROUP BY h.startTime, hp.handId, hp.sawShowdown, hp.totalProfit
ORDER BY h.startTime"""
self.query['getRingProfitAllHandsPlayerIdSiteInDollars'] = """
SELECT hp.handId, hp.totalProfit, hp.sawShowdown
FROM HandsPlayers hp
INNER JOIN Players pl ON (pl.id = hp.playerId)
INNER JOIN Hands h ON (h.id = hp.handId)
INNER JOIN Gametypes gt ON (gt.id = h.gametypeId)
WHERE pl.id in <player_test>
AND pl.siteId in <site_test>
AND h.startTime > '<startdate_test>'
AND h.startTime < '<enddate_test>'
<limit_test>
<game_test>
AND hp.tourneysPlayersId IS NULL
GROUP BY h.startTime, hp.handId, hp.sawShowdown, hp.totalProfit
ORDER BY h.startTime"""
#################################### ####################################
# Tourney Results query # Tourney Results query
#################################### ####################################
@ -4298,9 +4332,9 @@ class Sql:
################################ ################################
# Counts for DB stats window # Counts for DB stats window
################################ ################################
self.query['getHandCount'] = "SELECT COUNT(id) FROM Hands" self.query['getHandCount'] = "SELECT COUNT(*) FROM Hands"
self.query['getTourneyCount'] = "SELECT COUNT(id) FROM Tourneys" self.query['getTourneyCount'] = "SELECT COUNT(*) FROM Tourneys"
self.query['getTourneyTypeCount'] = "SELECT COUNT(id) FROM TourneyTypes" self.query['getTourneyTypeCount'] = "SELECT COUNT(*) FROM TourneyTypes"
################################ ################################
# queries for dumpDatabase # queries for dumpDatabase

View File

@ -145,13 +145,14 @@ def main(argv=None):
EverleafErrors = FpdbError('Everleaf Poker') EverleafErrors = FpdbError('Everleaf Poker')
CarbonErrors = FpdbError('Carbon') CarbonErrors = FpdbError('Carbon')
PKRErrors = FpdbError('PKR') PKRErrors = FpdbError('PKR')
iPokerErrors = FpdbError('iPoker') iPokerErrors = FpdbError('iPoker')
WinamaxErrors = FpdbError('Winamax')
ErrorsList = [ ErrorsList = [
PokerStarsErrors, FTPErrors, PartyPokerErrors, PokerStarsErrors, FTPErrors, PartyPokerErrors,
BetfairErrors, OnGameErrors, AbsoluteErrors, BetfairErrors, OnGameErrors, AbsoluteErrors,
EverleafErrors, CarbonErrors, PKRErrors, EverleafErrors, CarbonErrors, PKRErrors,
iPokerErrors iPokerErrors, WinamaxErrors
] ]
sites = { sites = {
@ -163,8 +164,9 @@ def main(argv=None):
'Absolute' : True, 'Absolute' : True,
'Everleaf' : True, 'Everleaf' : True,
'Carbon' : True, 'Carbon' : True,
'PKR' : True, 'PKR' : False,
'iPoker' : True, 'iPoker' : True,
'Winamax' : True,
} }
if sites['PokerStars'] == True: if sites['PokerStars'] == True:
@ -190,6 +192,8 @@ def main(argv=None):
walk_testfiles("regression-test-files/cash/PKR/", compare, importer, PKRErrors, "PKR") walk_testfiles("regression-test-files/cash/PKR/", compare, importer, PKRErrors, "PKR")
if sites['iPoker'] == True: if sites['iPoker'] == True:
walk_testfiles("regression-test-files/cash/iPoker/", compare, importer, iPokerErrors, "iPoker") walk_testfiles("regression-test-files/cash/iPoker/", compare, importer, iPokerErrors, "iPoker")
if sites['Winamax'] == True:
walk_testfiles("regression-test-files/cash/Winamax/", compare, importer, WinamaxErrors, "Winamax")
totalerrors = 0 totalerrors = 0

424
pyfpdb/TreeViewTooltips.py Normal file
View File

@ -0,0 +1,424 @@
# Copyright (c) 2006, Daniel J. Popowich
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
# (the "Software"), to deal in the Software without restriction,
# including without limitation the rights to use, copy, modify, merge,
# publish, distribute, sublicense, and/or sell copies of the Software,
# and to permit persons to whom the Software is furnished to do so,
# subject to the following conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
# BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
# ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#
# Send bug reports and contributions to:
#
# dpopowich AT astro dot umass dot edu
#
# This version of the file is part of fpdb, contact: fpdb-main@lists.sourceforge.net
'''
TreeViewTooltips.py
Provides TreeViewTooltips, a class which presents tooltips for cells,
columns and rows in a gtk.TreeView.
------------------------------------------------------------
This file includes a demo. Just execute the file:
python TreeViewTooltips.py
------------------------------------------------------------
To use, first subclass TreeViewTooltips and implement the get_tooltip()
method; see below. Then add any number of gtk.TreeVew widgets to a
TreeViewTooltips instance by calling the add_view() method. Overview
of the steps:
# 1. subclass TreeViewTooltips
class MyTooltips(TreeViewTooltips):
# 2. overriding get_tooltip()
def get_tooltip(...):
...
# 3. create an instance
mytips = MyTooltips()
# 4. Build up your gtk.TreeView.
myview = gtk.TreeView()
...# create columns, set the model, etc.
# 5. Add the view to the tooltips
mytips.add_view(myview)
How it works: the add_view() method connects the TreeView to the
"motion-notify" event with the callback set to a private method.
Whenever the mouse moves across the TreeView the callback will call
get_tooltip() with the following arguments:
get_tooltip(view, column, path)
where,
view: the gtk.TreeView instance.
column: the gtk.TreeViewColumn instance that the mouse is
currently over.
path: the path to the row that the mouse is currently over.
Based on whether or not column and path are checked for specific
values, get_tooltip can return tooltips for a cell, column, row or the
whole view:
Column Checked Path Checked Tooltip For...
Y Y cell
Y N column
N Y row
N N view
get_tooltip() should return None if no tooltip should be displayed.
Otherwise the return value will be coerced to a string (with the str()
builtin) and stripped; if non-empty, the result will be displayed as
the tooltip. By default, the tooltip popup window will be displayed
centered and just below the pointer and will remain shown until the
pointer leaves the cell (or column, or row, or view, depending on how
get_tooltip() is implemented).
'''
import pygtk
pygtk.require('2.0')
import gtk
import gtk.gdk
import gobject
if gtk.gtk_version < (2, 8):
import warnings
msg = (_('''This module was developed and tested with version 2.8.18 of gtk. You are using version %d.%d.%d. Your milage may vary.''')
% gtk.gtk_version)
warnings.warn(msg)
# major, minor, patch
version = 1, 0, 0
class TreeViewTooltips:
def __init__(self):
'''
Initialize the tooltip. After initialization there are two
attributes available for advanced control:
window: the popup window that holds the tooltip text, an
instance of gtk.Window.
label: a gtk.Label that is packed into the window. The
tooltip text is set in the label with the
set_label() method, so the text can be plain or
markup text.
Be default, the tooltip is enabled. See the enabled/disabled
methods.
'''
# create the window
self.window = window = gtk.Window(gtk.WINDOW_POPUP)
window.set_name('gtk-tooltips')
window.set_resizable(False)
window.set_border_width(4)
window.set_app_paintable(True)
window.connect("expose-event", self.__on_expose_event)
# create the label
self.label = label = gtk.Label()
label.set_line_wrap(True)
label.set_alignment(0.5, 0.5)
label.set_use_markup(True)
label.show()
window.add(label)
# by default, the tooltip is enabled
self.__enabled = True
# saves the current cell
self.__save = None
# the timer id for the next tooltip to be shown
self.__next = None
# flag on whether the tooltip window is shown
self.__shown = False
def enable(self):
'Enable the tooltip'
self.__enabled = True
def disable(self):
'Disable the tooltip'
self.__enabled = False
def __show(self, tooltip, x, y):
'''show the tooltip popup with the text/markup given by
tooltip.
tooltip: the text/markup for the tooltip.
x, y: the coord. (root window based) of the pointer.
'''
window = self.window
# set label
self.label.set_label(tooltip)
# resize window
w, h = window.size_request()
# move the window
window.move(*self.location(x,y,w,h))
# show it
window.show()
self.__shown = True
def __hide(self):
'hide the tooltip'
self.__queue_next()
self.window.hide()
self.__shown = False
def __leave_handler(self, view, event):
'when the pointer leaves the view, hide the tooltip'
self.__hide()
def __motion_handler(self, view, event):
'As the pointer moves across the view, show a tooltip.'
path = view.get_path_at_pos(int(event.x), int(event.y))
if self.__enabled and path:
path, col, x, y = path
tooltip = self.get_tooltip(view, col, path)
if tooltip is not None:
tooltip = str(tooltip).strip()
if tooltip:
self.__queue_next((path, col), tooltip,
int(event.x_root),
int(event.y_root))
return
self.__hide()
def __queue_next(self, *args):
'queue next request to show a tooltip'
# if args is non-empty it means a request was made to show a
# tooltip. if empty, no request is being made, but any
# pending requests should be cancelled anyway.
cell = None
# if called with args, break them out
if args:
cell, tooltip, x, y = args
# if it's the same cell as previously shown, just return
if self.__save == cell:
return
# if we have something queued up, cancel it
if self.__next:
gobject.source_remove(self.__next)
self.__next = None
# if there was a request...
if cell:
# if the tooltip is already shown, show the new one
# immediately
if self.__shown:
self.__show(tooltip, x, y)
# else queue it up in 1/2 second
else:
self.__next = gobject.timeout_add(500, self.__show,
tooltip, x, y)
# save this cell
self.__save = cell
def __on_expose_event(self, window, event):
# this magic is required so the window appears with a 1-pixel
# black border (default gtk Style). This code is a
# transliteration of the C implementation of gtk.Tooltips.
w, h = window.size_request()
window.style.paint_flat_box(window.window, gtk.STATE_NORMAL,
gtk.SHADOW_OUT, None, window,
'tooltip', 0, 0, w, h)
def location(self, x, y, w, h):
'''Given the x,y coordinates of the pointer and the width and
height (w,h) demensions of the tooltip window, return the x, y
coordinates of the tooltip window.
The default location is to center the window on the pointer
and 4 pixels below it.
'''
return x - w/2, y + 4
def add_view(self, view):
'add a gtk.TreeView to the tooltip'
assert isinstance(view, gtk.TreeView), \
('This handler should only be connected to '
'instances of gtk.TreeView')
view.connect("motion-notify-event", self.__motion_handler)
view.connect("leave-notify-event", self.__leave_handler)
def get_tooltip(self, view, column, path):
'See the module doc string for a description of this method'
raise NotImplemented, 'Subclass must implement get_tooltip()'
if __name__ == '__main__':
############################################################
# DEMO
############################################################
# First, subclass TreeViewTooltips
class DemoTips(TreeViewTooltips):
def __init__(self, customer_column):
# customer_column is an instance of gtk.TreeViewColumn and
# is being used in the gtk.TreeView to show customer names.
self.cust_col = customer_column
# call base class init
TreeViewTooltips.__init__(self)
def get_tooltip(self, view, column, path):
# we have a two column view: customer, phone; we'll make
# tooltips cell-based for the customer column, but generic
# column-based for the phone column.
# customer
if column is self.cust_col:
# By checking both column and path we have a
# cell-based tooltip.
model = view.get_model()
customer = model[path][2]
return '<big>%s %s</big>\n<i>%s</i>' % (customer.fname,
customer.lname,
customer.notes)
# phone
else:
return ('<big><u>Generic Column Tooltip</u></big>\n'
'Unless otherwise noted, all\narea codes are 888')
def XX_location(self, x, y, w, h):
# rename me to "location" so I override the base class
# method. This will demonstrate being able to change
# where the tooltip window popups, relative to the
# pointer.
# this will place the tooltip above and to the right
return x + 10, y - (h + 10)
# Here's our customer
class Customer:
def __init__(self, fname, lname, phone, notes):
self.fname = fname
self.lname = lname
self.phone = phone
self.notes = notes
# create a bunch of customers
customers = []
for fname, lname, phone, notes in [
('Joe', 'Schmoe', '555-1212', 'Likes to Morris dance.'),
('Jane', 'Doe', '555-2323',
'Wonders what the hell\nMorris dancing is.'),
('Phred', 'Phantastic', '900-555-1212', 'Dreams of Betty.'),
('Betty', 'Boop', '555-3434', 'Dreams in b&amp;w.'),
('Red Sox', 'Fan', '555-4545',
"Still livin' 2004!\nEspecially after 2006.")]:
customers.append(Customer(fname, lname, phone, notes))
# Build our model and view
model = gtk.ListStore(str, str, object)
for c in customers:
model.append(['%s %s' % (c.fname, c.lname), c.phone, c])
view = gtk.TreeView(model)
view.get_selection().set_mode(gtk.SELECTION_NONE)
# two columns, name and phone
cell = gtk.CellRendererText()
cell.set_property('xpad', 20)
namecol = gtk.TreeViewColumn('Customer Name', cell, text=0)
namecol.set_min_width(200)
view.append_column(namecol)
cell = gtk.CellRendererText()
phonecol = gtk.TreeViewColumn('Phone', cell, text=1)
view.append_column(phonecol)
# finally, connect the tooltip, specifying the name column as the
# column we want the tooltip to popup over.
tips = DemoTips(namecol)
tips.add_view(view)
# We're going to demonstrate enable/disable. First we need a
# callback function to connect to the toggled signal.
def toggle(button):
if button.get_active():
tips.disable()
else:
tips.enable()
# create a checkbutton and connect our handler
check = gtk.CheckButton('Check to disable view tooltips')
check.connect('toggled', toggle)
# a standard gtk.Tooltips to compare to
tt = gtk.Tooltips()
tt.set_tip(check, ('This is a standard gtk tooltip.\n'
'Compare me to the tooltips above.'))
# create a VBox to pack the view and checkbutton
vbox = gtk.VBox()
vbox.pack_start(view)
vbox.pack_start(check, False)
vbox.show_all()
# pack the vbox into a simple dialog and run it
dialog = gtk.Dialog('TreeViewTooltips Demo')
close = dialog.add_button(gtk.STOCK_CLOSE, gtk.RESPONSE_NONE)
# add a tooltip for the close button
tt.set_tip(close, 'Click to end the demo.')
dialog.set_default_size(400,400)
dialog.vbox.pack_start(vbox)
dialog.run()

165
pyfpdb/WinamaxToFpdb.py Executable file → Normal file
View File

@ -67,7 +67,7 @@ class Winamax(HandHistoryConverter):
# 'Razz' : ('stud','razz'), # 'Razz' : ('stud','razz'),
# 'RAZZ' : ('stud','razz'), # 'RAZZ' : ('stud','razz'),
# '7 Card Stud' : ('stud','studhi'), # '7 Card Stud' : ('stud','studhi'),
'SEVEN_CARD_STUD_HI_LO' : ('stud','studhilo'), # 'SEVEN_CARD_STUD_HI_LO' : ('stud','studhilo'),
# 'Badugi' : ('draw','badugi'), # 'Badugi' : ('draw','badugi'),
# 'Triple Draw 2-7 Lowball' : ('draw','27_3draw'), # 'Triple Draw 2-7 Lowball' : ('draw','27_3draw'),
# '5 Card Draw' : ('draw','fivedraw') # '5 Card Draw' : ('draw','fivedraw')
@ -80,8 +80,9 @@ class Winamax(HandHistoryConverter):
# Winamax Poker - CashGame - HandId: #279823-223-1285031451 - Holdem no limit (0.02€/0.05€) - 2010/09/21 03:10:51 UTC # Winamax Poker - CashGame - HandId: #279823-223-1285031451 - Holdem no limit (0.02€/0.05€) - 2010/09/21 03:10:51 UTC
# Table: 'Charenton-le-Pont' 9-max (real money) Seat #5 is the button
re_HandInfo = re.compile(u""" re_HandInfo = re.compile(u"""
\s*Winamax\sPoker\s-\sCashGame\s-\sHandId:\s\#(?P<HID>[-A-Z\d]+).*\s \s*Winamax\sPoker\s-\sCashGame\s-\sHandId:\s\#(?P<HID1>\d+)-(?P<HID2>\d+)-(?P<HID3>\d+).*\s
(?P<GAME>Holdem|Omaha)\s (?P<GAME>Holdem|Omaha)\s
(?P<LIMIT>no\slimit|pot\slimit)\s (?P<LIMIT>no\slimit|pot\slimit)\s
\( \(
@ -89,6 +90,7 @@ class Winamax(HandHistoryConverter):
((%(LS)s)?(?P<BB>[.0-9]+)(%(LS)s)?) ((%(LS)s)?(?P<BB>[.0-9]+)(%(LS)s)?)
\)\s-\s \)\s-\s
(?P<DATETIME>.*) (?P<DATETIME>.*)
Table:\s\'(?P<TABLE>[^']+)\'\s(?P<MAXPLAYER>\d+)\-max
""" % substitutions, re.MULTILINE|re.DOTALL|re.VERBOSE) """ % substitutions, re.MULTILINE|re.DOTALL|re.VERBOSE)
re_TailSplitHands = re.compile(r'\n\s*\n') re_TailSplitHands = re.compile(r'\n\s*\n')
@ -104,10 +106,9 @@ class Winamax(HandHistoryConverter):
UTC UTC
""", re.MULTILINE|re.VERBOSE) """, re.MULTILINE|re.VERBOSE)
# Seat 1: floflo...76 (5€) # Seat 1: some_player (5€)
# Seat 2: francksp76 (6.33€) # Seat 2: some_other_player21 (6.33€)
# Seat 3: Tonton73 (4.80€)
# Seat 4: chris67poker (4.60€)
re_PlayerInfo = re.compile(u'Seat\s(?P<SEAT>[0-9]+):\s(?P<PNAME>.*)\s\((%(LS)s)?(?P<CASH>[.0-9]+)(%(LS)s)?\)' % substitutions) re_PlayerInfo = re.compile(u'Seat\s(?P<SEAT>[0-9]+):\s(?P<PNAME>.*)\s\((%(LS)s)?(?P<CASH>[.0-9]+)(%(LS)s)?\)' % substitutions)
def compilePlayerRegexs(self, hand): def compilePlayerRegexs(self, hand):
@ -124,26 +125,17 @@ class Winamax(HandHistoryConverter):
subst = {'PLYR': player_re, 'CUR': self.sym[hand.gametype['currency']]} subst = {'PLYR': player_re, 'CUR': self.sym[hand.gametype['currency']]}
self.re_PostSB = re.compile('%(PLYR)s posts small blind (%(CUR)s)?(?P<SB>[\.0-9]+)(%(CUR)s)?' % subst, re.MULTILINE) self.re_PostSB = re.compile('%(PLYR)s posts small blind (%(CUR)s)?(?P<SB>[\.0-9]+)(%(CUR)s)?' % subst, re.MULTILINE)
self.re_PostBB = re.compile('%(PLYR)s posts big blind (%(CUR)s)?(?P<BB>[\.0-9]+)(%(CUR)s)?' % subst, re.MULTILINE) self.re_PostBB = re.compile('%(PLYR)s posts big blind (%(CUR)s)?(?P<BB>[\.0-9]+)(%(CUR)s)?' % subst, re.MULTILINE)
self.re_DenySB = re.compile('(?P<PNAME>.*) deny SB' % subst, re.MULTILINE)
self.re_Antes = re.compile(r"^%(PLYR)s: posts the ante (%(CUR)s)?(?P<ANTE>[\.0-9]+)(%(CUR)s)?" % subst, re.MULTILINE) self.re_Antes = re.compile(r"^%(PLYR)s: posts the ante (%(CUR)s)?(?P<ANTE>[\.0-9]+)(%(CUR)s)?" % subst, re.MULTILINE)
self.re_BringIn = re.compile(r"^%(PLYR)s: brings[- ]in( low|) for (%(CUR)s)?(?P<BRINGIN>[\.0-9]+(%(CUR)s)?)" % subst, re.MULTILINE) self.re_BringIn = re.compile(r"^%(PLYR)s: brings[- ]in( low|) for (%(CUR)s)?(?P<BRINGIN>[\.0-9]+(%(CUR)s)?)" % subst, re.MULTILINE)
self.re_PostBoth = re.compile('(?P<PNAME>.*): posts small \& big blind \( (%(CUR)s)?(?P<SBBB>[\.0-9]+)(%(CUR)s)?\)' % subst) self.re_PostBoth = re.compile('(?P<PNAME>.*): posts small \& big blind \( (%(CUR)s)?(?P<SBBB>[\.0-9]+)(%(CUR)s)?\)' % subst)
self.re_PostDead = re.compile('(?P<PNAME>.*) posts dead blind \((%(CUR)s)?(?P<DEAD>[\.0-9]+)(%(CUR)s)?\)' % subst, re.MULTILINE) self.re_PostDead = re.compile('(?P<PNAME>.*) posts dead blind \((%(CUR)s)?(?P<DEAD>[\.0-9]+)(%(CUR)s)?\)' % subst, re.MULTILINE)
self.re_HeroCards = re.compile('Dealt\sto\s%(PLYR)s\s\[(?P<CARDS>.*)\]' % subst) self.re_HeroCards = re.compile('Dealt\sto\s%(PLYR)s\s\[(?P<CARDS>.*)\]' % subst)
#lopllopl checks, Eurolll checks, .Lucchess checks.
#chumley. calls $0.25
self.re_Action = re.compile('(, )?(?P<PNAME>.*?)(?P<ATYPE> bets| checks| raises| calls| folds)( (%(CUR)s)?(?P<BET>[\d\.]+)(%(CUR)s)?)?( and is all-in)?' % subst) self.re_Action = re.compile('(, )?(?P<PNAME>.*?)(?P<ATYPE> bets| checks| raises| calls| folds)( (%(CUR)s)?(?P<BET>[\d\.]+)(%(CUR)s)?)?( and is all-in)?' % subst)
#self.re_Board = re.compile(r"\[board cards (?P<CARDS>.+) \]") self.re_ShowdownAction = re.compile('(?P<PNAME>[^\(\)\n]*) (\((small blind|big blind|button)\) )?shows \[(?P<CARDS>.+)\]')
#Uchilka shows [ KC,JD ]
self.re_ShowdownAction = re.compile('(?P<PNAME>.*) shows \[(?P<CARDS>.+)\]')
#Main pot: $3.57 won by mleo17 ($3.40)
#Side pot 1: $3.26 won by maac_5 ($3.10)
#Main pot: $2.87 won by maac_5 ($1.37), sagi34 ($1.36)
# self.re_CollectPot = re.compile('\s*(?P<PNAME>.*)\scollected\s(%(CUR)s)?(?P<POT>[\.\d]+)(%(CUR)s)?\sfrom\spot' % subst)
self.re_CollectPot = re.compile('\s*(?P<PNAME>.*)\scollected\s(%(CUR)s)?(?P<POT>[\.\d]+)(%(CUR)s)?.*' % subst) self.re_CollectPot = re.compile('\s*(?P<PNAME>.*)\scollected\s(%(CUR)s)?(?P<POT>[\.\d]+)(%(CUR)s)?.*' % subst)
#Seat 5: mleo17 ($3.40), net: +$2.57, [Jd, Qd] (TWO_PAIR QUEEN, JACK)
self.re_ShownCards = re.compile("^Seat (?P<SEAT>[0-9]+): %(PLYR)s showed \[(?P<CARDS>.*)\].*" % subst, re.MULTILINE) self.re_ShownCards = re.compile("^Seat (?P<SEAT>[0-9]+): %(PLYR)s showed \[(?P<CARDS>.*)\].*" % subst, re.MULTILINE)
self.re_sitsOut = re.compile('(?P<PNAME>.*) sits out') self.re_sitsOut = re.compile('(?P<PNAME>.*) sits out')
@ -152,7 +144,6 @@ class Winamax(HandHistoryConverter):
["ring", "hold", "fl"], ["ring", "hold", "fl"],
["ring", "hold", "nl"], ["ring", "hold", "nl"],
["ring", "hold", "pl"], ["ring", "hold", "pl"],
["ring", "stud", "fl"],
] ]
def determineGameType(self, handText): def determineGameType(self, handText):
@ -187,7 +178,6 @@ class Winamax(HandHistoryConverter):
if 'BB' in mg: if 'BB' in mg:
info['bb'] = mg['BB'] info['bb'] = mg['BB']
#log.debug("determinegametype: returning "+str(info))
return info return info
def readHandInfo(self, hand): def readHandInfo(self, hand):
@ -200,11 +190,6 @@ class Winamax(HandHistoryConverter):
#log.debug("readHandInfo: %s" % info) #log.debug("readHandInfo: %s" % info)
for key in info: for key in info:
if key == 'DATETIME': if key == 'DATETIME':
#'Wed Aug 18 19:45:30 GMT+0100 2010
# %a %b %d %H:%M:%S %z %Y
#hand.startTime = time.strptime(m.group('DATETIME'), "%a %b %d %H:%M:%S GMT%z %Y")
# Stupid library doesn't seem to support %z (http://docs.python.org/library/time.html?highlight=strptime#time.strptime)
# So we need to re-interpret te string to be useful
a = self.re_DateTime.search(info[key]) a = self.re_DateTime.search(info[key])
if a: if a:
datetimestr = "%s/%s/%s %s:%s:%s" % (a.group('Y'),a.group('M'), a.group('D'), a.group('H'),a.group('MIN'),a.group('S')) datetimestr = "%s/%s/%s %s:%s:%s" % (a.group('Y'),a.group('M'), a.group('D'), a.group('H'),a.group('MIN'),a.group('S'))
@ -212,15 +197,13 @@ class Winamax(HandHistoryConverter):
else: else:
datetimestr = "2010/Jan/01 01:01:01" datetimestr = "2010/Jan/01 01:01:01"
log.error(_("readHandInfo: DATETIME not matched: '%s'" % info[key])) log.error(_("readHandInfo: DATETIME not matched: '%s'" % info[key]))
print "DEBUG: readHandInfo: DATETIME not matched: '%s'" % info[key] # print "DEBUG: readHandInfo: DATETIME not matched: '%s'" % info[key]
# TODO: Manually adjust time against OFFSET # TODO: Manually adjust time against OFFSET
hand.startTime = datetime.datetime.strptime(datetimestr, "%Y/%m/%d %H:%M:%S") # also timezone at end, e.g. " ET" hand.startTime = datetime.datetime.strptime(datetimestr, "%Y/%m/%d %H:%M:%S") # also timezone at end, e.g. " ET"
# hand.startTime = HandHistoryConverter.changeTimezone(hand.startTime, tzoffset, "UTC") hand.startTime = HandHistoryConverter.changeTimezone(hand.startTime, "CET", "UTC")
if key == 'HID': if key == 'HID1':
hand.handid = info[key] hand.handid = "1%.4d%s%s"%(int(info['HID2']),info['HID1'],info['HID3'])
# Need to remove non-alphanumerics for MySQL # Need to remove non-alphanumerics for MySQL
hand.handid = hand.handid.replace('R','')
hand.handid = hand.handid.replace('-','')
if key == 'TABLE': if key == 'TABLE':
hand.tablename = info[key] hand.tablename = info[key]
@ -230,64 +213,24 @@ class Winamax(HandHistoryConverter):
hand.mixed = None hand.mixed = None
def readPlayerStacks(self, hand): def readPlayerStacks(self, hand):
log.info("readplayerstacks: re is '%s'" % self.re_PlayerInfo) log.debug(_("readplayerstacks: re is '%s'" % self.re_PlayerInfo))
m = self.re_PlayerInfo.finditer(hand.handText) m = self.re_PlayerInfo.finditer(hand.handText)
for a in m: for a in m:
print "DEBUG: found '%s' with '%s'" %(a.group('PNAME'), a.group('CASH'))
hand.addPlayer(int(a.group('SEAT')), a.group('PNAME'), a.group('CASH')) hand.addPlayer(int(a.group('SEAT')), a.group('PNAME'), a.group('CASH'))
def markStreets(self, hand): def markStreets(self, hand):
# *** ANTE/BLINDS ***
# francksp76 posts small blind 0.02€
# Tonton73 posts big blind 0.05€
# Dealt to johnny_nd [5d Kh 9c Tc]
# *** PRE-FLOP ***
# chris67poker folds
# luckyluck21_ calls 0.05€
# arawak folds
# johnny_nd calls 0.05€
# KILLAROUNDER calls 0.05€
# floflo...76 folds
# francksp76 calls 0.03€
# Tonton73 checks
# *** FLOP *** [5h 8d 3h]
# francksp76 checks
# Tonton73 checks
# luckyluck21_ checks
# johnny_nd checks
# KILLAROUNDER checks
# *** TURN *** [5h 8d 3h][7h]
# francksp76 checks
# Tonton73 checks
# luckyluck21_ checks
# johnny_nd checks
# KILLAROUNDER checks
# *** RIVER *** [5h 8d 3h 7h][2d]
# francksp76 checks
# Tonton73 checks
# luckyluck21_ checks
# johnny_nd bets 0.25€
# KILLAROUNDER folds
# francksp76 folds
# Tonton73 folds
# luckyluck21_ calls 0.25€
# *** SHOW DOWN ***
# johnny_nd shows [5d Kh 9c Tc] (One pair : 5)
# luckyluck21_ shows [6h Js 9s Td] (Straight 9 high)
# luckyluck21_ collected 0.71€ from pot
# *** SUMMARY ***
# Total pot 0.71€ | Rake 0.04€
m = re.search(r"\*\*\* ANTE\/BLINDS \*\*\*(?P<PREFLOP>.+(?=\*\*\* FLOP \*\*\*)|.+)" m = re.search(r"\*\*\* ANTE\/BLINDS \*\*\*(?P<PREFLOP>.+(?=\*\*\* FLOP \*\*\*)|.+)"
r"(\*\*\* FLOP \*\*\*(?P<FLOP> \[\S\S \S\S \S\S\].+(?=\*\*\* TURN \*\*\*)|.+))?" r"(\*\*\* FLOP \*\*\*(?P<FLOP> \[\S\S \S\S \S\S\].+(?=\*\*\* TURN \*\*\*)|.+))?"
r"(\*\*\* TURN \*\*\* \[\S\S \S\S \S\S] (?P<TURN>\[\S\S\].+(?=\*\*\* RIVER \*\*\*)|.+))?" r"(\*\*\* TURN \*\*\* \[\S\S \S\S \S\S](?P<TURN>\[\S\S\].+(?=\*\*\* RIVER \*\*\*)|.+))?"
r"(\*\*\* RIVER \*\*\* \[\S\S \S\S \S\S \S\S] (?P<RIVER>\[\S\S\].+))?", hand.handText,re.DOTALL) r"(\*\*\* RIVER \*\*\* \[\S\S \S\S \S\S \S\S](?P<RIVER>\[\S\S\].+))?", hand.handText,re.DOTALL)
try: try:
hand.addStreets(m) hand.addStreets(m)
print "add street" # print "adding street", m.group(0)
# print "---"
except: except:
print ("Failed to add streets. handtext=%s") print (_("Failed to add streets. handtext=%s"))
#Needs to return a list in the format #Needs to return a list in the format
# ['player1name', 'player2name', ...] where player1name is the sb and player2name is bb, # ['player1name', 'player2name', ...] where player1name is the sb and player2name is bb,
@ -297,7 +240,7 @@ class Winamax(HandHistoryConverter):
m = self.re_Button.search(hand.handText) m = self.re_Button.search(hand.handText)
if m: if m:
hand.buttonpos = int(m.group('BUTTON')) hand.buttonpos = int(m.group('BUTTON'))
log.debug('readButton: button on pos %d'%hand.buttonpos) log.debug(_('readButton: button on pos %d'%hand.buttonpos))
else: else:
log.warning(_('readButton: not found')) log.warning(_('readButton: not found'))
@ -314,11 +257,12 @@ class Winamax(HandHistoryConverter):
hand.setCommunityCards(street, m.group('CARDS').split(' ')) hand.setCommunityCards(street, m.group('CARDS').split(' '))
def readBlinds(self, hand): def readBlinds(self, hand):
try: if not self.re_DenySB.search(hand.handText):
m = self.re_PostSB.search(hand.handText) try:
hand.addBlind(m.group('PNAME'), 'small blind', m.group('SB')) m = self.re_PostSB.search(hand.handText)
except exceptions.AttributeError: # no small blind hand.addBlind(m.group('PNAME'), 'small blind', m.group('SB'))
log.exception( _("readBlinds in noSB exception - no SB created")+str(sys.exc_info()) ) except exceptions.AttributeError: # no small blind
log.warning( _("readBlinds in noSB exception - no SB created")+str(sys.exc_info()) )
#hand.addBlind(None, None, None) #hand.addBlind(None, None, None)
for a in self.re_PostBB.finditer(hand.handText): for a in self.re_PostBB.finditer(hand.handText):
hand.addBlind(a.group('PNAME'), 'big blind', a.group('BB')) hand.addBlind(a.group('PNAME'), 'big blind', a.group('BB'))
@ -348,19 +292,18 @@ class Winamax(HandHistoryConverter):
if street in hand.streets.keys(): if street in hand.streets.keys():
m = self.re_HeroCards.finditer(hand.streets[street]) m = self.re_HeroCards.finditer(hand.streets[street])
if m == []: if m == []:
log.debug("No hole cards found for %s"%street) log.debug(_("No hole cards found for %s"%street))
for found in m: for found in m:
hand.hero = found.group('PNAME') hand.hero = found.group('PNAME')
newcards = found.group('CARDS').split(' ') newcards = found.group('CARDS').split(' ')
print "DEBUG: addHoleCards(%s, %s, %s)" %(street, hand.hero, newcards) # print "DEBUG: addHoleCards(%s, %s, %s)" %(street, hand.hero, newcards)
hand.addHoleCards(street, hand.hero, closed=newcards, shown=False, mucked=False, dealt=True) hand.addHoleCards(street, hand.hero, closed=newcards, shown=False, mucked=False, dealt=True)
log.debug("Hero cards %s: %s"%(hand.hero, newcards)) log.debug(_("Hero cards %s: %s"%(hand.hero, newcards)))
def readAction(self, hand, street): def readAction(self, hand, street):
m = self.re_Action.finditer(hand.streets[street]) m = self.re_Action.finditer(hand.streets[street])
for action in m: for action in m:
acts = action.groupdict() acts = action.groupdict()
#log.debug("readaction: acts: %s" %acts)
if action.group('ATYPE') == ' raises': if action.group('ATYPE') == ' raises':
hand.addRaiseBy( street, action.group('PNAME'), action.group('BET') ) hand.addRaiseBy( street, action.group('PNAME'), action.group('BET') )
elif action.group('ATYPE') == ' calls': elif action.group('ATYPE') == ' calls':
@ -376,25 +319,59 @@ class Winamax(HandHistoryConverter):
elif action.group('ATYPE') == ' stands pat': elif action.group('ATYPE') == ' stands pat':
hand.addStandsPat( street, action.group('PNAME')) hand.addStandsPat( street, action.group('PNAME'))
else: else:
log.fatal("DEBUG: unimplemented readAction: '%s' '%s'") %(action.group('PNAME'),action.group('ATYPE'),) log.fatal(_("DEBUG: unimplemented readAction: '%s' '%s'")) %(action.group('PNAME'),action.group('ATYPE'),)
# print "Processed %s"%acts
# print "committed=",hand.pot.committed
def readShowdownActions(self, hand): def readShowdownActions(self, hand):
for shows in self.re_ShowdownAction.finditer(hand.handText): for shows in self.re_ShowdownAction.finditer(hand.handText):
log.debug("add show actions %s"%shows) log.debug(_("add show actions %s"%shows))
cards = shows.group('CARDS') cards = shows.group('CARDS')
cards = cards.split(' ') cards = cards.split(' ')
print "DEBUG: addShownCards(%s, %s)" %(cards, shows.group('PNAME')) # print "DEBUG: addShownCards(%s, %s)" %(cards, shows.group('PNAME'))
hand.addShownCards(cards, shows.group('PNAME')) hand.addShownCards(cards, shows.group('PNAME'))
@Trace
def readCollectPot(self,hand): def readCollectPot(self,hand):
for m in self.re_CollectPot.finditer(hand.handText): # Winamax has unfortunately thinks that a sidepot is created
hand.addCollectPot(player=m.group('PNAME'),pot=m.group('POT')) # when there is uncalled money in the pot - something that can
# only happen when a player is all-in
# Becuase of this, we need to do the same calculations as class Pot()
# and determine if the amount returned is the same as the amount collected
# if so then the collected line is invalid
total = sum(hand.pot.committed.values()) + sum(hand.pot.common.values())
# Return any uncalled bet.
committed = sorted([ (v,k) for (k,v) in hand.pot.committed.items()])
#print "DEBUG: committed: %s" % committed
#ERROR below. lastbet is correct in most cases, but wrong when
# additional money is committed to the pot in cash games
# due to an additional sb being posted. (Speculate that
# posting sb+bb is also potentially wrong)
returned = {}
lastbet = committed[-1][0] - committed[-2][0]
if lastbet > 0: # uncalled
returnto = committed[-1][1]
#print "DEBUG: returning %f to %s" % (lastbet, returnto)
total -= lastbet
returned[returnto] = lastbet
collectees = []
for m in self.re_CollectPot.finditer(hand.handText):
collectees.append([m.group('PNAME'), m.group('POT')])
for plyr, p in collectees:
if plyr in returned.keys() and Decimal(p) - returned[plyr] == 0:
p = Decimal(p) - returned[plyr]
if p > 0:
print "DEBUG: addCollectPot(%s,%s)" %(plyr, p)
hand.addCollectPot(player=plyr,pot=p)
@Trace
def readShownCards(self,hand): def readShownCards(self,hand):
for m in self.re_ShownCards.finditer(hand.handText): for m in self.re_ShownCards.finditer(hand.handText):
log.debug("Read shown cards: %s"%m.group(0)) log.debug(_("Read shown cards: %s"%m.group(0)))
cards = m.group('CARDS') cards = m.group('CARDS')
cards = cards.split(' ') # needs to be a list, not a set--stud needs the order cards = cards.split(' ') # needs to be a list, not a set--stud needs the order
(shown, mucked) = (False, False) (shown, mucked) = (False, False)

View File

@ -1127,10 +1127,13 @@ You can find the full license texts in agpl-3.0.txt, gpl-2.0.txt, gpl-3.0.txt an
cards = os.path.join(os.getcwd(), '..','gfx','fpdb-cards.png') cards = os.path.join(os.getcwd(), '..','gfx','fpdb-cards.png')
if os.path.exists(cards): if os.path.exists(cards):
self.statusIcon.set_from_file(cards) self.statusIcon.set_from_file(cards)
self.window.set_icon_from_file(cards)
elif os.path.exists('/usr/share/pixmaps/fpdb-cards.png'): elif os.path.exists('/usr/share/pixmaps/fpdb-cards.png'):
self.statusIcon.set_from_file('/usr/share/pixmaps/fpdb-cards.png') self.statusIcon.set_from_file('/usr/share/pixmaps/fpdb-cards.png')
self.window.set_icon_from_file('/usr/share/pixmaps/fpdb-cards.png')
else: else:
self.statusIcon.set_from_stock(gtk.STOCK_HOME) self.statusIcon.set_from_stock(gtk.STOCK_HOME)
self.window.set_icon_stock(gtk.STOCK_HOME)
self.statusIcon.set_tooltip("Free Poker Database") self.statusIcon.set_tooltip("Free Poker Database")
self.statusIcon.connect('activate', self.statusicon_activate) self.statusIcon.connect('activate', self.statusicon_activate)
self.statusMenu = gtk.Menu() self.statusMenu = gtk.Menu()

View File

@ -277,8 +277,8 @@
'winnings': 5567, 'winnings': 5567,
'wonAtSD': 1.0, 'wonAtSD': 1.0,
'wonWhenSeenStreet1': 1.0, 'wonWhenSeenStreet1': 1.0,
'wonWhenSeenStreet2': 0.0, 'wonWhenSeenStreet2': 1.0,
'wonWhenSeenStreet3': 0.0, 'wonWhenSeenStreet3': 1.0,
'wonWhenSeenStreet4': 0.0}, 'wonWhenSeenStreet4': 0.0},
u'Player4': { 'card1': 0, u'Player4': { 'card1': 0,
'card2': 0, 'card2': 0,

View File

@ -465,8 +465,8 @@
'winnings': 94, 'winnings': 94,
'wonAtSD': 1.0, 'wonAtSD': 1.0,
'wonWhenSeenStreet1': 1.0, 'wonWhenSeenStreet1': 1.0,
'wonWhenSeenStreet2': 0.0, 'wonWhenSeenStreet2': 1.0,
'wonWhenSeenStreet3': 0.0, 'wonWhenSeenStreet3': 1.0,
'wonWhenSeenStreet4': 0.0}, 'wonWhenSeenStreet4': 0.0},
u'rockinalex': { 'card1': 49, u'rockinalex': { 'card1': 49,
'card2': 31, 'card2': 31,

View File

@ -0,0 +1,36 @@
PokerStars Game #49934100000: 5 Card Draw No Limit ($0.25/$0.50 USD) - 2010/09/20 20:50:00 PT [2010/09/20 23:50:00 ET]
Table 'Table VI' 6-max Seat #3 is the button
Seat 1: Player1 ($27.95 in chips)
Seat 2: Player2 ($7.50 in chips)
Seat 3: Player3 ($12.15 in chips)
Seat 4: Player4 ($9.25 in chips)
Seat 5: Player5 ($20 in chips)
Player4: posts small blind $0.25
Player5: posts big blind $0.50
vega104: sits out
*** DEALING HANDS ***
Dealt to Player5 [4d 7d 4c 5c Tc]
Player1: folds
Player2: folds
Player3: folds
Player4: calls $0.25
Player5: checks
Player4: discards 1 card
Player5: discards 1 card [4c]
Dealt to Player5 [4d 7d 5c Tc] [Ad]
Player4: checks
Player5: checks
*** SHOW DOWN ***
Player4: shows [6d Js As Jd 6c] (two pair, Jacks and Sixes)
Player5: mucks hand
Player4 collected $0.95 from pot
*** SUMMARY ***
Total pot $1 | Rake $0.05
Seat 1: Player1 folded before the Draw (didn't bet)
Seat 2: Player2 folded before the Draw (didn't bet)
Seat 3: Player3 (button) folded before the Draw (didn't bet)
Seat 4: Player4 (small blind) showed [6d Js As Jd 6c] and won ($0.95) with two pair, Jacks and Sixes
Seat 5: Player5 (big blind) mucked [4d 7d Ad 5c Tc]

View File

@ -0,0 +1,31 @@
PokerStars Game #49900000007: 5 Card Draw Pot Limit ($0.50/$1.00 USD) - 2010/09/20 20:00:00 PT [2010/09/20 20:00:00 ET]
Table 'Table II' 6-max Seat #3 is the button
Seat 1: Player1 ($106.80 in chips)
Seat 3: Player2 ($34.95 in chips)
Seat 4: Player3 ($40 in chips)
Player3: posts small blind $0.50
Player1: posts big blind $1
*** DEALING HANDS ***
Dealt to Player3 [6s Jh 7d 2h 3s]
Player2: raises $2 to $3
Player3: calls $2.50
Player1: calls $2
Player3: discards 1 card [Jh]
Dealt to Player3 [6s 7d 2h 3s] [Qs]
Player1: discards 1 card
Player2: discards 3 cards
Player3: bets $5
Player1: folds
Player2: calls $5
*** SHOW DOWN ***
Player3: shows [6s Qs 7d 2h 3s] (high card Queen)
Player2: shows [4d Ad Ks Kd 3h] (a pair of Kings)
Player2 collected $18.10 from pot
*** SUMMARY ***
Total pot $19 | Rake $0.90
Seat 1: Player1 (big blind) folded after the Draw
Seat 3: Player2 (button) showed [4d Ad Ks Kd 3h] and won ($18.10) with a pair of Kings
Seat 4: Player3 (small blind) showed [6s Qs 7d 2h 3s] and lost with high card Queen

View File

@ -841,6 +841,6 @@
'winnings': 14, 'winnings': 14,
'wonAtSD': 0.0, 'wonAtSD': 0.0,
'wonWhenSeenStreet1': 1.0, 'wonWhenSeenStreet1': 1.0,
'wonWhenSeenStreet2': 0.0, 'wonWhenSeenStreet2': 1.0,
'wonWhenSeenStreet3': 0.0, 'wonWhenSeenStreet3': 0.0,
'wonWhenSeenStreet4': 0.0}} 'wonWhenSeenStreet4': 0.0}}

View File

@ -465,9 +465,9 @@
'winnings': 40, 'winnings': 40,
'wonAtSD': 1.0, 'wonAtSD': 1.0,
'wonWhenSeenStreet1': 1.0, 'wonWhenSeenStreet1': 1.0,
'wonWhenSeenStreet2': 0.0, 'wonWhenSeenStreet2': 1.0,
'wonWhenSeenStreet3': 0.0, 'wonWhenSeenStreet3': 1.0,
'wonWhenSeenStreet4': 0.0}, 'wonWhenSeenStreet4': 1.0},
u'rdiezchang': { 'card1': 0, u'rdiezchang': { 'card1': 0,
'card2': 0, 'card2': 0,
'card3': 26, 'card3': 26,
@ -653,9 +653,9 @@
'winnings': 40, 'winnings': 40,
'wonAtSD': 1.0, 'wonAtSD': 1.0,
'wonWhenSeenStreet1': 1.0, 'wonWhenSeenStreet1': 1.0,
'wonWhenSeenStreet2': 0.0, 'wonWhenSeenStreet2': 1.0,
'wonWhenSeenStreet3': 0.0, 'wonWhenSeenStreet3': 1.0,
'wonWhenSeenStreet4': 0.0}, 'wonWhenSeenStreet4': 1.0},
u'u.pressure': { 'card1': 0, u'u.pressure': { 'card1': 0,
'card2': 0, 'card2': 0,
'card3': 22, 'card3': 22,

View File

@ -0,0 +1,58 @@
Winamax Poker - CashGame - HandId: #323549-11-1286000000 - Holdem no limit (0.02€/0.05€) - 2010/10/02 10:00:00 UTC
Table: 'Reims' 9-max (real money) Seat #5 is the button
Seat 1: Player1 (5€)
Seat 2: Player2 (5€)
Seat 3: Player3 (4.93€)
Seat 4: Player4 (4.93€)
Seat 5: Player5 (3.58€)
Seat 6: Player6 (1.98€)
Seat 7: Player7 (2.95€)
Seat 8: Player8 (6.43€)
Seat 9: Player9 (6.52€)
*** ANTE/BLINDS ***
Player6 posts small blind 0.02€
Player7 posts big blind 0.05€
Player1 posts big blind 0.05€ out of position
Dealt to Player4 [8d 8h]
*** PRE-FLOP ***
Player8 raises 0.17€ to 0.22€
Player9 calls 0.22€
Player1 folds
Player2 folds
Player3 calls 0.22€
Player4 folds
Player5 folds
Player6 folds
Player7 folds
*** FLOP *** [Jd 9d 2s]
Player8 bets 0.39€
Player9 raises 0.91€ to 1.30€
Player3 calls 1.30€
Player8 calls 0.91€
*** TURN *** [Jd 9d 2s][Kh]
Player8 checks
Player9 checks
Player3 checks
*** RIVER *** [Jd 9d 2s Kh][8s]
Player8 bets 4.70€
Player9 folds
Player3 calls 3.41€ and is all-in
*** SHOW DOWN ***
Player3 shows [Jh 4s] (One pair : Jack)
Player8 shows [Ac 7c] (High card : Ace)
Player8 collected 1.29€ from side pot 1
Player3 collected 10.92€ from main pot
*** SUMMARY ***
Total pot 12.21€ | Rake 0.58€
Board: [Jd 9d 2s Kh 8s]
Seat 1: Player1 folded on the pre-flop
Seat 2: Player2 folded on the pre-flop
Seat 3: Player3 showed [Jh 4s] and won 10.92€ with One pair : Jack
Seat 4: Player4 folded on the pre-flop
Seat 5: Player5 (button) folded on the pre-flop
Seat 6: Player6 (small blind) folded on the pre-flop
Seat 7: Player7 (big blind) folded on the pre-flop
Seat 8: Player8 showed [Ac 7c] and won 1.29€ with High card : Ace
Seat 9: Player9 folded on the river

View File

@ -0,0 +1,846 @@
{ u'Player1': { 'card1': 0,
'card2': 0,
'card3': 0,
'card4': 0,
'card5': 0,
'card6': 0,
'card7': 0,
'foldBbToStealChance': False,
'foldSbToStealChance': False,
'foldToOtherRaisedStreet0': False,
'foldToOtherRaisedStreet1': False,
'foldToOtherRaisedStreet2': False,
'foldToOtherRaisedStreet3': False,
'foldToOtherRaisedStreet4': False,
'foldToStreet1CBChance': False,
'foldToStreet1CBDone': False,
'foldToStreet2CBChance': False,
'foldToStreet2CBDone': False,
'foldToStreet3CBChance': False,
'foldToStreet3CBDone': False,
'foldToStreet4CBChance': False,
'foldToStreet4CBDone': False,
'foldedBbToSteal': False,
'foldedSbToSteal': False,
'other3BStreet0': False,
'other4BStreet0': False,
'otherRaisedStreet0': False,
'otherRaisedStreet1': False,
'otherRaisedStreet2': False,
'otherRaisedStreet3': False,
'otherRaisedStreet4': False,
'position': 4,
'raiseFirstInChance': False,
'raisedFirstIn': False,
'rake': 0,
'sawShowdown': False,
'seatNo': 1,
'sitout': False,
'startCards': 0,
'startCash': 500,
'street0Aggr': False,
'street0Bets': 0,
'street0Calls': 0,
'street0Raises': 0,
'street0VPI': False,
'street0_3BChance': True,
'street0_3BDone': False,
'street0_4BChance': False,
'street0_4BDone': False,
'street1Aggr': False,
'street1Bets': 0,
'street1CBChance': False,
'street1CBDone': False,
'street1Calls': 0,
'street1CheckCallRaiseChance': False,
'street1CheckCallRaiseDone': False,
'street1Raises': 0,
'street1Seen': False,
'street2Aggr': False,
'street2Bets': 0,
'street2CBChance': False,
'street2CBDone': False,
'street2Calls': 0,
'street2CheckCallRaiseChance': False,
'street2CheckCallRaiseDone': False,
'street2Raises': 0,
'street2Seen': False,
'street3Aggr': False,
'street3Bets': 0,
'street3CBChance': False,
'street3CBDone': False,
'street3Calls': 0,
'street3CheckCallRaiseChance': False,
'street3CheckCallRaiseDone': False,
'street3Raises': 0,
'street3Seen': False,
'street4Aggr': False,
'street4Bets': 0,
'street4CBChance': False,
'street4CBDone': False,
'street4Calls': 0,
'street4CheckCallRaiseChance': False,
'street4CheckCallRaiseDone': False,
'street4Raises': 0,
'street4Seen': False,
'totalProfit': -5,
'tourneyTypeId': None,
'tourneysPlayersIds': None,
'winnings': 0,
'wonAtSD': 0.0,
'wonWhenSeenStreet1': 0.0,
'wonWhenSeenStreet2': 0.0,
'wonWhenSeenStreet3': 0.0,
'wonWhenSeenStreet4': 0.0},
u'Player2': { 'card1': 0,
'card2': 0,
'card3': 0,
'card4': 0,
'card5': 0,
'card6': 0,
'card7': 0,
'foldBbToStealChance': False,
'foldSbToStealChance': False,
'foldToOtherRaisedStreet0': False,
'foldToOtherRaisedStreet1': False,
'foldToOtherRaisedStreet2': False,
'foldToOtherRaisedStreet3': False,
'foldToOtherRaisedStreet4': False,
'foldToStreet1CBChance': False,
'foldToStreet1CBDone': False,
'foldToStreet2CBChance': False,
'foldToStreet2CBDone': False,
'foldToStreet3CBChance': False,
'foldToStreet3CBDone': False,
'foldToStreet4CBChance': False,
'foldToStreet4CBDone': False,
'foldedBbToSteal': False,
'foldedSbToSteal': False,
'other3BStreet0': False,
'other4BStreet0': False,
'otherRaisedStreet0': False,
'otherRaisedStreet1': False,
'otherRaisedStreet2': False,
'otherRaisedStreet3': False,
'otherRaisedStreet4': False,
'position': 3,
'raiseFirstInChance': False,
'raisedFirstIn': False,
'rake': 0,
'sawShowdown': False,
'seatNo': 2,
'sitout': False,
'startCards': 0,
'startCash': 500,
'street0Aggr': False,
'street0Bets': 0,
'street0Calls': 0,
'street0Raises': 0,
'street0VPI': False,
'street0_3BChance': True,
'street0_3BDone': False,
'street0_4BChance': False,
'street0_4BDone': False,
'street1Aggr': False,
'street1Bets': 0,
'street1CBChance': False,
'street1CBDone': False,
'street1Calls': 0,
'street1CheckCallRaiseChance': False,
'street1CheckCallRaiseDone': False,
'street1Raises': 0,
'street1Seen': False,
'street2Aggr': False,
'street2Bets': 0,
'street2CBChance': False,
'street2CBDone': False,
'street2Calls': 0,
'street2CheckCallRaiseChance': False,
'street2CheckCallRaiseDone': False,
'street2Raises': 0,
'street2Seen': False,
'street3Aggr': False,
'street3Bets': 0,
'street3CBChance': False,
'street3CBDone': False,
'street3Calls': 0,
'street3CheckCallRaiseChance': False,
'street3CheckCallRaiseDone': False,
'street3Raises': 0,
'street3Seen': False,
'street4Aggr': False,
'street4Bets': 0,
'street4CBChance': False,
'street4CBDone': False,
'street4Calls': 0,
'street4CheckCallRaiseChance': False,
'street4CheckCallRaiseDone': False,
'street4Raises': 0,
'street4Seen': False,
'totalProfit': 0,
'tourneyTypeId': None,
'tourneysPlayersIds': None,
'winnings': 0,
'wonAtSD': 0.0,
'wonWhenSeenStreet1': 0.0,
'wonWhenSeenStreet2': 0.0,
'wonWhenSeenStreet3': 0.0,
'wonWhenSeenStreet4': 0.0},
u'Player3': { 'card1': 10,
'card2': 42,
'card3': 0,
'card4': 0,
'card5': 0,
'card6': 0,
'card7': 0,
'foldBbToStealChance': False,
'foldSbToStealChance': False,
'foldToOtherRaisedStreet0': False,
'foldToOtherRaisedStreet1': False,
'foldToOtherRaisedStreet2': False,
'foldToOtherRaisedStreet3': False,
'foldToOtherRaisedStreet4': False,
'foldToStreet1CBChance': False,
'foldToStreet1CBDone': False,
'foldToStreet2CBChance': False,
'foldToStreet2CBDone': False,
'foldToStreet3CBChance': False,
'foldToStreet3CBDone': False,
'foldToStreet4CBChance': False,
'foldToStreet4CBDone': False,
'foldedBbToSteal': False,
'foldedSbToSteal': False,
'other3BStreet0': False,
'other4BStreet0': False,
'otherRaisedStreet0': False,
'otherRaisedStreet1': True,
'otherRaisedStreet2': False,
'otherRaisedStreet3': True,
'otherRaisedStreet4': False,
'position': 2,
'raiseFirstInChance': False,
'raisedFirstIn': False,
'rake': 58,
'sawShowdown': True,
'seatNo': 3,
'sitout': False,
'startCards': 36,
'startCash': 493,
'street0Aggr': False,
'street0Bets': 0,
'street0Calls': 1,
'street0Raises': 0,
'street0VPI': True,
'street0_3BChance': True,
'street0_3BDone': False,
'street0_4BChance': False,
'street0_4BDone': False,
'street1Aggr': False,
'street1Bets': 0,
'street1CBChance': False,
'street1CBDone': False,
'street1Calls': 1,
'street1CheckCallRaiseChance': False,
'street1CheckCallRaiseDone': False,
'street1Raises': 0,
'street1Seen': True,
'street2Aggr': False,
'street2Bets': 0,
'street2CBChance': False,
'street2CBDone': False,
'street2Calls': 0,
'street2CheckCallRaiseChance': False,
'street2CheckCallRaiseDone': False,
'street2Raises': 0,
'street2Seen': True,
'street3Aggr': False,
'street3Bets': 0,
'street3CBChance': False,
'street3CBDone': False,
'street3Calls': 1,
'street3CheckCallRaiseChance': False,
'street3CheckCallRaiseDone': False,
'street3Raises': 0,
'street3Seen': True,
'street4Aggr': False,
'street4Bets': 0,
'street4CBChance': False,
'street4CBDone': False,
'street4Calls': 0,
'street4CheckCallRaiseChance': False,
'street4CheckCallRaiseDone': False,
'street4Raises': 0,
'street4Seen': False,
'totalProfit': 599,
'tourneyTypeId': None,
'tourneysPlayersIds': None,
'winnings': 1092,
'wonAtSD': 1.0,
'wonWhenSeenStreet1': 1.0,
'wonWhenSeenStreet2': 1.0,
'wonWhenSeenStreet3': 1.0,
'wonWhenSeenStreet4': 0.0},
u'Player4': { 'card1': 20,
'card2': 7,
'card3': 0,
'card4': 0,
'card5': 0,
'card6': 0,
'card7': 0,
'foldBbToStealChance': False,
'foldSbToStealChance': False,
'foldToOtherRaisedStreet0': False,
'foldToOtherRaisedStreet1': False,
'foldToOtherRaisedStreet2': False,
'foldToOtherRaisedStreet3': False,
'foldToOtherRaisedStreet4': False,
'foldToStreet1CBChance': False,
'foldToStreet1CBDone': False,
'foldToStreet2CBChance': False,
'foldToStreet2CBDone': False,
'foldToStreet3CBChance': False,
'foldToStreet3CBDone': False,
'foldToStreet4CBChance': False,
'foldToStreet4CBDone': False,
'foldedBbToSteal': False,
'foldedSbToSteal': False,
'other3BStreet0': False,
'other4BStreet0': False,
'otherRaisedStreet0': False,
'otherRaisedStreet1': False,
'otherRaisedStreet2': False,
'otherRaisedStreet3': False,
'otherRaisedStreet4': False,
'position': 1,
'raiseFirstInChance': False,
'raisedFirstIn': False,
'rake': 0,
'sawShowdown': False,
'seatNo': 4,
'sitout': False,
'startCards': 85,
'startCash': 493,
'street0Aggr': False,
'street0Bets': 0,
'street0Calls': 0,
'street0Raises': 0,
'street0VPI': False,
'street0_3BChance': True,
'street0_3BDone': False,
'street0_4BChance': False,
'street0_4BDone': False,
'street1Aggr': False,
'street1Bets': 0,
'street1CBChance': False,
'street1CBDone': False,
'street1Calls': 0,
'street1CheckCallRaiseChance': False,
'street1CheckCallRaiseDone': False,
'street1Raises': 0,
'street1Seen': False,
'street2Aggr': False,
'street2Bets': 0,
'street2CBChance': False,
'street2CBDone': False,
'street2Calls': 0,
'street2CheckCallRaiseChance': False,
'street2CheckCallRaiseDone': False,
'street2Raises': 0,
'street2Seen': False,
'street3Aggr': False,
'street3Bets': 0,
'street3CBChance': False,
'street3CBDone': False,
'street3Calls': 0,
'street3CheckCallRaiseChance': False,
'street3CheckCallRaiseDone': False,
'street3Raises': 0,
'street3Seen': False,
'street4Aggr': False,
'street4Bets': 0,
'street4CBChance': False,
'street4CBDone': False,
'street4Calls': 0,
'street4CheckCallRaiseChance': False,
'street4CheckCallRaiseDone': False,
'street4Raises': 0,
'street4Seen': False,
'totalProfit': 0,
'tourneyTypeId': None,
'tourneysPlayersIds': None,
'winnings': 0,
'wonAtSD': 0.0,
'wonWhenSeenStreet1': 0.0,
'wonWhenSeenStreet2': 0.0,
'wonWhenSeenStreet3': 0.0,
'wonWhenSeenStreet4': 0.0},
u'Player5': { 'card1': 0,
'card2': 0,
'card3': 0,
'card4': 0,
'card5': 0,
'card6': 0,
'card7': 0,
'foldBbToStealChance': False,
'foldSbToStealChance': False,
'foldToOtherRaisedStreet0': False,
'foldToOtherRaisedStreet1': False,
'foldToOtherRaisedStreet2': False,
'foldToOtherRaisedStreet3': False,
'foldToOtherRaisedStreet4': False,
'foldToStreet1CBChance': False,
'foldToStreet1CBDone': False,
'foldToStreet2CBChance': False,
'foldToStreet2CBDone': False,
'foldToStreet3CBChance': False,
'foldToStreet3CBDone': False,
'foldToStreet4CBChance': False,
'foldToStreet4CBDone': False,
'foldedBbToSteal': False,
'foldedSbToSteal': False,
'other3BStreet0': False,
'other4BStreet0': False,
'otherRaisedStreet0': False,
'otherRaisedStreet1': False,
'otherRaisedStreet2': False,
'otherRaisedStreet3': False,
'otherRaisedStreet4': False,
'position': 0,
'raiseFirstInChance': False,
'raisedFirstIn': False,
'rake': 0,
'sawShowdown': False,
'seatNo': 5,
'sitout': False,
'startCards': 0,
'startCash': 358,
'street0Aggr': False,
'street0Bets': 0,
'street0Calls': 0,
'street0Raises': 0,
'street0VPI': False,
'street0_3BChance': True,
'street0_3BDone': False,
'street0_4BChance': False,
'street0_4BDone': False,
'street1Aggr': False,
'street1Bets': 0,
'street1CBChance': False,
'street1CBDone': False,
'street1Calls': 0,
'street1CheckCallRaiseChance': False,
'street1CheckCallRaiseDone': False,
'street1Raises': 0,
'street1Seen': False,
'street2Aggr': False,
'street2Bets': 0,
'street2CBChance': False,
'street2CBDone': False,
'street2Calls': 0,
'street2CheckCallRaiseChance': False,
'street2CheckCallRaiseDone': False,
'street2Raises': 0,
'street2Seen': False,
'street3Aggr': False,
'street3Bets': 0,
'street3CBChance': False,
'street3CBDone': False,
'street3Calls': 0,
'street3CheckCallRaiseChance': False,
'street3CheckCallRaiseDone': False,
'street3Raises': 0,
'street3Seen': False,
'street4Aggr': False,
'street4Bets': 0,
'street4CBChance': False,
'street4CBDone': False,
'street4Calls': 0,
'street4CheckCallRaiseChance': False,
'street4CheckCallRaiseDone': False,
'street4Raises': 0,
'street4Seen': False,
'totalProfit': 0,
'tourneyTypeId': None,
'tourneysPlayersIds': None,
'winnings': 0,
'wonAtSD': 0.0,
'wonWhenSeenStreet1': 0.0,
'wonWhenSeenStreet2': 0.0,
'wonWhenSeenStreet3': 0.0,
'wonWhenSeenStreet4': 0.0},
u'Player6': { 'card1': 0,
'card2': 0,
'card3': 0,
'card4': 0,
'card5': 0,
'card6': 0,
'card7': 0,
'foldBbToStealChance': False,
'foldSbToStealChance': False,
'foldToOtherRaisedStreet0': False,
'foldToOtherRaisedStreet1': False,
'foldToOtherRaisedStreet2': False,
'foldToOtherRaisedStreet3': False,
'foldToOtherRaisedStreet4': False,
'foldToStreet1CBChance': False,
'foldToStreet1CBDone': False,
'foldToStreet2CBChance': False,
'foldToStreet2CBDone': False,
'foldToStreet3CBChance': False,
'foldToStreet3CBDone': False,
'foldToStreet4CBChance': False,
'foldToStreet4CBDone': False,
'foldedBbToSteal': False,
'foldedSbToSteal': False,
'other3BStreet0': False,
'other4BStreet0': False,
'otherRaisedStreet0': False,
'otherRaisedStreet1': False,
'otherRaisedStreet2': False,
'otherRaisedStreet3': False,
'otherRaisedStreet4': False,
'position': 'S',
'raiseFirstInChance': False,
'raisedFirstIn': False,
'rake': 0,
'sawShowdown': False,
'seatNo': 6,
'sitout': False,
'startCards': 0,
'startCash': 198,
'street0Aggr': False,
'street0Bets': 0,
'street0Calls': 0,
'street0Raises': 0,
'street0VPI': False,
'street0_3BChance': True,
'street0_3BDone': False,
'street0_4BChance': False,
'street0_4BDone': False,
'street1Aggr': False,
'street1Bets': 0,
'street1CBChance': False,
'street1CBDone': False,
'street1Calls': 0,
'street1CheckCallRaiseChance': False,
'street1CheckCallRaiseDone': False,
'street1Raises': 0,
'street1Seen': False,
'street2Aggr': False,
'street2Bets': 0,
'street2CBChance': False,
'street2CBDone': False,
'street2Calls': 0,
'street2CheckCallRaiseChance': False,
'street2CheckCallRaiseDone': False,
'street2Raises': 0,
'street2Seen': False,
'street3Aggr': False,
'street3Bets': 0,
'street3CBChance': False,
'street3CBDone': False,
'street3Calls': 0,
'street3CheckCallRaiseChance': False,
'street3CheckCallRaiseDone': False,
'street3Raises': 0,
'street3Seen': False,
'street4Aggr': False,
'street4Bets': 0,
'street4CBChance': False,
'street4CBDone': False,
'street4Calls': 0,
'street4CheckCallRaiseChance': False,
'street4CheckCallRaiseDone': False,
'street4Raises': 0,
'street4Seen': False,
'totalProfit': -2,
'tourneyTypeId': None,
'tourneysPlayersIds': None,
'winnings': 0,
'wonAtSD': 0.0,
'wonWhenSeenStreet1': 0.0,
'wonWhenSeenStreet2': 0.0,
'wonWhenSeenStreet3': 0.0,
'wonWhenSeenStreet4': 0.0},
u'Player7': { 'card1': 0,
'card2': 0,
'card3': 0,
'card4': 0,
'card5': 0,
'card6': 0,
'card7': 0,
'foldBbToStealChance': False,
'foldSbToStealChance': False,
'foldToOtherRaisedStreet0': False,
'foldToOtherRaisedStreet1': False,
'foldToOtherRaisedStreet2': False,
'foldToOtherRaisedStreet3': False,
'foldToOtherRaisedStreet4': False,
'foldToStreet1CBChance': False,
'foldToStreet1CBDone': False,
'foldToStreet2CBChance': False,
'foldToStreet2CBDone': False,
'foldToStreet3CBChance': False,
'foldToStreet3CBDone': False,
'foldToStreet4CBChance': False,
'foldToStreet4CBDone': False,
'foldedBbToSteal': False,
'foldedSbToSteal': False,
'other3BStreet0': False,
'other4BStreet0': False,
'otherRaisedStreet0': False,
'otherRaisedStreet1': False,
'otherRaisedStreet2': False,
'otherRaisedStreet3': False,
'otherRaisedStreet4': False,
'position': 'B',
'raiseFirstInChance': False,
'raisedFirstIn': False,
'rake': 0,
'sawShowdown': False,
'seatNo': 7,
'sitout': False,
'startCards': 0,
'startCash': 295,
'street0Aggr': False,
'street0Bets': 0,
'street0Calls': 0,
'street0Raises': 0,
'street0VPI': False,
'street0_3BChance': True,
'street0_3BDone': False,
'street0_4BChance': False,
'street0_4BDone': False,
'street1Aggr': False,
'street1Bets': 0,
'street1CBChance': False,
'street1CBDone': False,
'street1Calls': 0,
'street1CheckCallRaiseChance': False,
'street1CheckCallRaiseDone': False,
'street1Raises': 0,
'street1Seen': False,
'street2Aggr': False,
'street2Bets': 0,
'street2CBChance': False,
'street2CBDone': False,
'street2Calls': 0,
'street2CheckCallRaiseChance': False,
'street2CheckCallRaiseDone': False,
'street2Raises': 0,
'street2Seen': False,
'street3Aggr': False,
'street3Bets': 0,
'street3CBChance': False,
'street3CBDone': False,
'street3Calls': 0,
'street3CheckCallRaiseChance': False,
'street3CheckCallRaiseDone': False,
'street3Raises': 0,
'street3Seen': False,
'street4Aggr': False,
'street4Bets': 0,
'street4CBChance': False,
'street4CBDone': False,
'street4Calls': 0,
'street4CheckCallRaiseChance': False,
'street4CheckCallRaiseDone': False,
'street4Raises': 0,
'street4Seen': False,
'totalProfit': -5,
'tourneyTypeId': None,
'tourneysPlayersIds': None,
'winnings': 0,
'wonAtSD': 0.0,
'wonWhenSeenStreet1': 0.0,
'wonWhenSeenStreet2': 0.0,
'wonWhenSeenStreet3': 0.0,
'wonWhenSeenStreet4': 0.0},
u'Player8': { 'card1': 39,
'card2': 32,
'card3': 0,
'card4': 0,
'card5': 0,
'card6': 0,
'card7': 0,
'foldBbToStealChance': False,
'foldSbToStealChance': False,
'foldToOtherRaisedStreet0': False,
'foldToOtherRaisedStreet1': False,
'foldToOtherRaisedStreet2': False,
'foldToOtherRaisedStreet3': False,
'foldToOtherRaisedStreet4': False,
'foldToStreet1CBChance': False,
'foldToStreet1CBDone': False,
'foldToStreet2CBChance': False,
'foldToStreet2CBDone': False,
'foldToStreet3CBChance': False,
'foldToStreet3CBDone': False,
'foldToStreet4CBChance': False,
'foldToStreet4CBDone': False,
'foldedBbToSteal': False,
'foldedSbToSteal': False,
'other3BStreet0': False,
'other4BStreet0': False,
'otherRaisedStreet0': False,
'otherRaisedStreet1': True,
'otherRaisedStreet2': False,
'otherRaisedStreet3': False,
'otherRaisedStreet4': False,
'position': 6,
'raiseFirstInChance': True,
'raisedFirstIn': True,
'rake': 0,
'sawShowdown': True,
'seatNo': 8,
'sitout': False,
'startCards': 162,
'startCash': 643,
'street0Aggr': True,
'street0Bets': 0,
'street0Calls': 0,
'street0Raises': 0,
'street0VPI': True,
'street0_3BChance': False,
'street0_3BDone': False,
'street0_4BChance': False,
'street0_4BDone': False,
'street1Aggr': True,
'street1Bets': 1,
'street1CBChance': True,
'street1CBDone': True,
'street1Calls': 1,
'street1CheckCallRaiseChance': False,
'street1CheckCallRaiseDone': False,
'street1Raises': 0,
'street1Seen': True,
'street2Aggr': False,
'street2Bets': 0,
'street2CBChance': False,
'street2CBDone': False,
'street2Calls': 0,
'street2CheckCallRaiseChance': False,
'street2CheckCallRaiseDone': False,
'street2Raises': 0,
'street2Seen': True,
'street3Aggr': True,
'street3Bets': 1,
'street3CBChance': False,
'street3CBDone': False,
'street3Calls': 0,
'street3CheckCallRaiseChance': False,
'street3CheckCallRaiseDone': False,
'street3Raises': 0,
'street3Seen': True,
'street4Aggr': False,
'street4Bets': 0,
'street4CBChance': False,
'street4CBDone': False,
'street4Calls': 0,
'street4CheckCallRaiseChance': False,
'street4CheckCallRaiseDone': False,
'street4Raises': 0,
'street4Seen': False,
'totalProfit': -493,
'tourneyTypeId': None,
'tourneysPlayersIds': None,
'winnings': 0,
'wonAtSD': 0.0,
'wonWhenSeenStreet1': 0.0,
'wonWhenSeenStreet2': 0.0,
'wonWhenSeenStreet3': 0.0,
'wonWhenSeenStreet4': 0.0},
u'Player9': { 'card1': 0,
'card2': 0,
'card3': 0,
'card4': 0,
'card5': 0,
'card6': 0,
'card7': 0,
'foldBbToStealChance': False,
'foldSbToStealChance': False,
'foldToOtherRaisedStreet0': False,
'foldToOtherRaisedStreet1': False,
'foldToOtherRaisedStreet2': False,
'foldToOtherRaisedStreet3': True,
'foldToOtherRaisedStreet4': False,
'foldToStreet1CBChance': False,
'foldToStreet1CBDone': False,
'foldToStreet2CBChance': False,
'foldToStreet2CBDone': False,
'foldToStreet3CBChance': False,
'foldToStreet3CBDone': False,
'foldToStreet4CBChance': False,
'foldToStreet4CBDone': False,
'foldedBbToSteal': False,
'foldedSbToSteal': False,
'other3BStreet0': False,
'other4BStreet0': False,
'otherRaisedStreet0': False,
'otherRaisedStreet1': True,
'otherRaisedStreet2': False,
'otherRaisedStreet3': True,
'otherRaisedStreet4': False,
'position': 5,
'raiseFirstInChance': False,
'raisedFirstIn': False,
'rake': 0,
'sawShowdown': False,
'seatNo': 9,
'sitout': False,
'startCards': 0,
'startCash': 652,
'street0Aggr': False,
'street0Bets': 0,
'street0Calls': 1,
'street0Raises': 0,
'street0VPI': True,
'street0_3BChance': True,
'street0_3BDone': False,
'street0_4BChance': False,
'street0_4BDone': False,
'street1Aggr': True,
'street1Bets': 0,
'street1CBChance': False,
'street1CBDone': False,
'street1Calls': 0,
'street1CheckCallRaiseChance': False,
'street1CheckCallRaiseDone': False,
'street1Raises': 0,
'street1Seen': True,
'street2Aggr': False,
'street2Bets': 0,
'street2CBChance': True,
'street2CBDone': False,
'street2Calls': 0,
'street2CheckCallRaiseChance': False,
'street2CheckCallRaiseDone': False,
'street2Raises': 0,
'street2Seen': True,
'street3Aggr': False,
'street3Bets': 0,
'street3CBChance': False,
'street3CBDone': False,
'street3Calls': 0,
'street3CheckCallRaiseChance': False,
'street3CheckCallRaiseDone': False,
'street3Raises': 0,
'street3Seen': True,
'street4Aggr': False,
'street4Bets': 0,
'street4CBChance': False,
'street4CBDone': False,
'street4Calls': 0,
'street4CheckCallRaiseChance': False,
'street4CheckCallRaiseDone': False,
'street4Raises': 0,
'street4Seen': False,
'totalProfit': -152,
'tourneyTypeId': None,
'tourneysPlayersIds': None,
'winnings': 0,
'wonAtSD': 0.0,
'wonWhenSeenStreet1': 0.0,
'wonWhenSeenStreet2': 0.0,
'wonWhenSeenStreet3': 0.0,
'wonWhenSeenStreet4': 0.0}}

View File

@ -0,0 +1,57 @@
Winamax Poker - CashGame - HandId: #270777-217-1284853532 - Omaha pot limit (0.02€/0.05€) - 2010/09/19 01:45:32 UTC
Table: 'Petit-Bourg' 9-max (real money) Seat #4 is the button
Seat 1: Player22 (9.10€)
Seat 2: Player25 (1.45€)
Seat 3: Player17 (0€)
Seat 4: Player5 (12.92€)
Seat 5: Player7 (0.99€)
Seat 6: Player10 (5.21€)
Seat 7: Player20 (5.05€)
Seat 8: Player13 (12.71€)
Seat 9: Player14 (4.73€)
*** ANTE/BLINDS ***
Player7 posts small blind 0.02€
Player10 posts big blind 0.05€
Player25 posts big blind 0.05€ out of position
Dealt to Player13 [9h 3c 4h 4c]
*** PRE-FLOP ***
Player20 folds
Player13 folds
Player14 calls 0.05€
Player22 calls 0.05€
Player25 raises 0.22€ to 0.27€
Player5 calls 0.27€
Player7 calls 0.25€
Player10 calls 0.22€
Player14 folds
Player22 calls 0.22€
*** FLOP *** [Kc Jd 7h]
Player7 checks
Player10 bets 1.40€
Player22 folds
Player25 calls 1.18€ and is all-in
Player5 folds
Player7 calls 0.72€ and is all-in
*** TURN *** [Kc Jd 7h][9c]
*** RIVER *** [Kc Jd 7h 9c][Js]
*** SHOW DOWN ***
Player7 shows [Ad Jc Jh 6c] (Quads of Jack)
Player25 shows [9s Kh 3d Ks] (Full of King and Jack)
Player10 shows [7c 7d 6h 8s] (Full of 7 and Jack)
Player10 collected 0.22€ from side pot 2
Player25 collected 0.88€ from side pot 1
Player7 collected 3.38€ from main pot
*** SUMMARY ***
Total pot 4.48€ | Rake 0.22€
Board: [Kc Jd 7h 9c Js]
Seat 1: Player22 folded on the flop
Seat 2: Player25 showed [9s Kh 3d Ks] and won 0.88€ with Full of King and Jack
Seat 3: Player17 folded
Seat 4: Player5 (button) folded on the flop
Seat 5: Player7 (small blind) showed [Ad Jc Jh 6c] and won 3.38€ with Quads of Jack
Seat 6: Player10 (big blind) showed [7c 7d 6h 8s] and won 0.22€ with Full of 7 and Jack
Seat 7: Player20 folded on the pre-flop
Seat 8: Player13 folded on the pre-flop
Seat 9: Player14 folded on the pre-flop

View File

@ -0,0 +1,846 @@
{ u'Player10': { 'card1': 32,
'card2': 19,
'card3': 5,
'card4': 46,
'card5': 0,
'card6': 0,
'card7': 0,
'foldBbToStealChance': False,
'foldSbToStealChance': False,
'foldToOtherRaisedStreet0': False,
'foldToOtherRaisedStreet1': False,
'foldToOtherRaisedStreet2': False,
'foldToOtherRaisedStreet3': False,
'foldToOtherRaisedStreet4': False,
'foldToStreet1CBChance': False,
'foldToStreet1CBDone': False,
'foldToStreet2CBChance': False,
'foldToStreet2CBDone': False,
'foldToStreet3CBChance': False,
'foldToStreet3CBDone': False,
'foldToStreet4CBChance': False,
'foldToStreet4CBDone': False,
'foldedBbToSteal': False,
'foldedSbToSteal': False,
'other3BStreet0': False,
'other4BStreet0': False,
'otherRaisedStreet0': False,
'otherRaisedStreet1': False,
'otherRaisedStreet2': False,
'otherRaisedStreet3': False,
'otherRaisedStreet4': False,
'position': 'B',
'raiseFirstInChance': False,
'raisedFirstIn': False,
'rake': 0,
'sawShowdown': True,
'seatNo': 6,
'sitout': False,
'startCards': 0,
'startCash': 521,
'street0Aggr': False,
'street0Bets': 0,
'street0Calls': 1,
'street0Raises': 0,
'street0VPI': True,
'street0_3BChance': True,
'street0_3BDone': False,
'street0_4BChance': False,
'street0_4BDone': False,
'street1Aggr': True,
'street1Bets': 1,
'street1CBChance': False,
'street1CBDone': False,
'street1Calls': 0,
'street1CheckCallRaiseChance': False,
'street1CheckCallRaiseDone': False,
'street1Raises': 0,
'street1Seen': True,
'street2Aggr': False,
'street2Bets': 0,
'street2CBChance': False,
'street2CBDone': False,
'street2Calls': 0,
'street2CheckCallRaiseChance': False,
'street2CheckCallRaiseDone': False,
'street2Raises': 0,
'street2Seen': False,
'street3Aggr': False,
'street3Bets': 0,
'street3CBChance': False,
'street3CBDone': False,
'street3Calls': 0,
'street3CheckCallRaiseChance': False,
'street3CheckCallRaiseDone': False,
'street3Raises': 0,
'street3Seen': False,
'street4Aggr': False,
'street4Bets': 0,
'street4CBChance': False,
'street4CBDone': False,
'street4Calls': 0,
'street4CheckCallRaiseChance': False,
'street4CheckCallRaiseDone': False,
'street4Raises': 0,
'street4Seen': False,
'totalProfit': -145,
'tourneyTypeId': None,
'tourneysPlayersIds': None,
'winnings': 0,
'wonAtSD': 0.0,
'wonWhenSeenStreet1': 0.0,
'wonWhenSeenStreet2': 0.0,
'wonWhenSeenStreet3': 0.0,
'wonWhenSeenStreet4': 0.0},
u'Player13': { 'card1': 8,
'card2': 28,
'card3': 3,
'card4': 29,
'card5': 0,
'card6': 0,
'card7': 0,
'foldBbToStealChance': False,
'foldSbToStealChance': False,
'foldToOtherRaisedStreet0': False,
'foldToOtherRaisedStreet1': False,
'foldToOtherRaisedStreet2': False,
'foldToOtherRaisedStreet3': False,
'foldToOtherRaisedStreet4': False,
'foldToStreet1CBChance': False,
'foldToStreet1CBDone': False,
'foldToStreet2CBChance': False,
'foldToStreet2CBDone': False,
'foldToStreet3CBChance': False,
'foldToStreet3CBDone': False,
'foldToStreet4CBChance': False,
'foldToStreet4CBDone': False,
'foldedBbToSteal': False,
'foldedSbToSteal': False,
'other3BStreet0': False,
'other4BStreet0': False,
'otherRaisedStreet0': False,
'otherRaisedStreet1': False,
'otherRaisedStreet2': False,
'otherRaisedStreet3': False,
'otherRaisedStreet4': False,
'position': 4,
'raiseFirstInChance': True,
'raisedFirstIn': False,
'rake': 0,
'sawShowdown': False,
'seatNo': 8,
'sitout': False,
'startCards': 0,
'startCash': 1271,
'street0Aggr': False,
'street0Bets': 0,
'street0Calls': 0,
'street0Raises': 0,
'street0VPI': False,
'street0_3BChance': False,
'street0_3BDone': False,
'street0_4BChance': False,
'street0_4BDone': False,
'street1Aggr': False,
'street1Bets': 0,
'street1CBChance': False,
'street1CBDone': False,
'street1Calls': 0,
'street1CheckCallRaiseChance': False,
'street1CheckCallRaiseDone': False,
'street1Raises': 0,
'street1Seen': False,
'street2Aggr': False,
'street2Bets': 0,
'street2CBChance': False,
'street2CBDone': False,
'street2Calls': 0,
'street2CheckCallRaiseChance': False,
'street2CheckCallRaiseDone': False,
'street2Raises': 0,
'street2Seen': False,
'street3Aggr': False,
'street3Bets': 0,
'street3CBChance': False,
'street3CBDone': False,
'street3Calls': 0,
'street3CheckCallRaiseChance': False,
'street3CheckCallRaiseDone': False,
'street3Raises': 0,
'street3Seen': False,
'street4Aggr': False,
'street4Bets': 0,
'street4CBChance': False,
'street4CBDone': False,
'street4Calls': 0,
'street4CheckCallRaiseChance': False,
'street4CheckCallRaiseDone': False,
'street4Raises': 0,
'street4Seen': False,
'totalProfit': 0,
'tourneyTypeId': None,
'tourneysPlayersIds': None,
'winnings': 0,
'wonAtSD': 0.0,
'wonWhenSeenStreet1': 0.0,
'wonWhenSeenStreet2': 0.0,
'wonWhenSeenStreet3': 0.0,
'wonWhenSeenStreet4': 0.0},
u'Player14': { 'card1': 0,
'card2': 0,
'card3': 0,
'card4': 0,
'card5': 0,
'card6': 0,
'card7': 0,
'foldBbToStealChance': False,
'foldSbToStealChance': False,
'foldToOtherRaisedStreet0': False,
'foldToOtherRaisedStreet1': False,
'foldToOtherRaisedStreet2': False,
'foldToOtherRaisedStreet3': False,
'foldToOtherRaisedStreet4': False,
'foldToStreet1CBChance': False,
'foldToStreet1CBDone': False,
'foldToStreet2CBChance': False,
'foldToStreet2CBDone': False,
'foldToStreet3CBChance': False,
'foldToStreet3CBDone': False,
'foldToStreet4CBChance': False,
'foldToStreet4CBDone': False,
'foldedBbToSteal': False,
'foldedSbToSteal': False,
'other3BStreet0': False,
'other4BStreet0': False,
'otherRaisedStreet0': False,
'otherRaisedStreet1': False,
'otherRaisedStreet2': False,
'otherRaisedStreet3': False,
'otherRaisedStreet4': False,
'position': 3,
'raiseFirstInChance': True,
'raisedFirstIn': False,
'rake': 0,
'sawShowdown': False,
'seatNo': 9,
'sitout': False,
'startCards': 0,
'startCash': 473,
'street0Aggr': False,
'street0Bets': 0,
'street0Calls': 1,
'street0Raises': 0,
'street0VPI': True,
'street0_3BChance': True,
'street0_3BDone': False,
'street0_4BChance': False,
'street0_4BDone': False,
'street1Aggr': False,
'street1Bets': 0,
'street1CBChance': False,
'street1CBDone': False,
'street1Calls': 0,
'street1CheckCallRaiseChance': False,
'street1CheckCallRaiseDone': False,
'street1Raises': 0,
'street1Seen': False,
'street2Aggr': False,
'street2Bets': 0,
'street2CBChance': False,
'street2CBDone': False,
'street2Calls': 0,
'street2CheckCallRaiseChance': False,
'street2CheckCallRaiseDone': False,
'street2Raises': 0,
'street2Seen': False,
'street3Aggr': False,
'street3Bets': 0,
'street3CBChance': False,
'street3CBDone': False,
'street3Calls': 0,
'street3CheckCallRaiseChance': False,
'street3CheckCallRaiseDone': False,
'street3Raises': 0,
'street3Seen': False,
'street4Aggr': False,
'street4Bets': 0,
'street4CBChance': False,
'street4CBDone': False,
'street4Calls': 0,
'street4CheckCallRaiseChance': False,
'street4CheckCallRaiseDone': False,
'street4Raises': 0,
'street4Seen': False,
'totalProfit': -5,
'tourneyTypeId': None,
'tourneysPlayersIds': None,
'winnings': 0,
'wonAtSD': 0.0,
'wonWhenSeenStreet1': 0.0,
'wonWhenSeenStreet2': 0.0,
'wonWhenSeenStreet3': 0.0,
'wonWhenSeenStreet4': 0.0},
u'Player17': { 'card1': 0,
'card2': 0,
'card3': 0,
'card4': 0,
'card5': 0,
'card6': 0,
'card7': 0,
'foldBbToStealChance': False,
'foldSbToStealChance': False,
'foldToOtherRaisedStreet0': False,
'foldToOtherRaisedStreet1': False,
'foldToOtherRaisedStreet2': False,
'foldToOtherRaisedStreet3': False,
'foldToOtherRaisedStreet4': False,
'foldToStreet1CBChance': False,
'foldToStreet1CBDone': False,
'foldToStreet2CBChance': False,
'foldToStreet2CBDone': False,
'foldToStreet3CBChance': False,
'foldToStreet3CBDone': False,
'foldToStreet4CBChance': False,
'foldToStreet4CBDone': False,
'foldedBbToSteal': False,
'foldedSbToSteal': False,
'other3BStreet0': False,
'other4BStreet0': False,
'otherRaisedStreet0': False,
'otherRaisedStreet1': False,
'otherRaisedStreet2': False,
'otherRaisedStreet3': False,
'otherRaisedStreet4': False,
'position': 2,
'raiseFirstInChance': False,
'raisedFirstIn': False,
'rake': 0,
'sawShowdown': False,
'seatNo': 3,
'sitout': False,
'startCards': 0,
'startCash': 0,
'street0Aggr': False,
'street0Bets': 0,
'street0Calls': 0,
'street0Raises': 0,
'street0VPI': False,
'street0_3BChance': False,
'street0_3BDone': False,
'street0_4BChance': False,
'street0_4BDone': False,
'street1Aggr': False,
'street1Bets': 0,
'street1CBChance': False,
'street1CBDone': False,
'street1Calls': 0,
'street1CheckCallRaiseChance': False,
'street1CheckCallRaiseDone': False,
'street1Raises': 0,
'street1Seen': False,
'street2Aggr': False,
'street2Bets': 0,
'street2CBChance': False,
'street2CBDone': False,
'street2Calls': 0,
'street2CheckCallRaiseChance': False,
'street2CheckCallRaiseDone': False,
'street2Raises': 0,
'street2Seen': False,
'street3Aggr': False,
'street3Bets': 0,
'street3CBChance': False,
'street3CBDone': False,
'street3Calls': 0,
'street3CheckCallRaiseChance': False,
'street3CheckCallRaiseDone': False,
'street3Raises': 0,
'street3Seen': False,
'street4Aggr': False,
'street4Bets': 0,
'street4CBChance': False,
'street4CBDone': False,
'street4Calls': 0,
'street4CheckCallRaiseChance': False,
'street4CheckCallRaiseDone': False,
'street4Raises': 0,
'street4Seen': False,
'totalProfit': 0,
'tourneyTypeId': None,
'tourneysPlayersIds': None,
'winnings': 0,
'wonAtSD': 0.0,
'wonWhenSeenStreet1': 0.0,
'wonWhenSeenStreet2': 0.0,
'wonWhenSeenStreet3': 0.0,
'wonWhenSeenStreet4': 0.0},
u'Player20': { 'card1': 0,
'card2': 0,
'card3': 0,
'card4': 0,
'card5': 0,
'card6': 0,
'card7': 0,
'foldBbToStealChance': False,
'foldSbToStealChance': False,
'foldToOtherRaisedStreet0': False,
'foldToOtherRaisedStreet1': False,
'foldToOtherRaisedStreet2': False,
'foldToOtherRaisedStreet3': False,
'foldToOtherRaisedStreet4': False,
'foldToStreet1CBChance': False,
'foldToStreet1CBDone': False,
'foldToStreet2CBChance': False,
'foldToStreet2CBDone': False,
'foldToStreet3CBChance': False,
'foldToStreet3CBDone': False,
'foldToStreet4CBChance': False,
'foldToStreet4CBDone': False,
'foldedBbToSteal': False,
'foldedSbToSteal': False,
'other3BStreet0': False,
'other4BStreet0': False,
'otherRaisedStreet0': False,
'otherRaisedStreet1': False,
'otherRaisedStreet2': False,
'otherRaisedStreet3': False,
'otherRaisedStreet4': False,
'position': 5,
'raiseFirstInChance': True,
'raisedFirstIn': False,
'rake': 0,
'sawShowdown': False,
'seatNo': 7,
'sitout': False,
'startCards': 0,
'startCash': 505,
'street0Aggr': False,
'street0Bets': 0,
'street0Calls': 0,
'street0Raises': 0,
'street0VPI': False,
'street0_3BChance': False,
'street0_3BDone': False,
'street0_4BChance': False,
'street0_4BDone': False,
'street1Aggr': False,
'street1Bets': 0,
'street1CBChance': False,
'street1CBDone': False,
'street1Calls': 0,
'street1CheckCallRaiseChance': False,
'street1CheckCallRaiseDone': False,
'street1Raises': 0,
'street1Seen': False,
'street2Aggr': False,
'street2Bets': 0,
'street2CBChance': False,
'street2CBDone': False,
'street2Calls': 0,
'street2CheckCallRaiseChance': False,
'street2CheckCallRaiseDone': False,
'street2Raises': 0,
'street2Seen': False,
'street3Aggr': False,
'street3Bets': 0,
'street3CBChance': False,
'street3CBDone': False,
'street3Calls': 0,
'street3CheckCallRaiseChance': False,
'street3CheckCallRaiseDone': False,
'street3Raises': 0,
'street3Seen': False,
'street4Aggr': False,
'street4Bets': 0,
'street4CBChance': False,
'street4CBDone': False,
'street4Calls': 0,
'street4CheckCallRaiseChance': False,
'street4CheckCallRaiseDone': False,
'street4Raises': 0,
'street4Seen': False,
'totalProfit': 0,
'tourneyTypeId': None,
'tourneysPlayersIds': None,
'winnings': 0,
'wonAtSD': 0.0,
'wonWhenSeenStreet1': 0.0,
'wonWhenSeenStreet2': 0.0,
'wonWhenSeenStreet3': 0.0,
'wonWhenSeenStreet4': 0.0},
u'Player22': { 'card1': 0,
'card2': 0,
'card3': 0,
'card4': 0,
'card5': 0,
'card6': 0,
'card7': 0,
'foldBbToStealChance': False,
'foldSbToStealChance': False,
'foldToOtherRaisedStreet0': False,
'foldToOtherRaisedStreet1': True,
'foldToOtherRaisedStreet2': False,
'foldToOtherRaisedStreet3': False,
'foldToOtherRaisedStreet4': False,
'foldToStreet1CBChance': False,
'foldToStreet1CBDone': False,
'foldToStreet2CBChance': False,
'foldToStreet2CBDone': False,
'foldToStreet3CBChance': False,
'foldToStreet3CBDone': False,
'foldToStreet4CBChance': False,
'foldToStreet4CBDone': False,
'foldedBbToSteal': False,
'foldedSbToSteal': False,
'other3BStreet0': False,
'other4BStreet0': False,
'otherRaisedStreet0': False,
'otherRaisedStreet1': True,
'otherRaisedStreet2': False,
'otherRaisedStreet3': False,
'otherRaisedStreet4': False,
'position': 2,
'raiseFirstInChance': False,
'raisedFirstIn': False,
'rake': 0,
'sawShowdown': False,
'seatNo': 1,
'sitout': False,
'startCards': 0,
'startCash': 910,
'street0Aggr': False,
'street0Bets': 0,
'street0Calls': 2,
'street0Raises': 0,
'street0VPI': True,
'street0_3BChance': True,
'street0_3BDone': False,
'street0_4BChance': False,
'street0_4BDone': False,
'street1Aggr': False,
'street1Bets': 0,
'street1CBChance': False,
'street1CBDone': False,
'street1Calls': 0,
'street1CheckCallRaiseChance': False,
'street1CheckCallRaiseDone': False,
'street1Raises': 0,
'street1Seen': True,
'street2Aggr': False,
'street2Bets': 0,
'street2CBChance': False,
'street2CBDone': False,
'street2Calls': 0,
'street2CheckCallRaiseChance': False,
'street2CheckCallRaiseDone': False,
'street2Raises': 0,
'street2Seen': False,
'street3Aggr': False,
'street3Bets': 0,
'street3CBChance': False,
'street3CBDone': False,
'street3Calls': 0,
'street3CheckCallRaiseChance': False,
'street3CheckCallRaiseDone': False,
'street3Raises': 0,
'street3Seen': False,
'street4Aggr': False,
'street4Bets': 0,
'street4CBChance': False,
'street4CBDone': False,
'street4Calls': 0,
'street4CheckCallRaiseChance': False,
'street4CheckCallRaiseDone': False,
'street4Raises': 0,
'street4Seen': False,
'totalProfit': -27,
'tourneyTypeId': None,
'tourneysPlayersIds': None,
'winnings': 0,
'wonAtSD': 0.0,
'wonWhenSeenStreet1': 0.0,
'wonWhenSeenStreet2': 0.0,
'wonWhenSeenStreet3': 0.0,
'wonWhenSeenStreet4': 0.0},
u'Player25': { 'card1': 47,
'card2': 12,
'card3': 15,
'card4': 51,
'card5': 0,
'card6': 0,
'card7': 0,
'foldBbToStealChance': False,
'foldSbToStealChance': False,
'foldToOtherRaisedStreet0': False,
'foldToOtherRaisedStreet1': False,
'foldToOtherRaisedStreet2': False,
'foldToOtherRaisedStreet3': False,
'foldToOtherRaisedStreet4': False,
'foldToStreet1CBChance': False,
'foldToStreet1CBDone': False,
'foldToStreet2CBChance': False,
'foldToStreet2CBDone': False,
'foldToStreet3CBChance': False,
'foldToStreet3CBDone': False,
'foldToStreet4CBChance': False,
'foldToStreet4CBDone': False,
'foldedBbToSteal': False,
'foldedSbToSteal': False,
'other3BStreet0': False,
'other4BStreet0': False,
'otherRaisedStreet0': False,
'otherRaisedStreet1': True,
'otherRaisedStreet2': False,
'otherRaisedStreet3': False,
'otherRaisedStreet4': False,
'position': 1,
'raiseFirstInChance': False,
'raisedFirstIn': False,
'rake': 0,
'sawShowdown': True,
'seatNo': 2,
'sitout': False,
'startCards': 0,
'startCash': 145,
'street0Aggr': True,
'street0Bets': 0,
'street0Calls': 0,
'street0Raises': 0,
'street0VPI': True,
'street0_3BChance': False,
'street0_3BDone': False,
'street0_4BChance': False,
'street0_4BDone': False,
'street1Aggr': False,
'street1Bets': 0,
'street1CBChance': False,
'street1CBDone': False,
'street1Calls': 1,
'street1CheckCallRaiseChance': False,
'street1CheckCallRaiseDone': False,
'street1Raises': 0,
'street1Seen': True,
'street2Aggr': False,
'street2Bets': 0,
'street2CBChance': False,
'street2CBDone': False,
'street2Calls': 0,
'street2CheckCallRaiseChance': False,
'street2CheckCallRaiseDone': False,
'street2Raises': 0,
'street2Seen': False,
'street3Aggr': False,
'street3Bets': 0,
'street3CBChance': False,
'street3CBDone': False,
'street3Calls': 0,
'street3CheckCallRaiseChance': False,
'street3CheckCallRaiseDone': False,
'street3Raises': 0,
'street3Seen': False,
'street4Aggr': False,
'street4Bets': 0,
'street4CBChance': False,
'street4CBDone': False,
'street4Calls': 0,
'street4CheckCallRaiseChance': False,
'street4CheckCallRaiseDone': False,
'street4Raises': 0,
'street4Seen': False,
'totalProfit': -57,
'tourneyTypeId': None,
'tourneysPlayersIds': None,
'winnings': 88,
'wonAtSD': 1.0,
'wonWhenSeenStreet1': 1.0,
'wonWhenSeenStreet2': 0.0,
'wonWhenSeenStreet3': 0.0,
'wonWhenSeenStreet4': 0.0},
u'Player5': { 'card1': 0,
'card2': 0,
'card3': 0,
'card4': 0,
'card5': 0,
'card6': 0,
'card7': 0,
'foldBbToStealChance': False,
'foldSbToStealChance': False,
'foldToOtherRaisedStreet0': False,
'foldToOtherRaisedStreet1': True,
'foldToOtherRaisedStreet2': False,
'foldToOtherRaisedStreet3': False,
'foldToOtherRaisedStreet4': False,
'foldToStreet1CBChance': False,
'foldToStreet1CBDone': False,
'foldToStreet2CBChance': False,
'foldToStreet2CBDone': False,
'foldToStreet3CBChance': False,
'foldToStreet3CBDone': False,
'foldToStreet4CBChance': False,
'foldToStreet4CBDone': False,
'foldedBbToSteal': False,
'foldedSbToSteal': False,
'other3BStreet0': False,
'other4BStreet0': False,
'otherRaisedStreet0': False,
'otherRaisedStreet1': True,
'otherRaisedStreet2': False,
'otherRaisedStreet3': False,
'otherRaisedStreet4': False,
'position': 0,
'raiseFirstInChance': False,
'raisedFirstIn': False,
'rake': 0,
'sawShowdown': False,
'seatNo': 4,
'sitout': False,
'startCards': 0,
'startCash': 1292,
'street0Aggr': False,
'street0Bets': 0,
'street0Calls': 1,
'street0Raises': 0,
'street0VPI': True,
'street0_3BChance': True,
'street0_3BDone': False,
'street0_4BChance': False,
'street0_4BDone': False,
'street1Aggr': False,
'street1Bets': 0,
'street1CBChance': False,
'street1CBDone': False,
'street1Calls': 0,
'street1CheckCallRaiseChance': False,
'street1CheckCallRaiseDone': False,
'street1Raises': 0,
'street1Seen': True,
'street2Aggr': False,
'street2Bets': 0,
'street2CBChance': False,
'street2CBDone': False,
'street2Calls': 0,
'street2CheckCallRaiseChance': False,
'street2CheckCallRaiseDone': False,
'street2Raises': 0,
'street2Seen': False,
'street3Aggr': False,
'street3Bets': 0,
'street3CBChance': False,
'street3CBDone': False,
'street3Calls': 0,
'street3CheckCallRaiseChance': False,
'street3CheckCallRaiseDone': False,
'street3Raises': 0,
'street3Seen': False,
'street4Aggr': False,
'street4Bets': 0,
'street4CBChance': False,
'street4CBDone': False,
'street4Calls': 0,
'street4CheckCallRaiseChance': False,
'street4CheckCallRaiseDone': False,
'street4Raises': 0,
'street4Seen': False,
'totalProfit': -27,
'tourneyTypeId': None,
'tourneysPlayersIds': None,
'winnings': 0,
'wonAtSD': 0.0,
'wonWhenSeenStreet1': 0.0,
'wonWhenSeenStreet2': 0.0,
'wonWhenSeenStreet3': 0.0,
'wonWhenSeenStreet4': 0.0},
u'Player7': { 'card1': 26,
'card2': 36,
'card3': 10,
'card4': 31,
'card5': 0,
'card6': 0,
'card7': 0,
'foldBbToStealChance': False,
'foldSbToStealChance': False,
'foldToOtherRaisedStreet0': False,
'foldToOtherRaisedStreet1': False,
'foldToOtherRaisedStreet2': False,
'foldToOtherRaisedStreet3': False,
'foldToOtherRaisedStreet4': False,
'foldToStreet1CBChance': False,
'foldToStreet1CBDone': False,
'foldToStreet2CBChance': False,
'foldToStreet2CBDone': False,
'foldToStreet3CBChance': False,
'foldToStreet3CBDone': False,
'foldToStreet4CBChance': False,
'foldToStreet4CBDone': False,
'foldedBbToSteal': False,
'foldedSbToSteal': False,
'other3BStreet0': False,
'other4BStreet0': False,
'otherRaisedStreet0': False,
'otherRaisedStreet1': True,
'otherRaisedStreet2': False,
'otherRaisedStreet3': False,
'otherRaisedStreet4': False,
'position': 'S',
'raiseFirstInChance': False,
'raisedFirstIn': False,
'rake': 22,
'sawShowdown': True,
'seatNo': 5,
'sitout': False,
'startCards': 0,
'startCash': 99,
'street0Aggr': False,
'street0Bets': 0,
'street0Calls': 1,
'street0Raises': 0,
'street0VPI': True,
'street0_3BChance': True,
'street0_3BDone': False,
'street0_4BChance': False,
'street0_4BDone': False,
'street1Aggr': False,
'street1Bets': 0,
'street1CBChance': False,
'street1CBDone': False,
'street1Calls': 1,
'street1CheckCallRaiseChance': False,
'street1CheckCallRaiseDone': False,
'street1Raises': 0,
'street1Seen': True,
'street2Aggr': False,
'street2Bets': 0,
'street2CBChance': False,
'street2CBDone': False,
'street2Calls': 0,
'street2CheckCallRaiseChance': True,
'street2CheckCallRaiseDone': True,
'street2Raises': 0,
'street2Seen': False,
'street3Aggr': False,
'street3Bets': 0,
'street3CBChance': False,
'street3CBDone': False,
'street3Calls': 0,
'street3CheckCallRaiseChance': False,
'street3CheckCallRaiseDone': False,
'street3Raises': 0,
'street3Seen': False,
'street4Aggr': False,
'street4Bets': 0,
'street4CBChance': False,
'street4CBDone': False,
'street4Calls': 0,
'street4CheckCallRaiseChance': False,
'street4CheckCallRaiseDone': False,
'street4Raises': 0,
'street4Seen': False,
'totalProfit': 239,
'tourneyTypeId': None,
'tourneysPlayersIds': None,
'winnings': 338,
'wonAtSD': 1.0,
'wonWhenSeenStreet1': 1.0,
'wonWhenSeenStreet2': 0.0,
'wonWhenSeenStreet3': 0.0,
'wonWhenSeenStreet4': 0.0}}