Merge branch 'master' of git://github.com/kangaderoo/fpdb-kangaderoo
This commit is contained in:
commit
79a6aa8f48
|
@ -1633,7 +1633,12 @@ class Database:
|
||||||
pdata[p]['street3CheckCallRaiseChance'],
|
pdata[p]['street3CheckCallRaiseChance'],
|
||||||
pdata[p]['street3CheckCallRaiseDone'],
|
pdata[p]['street3CheckCallRaiseDone'],
|
||||||
pdata[p]['street4CheckCallRaiseChance'],
|
pdata[p]['street4CheckCallRaiseChance'],
|
||||||
pdata[p]['street4CheckCallRaiseDone']
|
pdata[p]['street4CheckCallRaiseDone'],
|
||||||
|
pdata[p]['street0Raises'],
|
||||||
|
pdata[p]['street1Raises'],
|
||||||
|
pdata[p]['street2Raises'],
|
||||||
|
pdata[p]['street3Raises'],
|
||||||
|
pdata[p]['street4Raises']
|
||||||
) )
|
) )
|
||||||
|
|
||||||
q = self.sql.query['store_hands_players']
|
q = self.sql.query['store_hands_players']
|
||||||
|
@ -1662,7 +1667,7 @@ class Database:
|
||||||
#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]*61
|
line = [0]*76
|
||||||
|
|
||||||
line[0] = 1 # HDs
|
line[0] = 1 # HDs
|
||||||
if pdata[p]['street0VPI']: line[1] = 1
|
if pdata[p]['street0VPI']: line[1] = 1
|
||||||
|
@ -1719,13 +1724,29 @@ class Database:
|
||||||
if pdata[p]['street3CheckCallRaiseDone']: line[52] = 1
|
if pdata[p]['street3CheckCallRaiseDone']: line[52] = 1
|
||||||
if pdata[p]['street4CheckCallRaiseChance']: line[53] = 1
|
if pdata[p]['street4CheckCallRaiseChance']: line[53] = 1
|
||||||
if pdata[p]['street4CheckCallRaiseDone']: line[54] = 1
|
if pdata[p]['street4CheckCallRaiseDone']: line[54] = 1
|
||||||
line[55] = gid # gametypeId
|
if pdata[p]['street0Calls']: line[55] = 1
|
||||||
line[56] = pids[p] # playerId
|
if pdata[p]['street1Calls']: line[56] = 1
|
||||||
line[57] = len(pids) # activeSeats
|
if pdata[p]['street2Calls']: line[57] = 1
|
||||||
|
if pdata[p]['street3Calls']: line[58] = 1
|
||||||
|
if pdata[p]['street4Calls']: line[59] = 1
|
||||||
|
if pdata[p]['street0Bets']: line[60] = 1
|
||||||
|
if pdata[p]['street1Bets']: line[61] = 1
|
||||||
|
if pdata[p]['street2Bets']: line[62] = 1
|
||||||
|
if pdata[p]['street3Bets']: line[63] = 1
|
||||||
|
if pdata[p]['street4Bets']: line[64] = 1
|
||||||
|
if pdata[p]['street0Raises']: line[65] = 1
|
||||||
|
if pdata[p]['street1Raises']: line[66] = 1
|
||||||
|
if pdata[p]['street2Raises']: line[67] = 1
|
||||||
|
if pdata[p]['street3Raises']: line[68] = 1
|
||||||
|
if pdata[p]['street4Raises']: line[69] = 1
|
||||||
|
|
||||||
|
line[70] = gid # gametypeId
|
||||||
|
line[71] = pids[p] # playerId
|
||||||
|
line[72] = len(pids) # activeSeats
|
||||||
pos = {'B':'B', 'S':'S', 0:'D', 1:'C', 2:'M', 3:'M', 4:'M', 5:'E', 6:'E', 7:'E', 8:'E', 9:'E' }
|
pos = {'B':'B', 'S':'S', 0:'D', 1:'C', 2:'M', 3:'M', 4:'M', 5:'E', 6:'E', 7:'E', 8:'E', 9:'E' }
|
||||||
line[58] = pos[pdata[p]['position']]
|
line[73] = pos[pdata[p]['position']]
|
||||||
line[59] = pdata[p]['tourneyTypeId']
|
line[74] = pdata[p]['tourneyTypeId']
|
||||||
line[60] = styleKey # styleKey
|
line[75] = styleKey # styleKey
|
||||||
inserts.append(line)
|
inserts.append(line)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -62,6 +62,7 @@ class DerivedStats():
|
||||||
for i in range(5):
|
for i in range(5):
|
||||||
self.handsplayers[player[1]]['street%dCalls' % i] = 0
|
self.handsplayers[player[1]]['street%dCalls' % i] = 0
|
||||||
self.handsplayers[player[1]]['street%dBets' % i] = 0
|
self.handsplayers[player[1]]['street%dBets' % i] = 0
|
||||||
|
self.handsplayers[player[1]]['street%dRaises' % i] = 0
|
||||||
for i in range(1,5):
|
for i in range(1,5):
|
||||||
self.handsplayers[player[1]]['street%dCBChance' %i] = False
|
self.handsplayers[player[1]]['street%dCBChance' %i] = False
|
||||||
self.handsplayers[player[1]]['street%dCBDone' %i] = False
|
self.handsplayers[player[1]]['street%dCBDone' %i] = False
|
||||||
|
|
|
@ -93,10 +93,13 @@ class GuiPlayerStats (threading.Thread):
|
||||||
, ["plposition", False, "Posn", 1.0, "%s", "str"] # true not allowed for this line (set in code)
|
, ["plposition", False, "Posn", 1.0, "%s", "str"] # true not allowed for this line (set in code)
|
||||||
, ["pname", False, "Name", 0.0, "%s", "str"] # true not allowed for this line (set in code)
|
, ["pname", False, "Name", 0.0, "%s", "str"] # true not allowed for this line (set in code)
|
||||||
, ["n", True, "Hds", 1.0, "%1.0f", "str"]
|
, ["n", True, "Hds", 1.0, "%1.0f", "str"]
|
||||||
, ["avgseats", False, "Seats", 1.0, "%3.1f", "str"]
|
, ["avgseats", False, "Seats", 1.0, "%3.1f", "str"]
|
||||||
, ["vpip", True, "VPIP", 1.0, "%3.1f", "str"]
|
, ["vpip", True, "VPIP", 1.0, "%3.1f", "str"]
|
||||||
, ["pfr", True, "PFR", 1.0, "%3.1f", "str"]
|
, ["pfr", True, "PFR", 1.0, "%3.1f", "str"]
|
||||||
, ["pf3", True, "PF3", 1.0, "%3.1f", "str"]
|
, ["pf3", True, "PF3", 1.0, "%3.1f", "str"]
|
||||||
|
, ["aggfac", True, "AggFac", 1.0, "%2.2f", "str"]
|
||||||
|
, ["aggfrq", True, "AggFreq", 1.0, "%3.1f", "str"]
|
||||||
|
, ["conbet", True, "ContBet", 1.0, "%3.1f", "str"]
|
||||||
, ["steals", True, "Steals", 1.0, "%3.1f", "str"]
|
, ["steals", True, "Steals", 1.0, "%3.1f", "str"]
|
||||||
, ["saw_f", True, "Saw_F", 1.0, "%3.1f", "str"]
|
, ["saw_f", True, "Saw_F", 1.0, "%3.1f", "str"]
|
||||||
, ["sawsd", True, "SawSD", 1.0, "%3.1f", "str"]
|
, ["sawsd", True, "SawSD", 1.0, "%3.1f", "str"]
|
||||||
|
|
|
@ -508,6 +508,9 @@ Left-Drag to Move"
|
||||||
<pu_stat pu_stat_name="a_freq2"> </pu_stat>
|
<pu_stat pu_stat_name="a_freq2"> </pu_stat>
|
||||||
<pu_stat pu_stat_name="a_freq3"> </pu_stat>
|
<pu_stat pu_stat_name="a_freq3"> </pu_stat>
|
||||||
<pu_stat pu_stat_name="a_freq4"> </pu_stat>
|
<pu_stat pu_stat_name="a_freq4"> </pu_stat>
|
||||||
|
<pu_stat pu_stat_name="agg_freq"> </pu_stat>
|
||||||
|
<pu_stat pu_stat_name="agg_fact"> </pu_stat>
|
||||||
|
<pu_stat pu_stat_name="cbet"> </pu_stat>
|
||||||
<pu_stat pu_stat_name="cb1"> </pu_stat>
|
<pu_stat pu_stat_name="cb1"> </pu_stat>
|
||||||
<pu_stat pu_stat_name="cb2"> </pu_stat>
|
<pu_stat pu_stat_name="cb2"> </pu_stat>
|
||||||
<pu_stat pu_stat_name="cb3"> </pu_stat>
|
<pu_stat pu_stat_name="cb3"> </pu_stat>
|
||||||
|
|
|
@ -570,6 +570,9 @@ Left-Drag to Move"
|
||||||
<pu_stat pu_stat_name="a_freq2"> </pu_stat>
|
<pu_stat pu_stat_name="a_freq2"> </pu_stat>
|
||||||
<pu_stat pu_stat_name="a_freq3"> </pu_stat>
|
<pu_stat pu_stat_name="a_freq3"> </pu_stat>
|
||||||
<pu_stat pu_stat_name="a_freq4"> </pu_stat>
|
<pu_stat pu_stat_name="a_freq4"> </pu_stat>
|
||||||
|
<pu_stat pu_stat_name="agg_freq"> </pu_stat>
|
||||||
|
<pu_stat pu_stat_name="agg_fact"> </pu_stat>
|
||||||
|
<pu_stat pu_stat_name="cbet"> </pu_stat>
|
||||||
<pu_stat pu_stat_name="cb1"> </pu_stat>
|
<pu_stat pu_stat_name="cb1"> </pu_stat>
|
||||||
<pu_stat pu_stat_name="cb2"> </pu_stat>
|
<pu_stat pu_stat_name="cb2"> </pu_stat>
|
||||||
<pu_stat pu_stat_name="cb3"> </pu_stat>
|
<pu_stat pu_stat_name="cb3"> </pu_stat>
|
||||||
|
|
260
pyfpdb/SQL.py
260
pyfpdb/SQL.py
|
@ -819,7 +819,6 @@ class Sql:
|
||||||
street2Raises INT,
|
street2Raises INT,
|
||||||
street3Raises INT,
|
street3Raises INT,
|
||||||
street4Raises INT,
|
street4Raises INT,
|
||||||
|
|
||||||
actionString REAL)
|
actionString REAL)
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
@ -1337,6 +1336,21 @@ class Sql:
|
||||||
sum(hc.street3CheckCallRaiseDone) AS ccr_3,
|
sum(hc.street3CheckCallRaiseDone) AS ccr_3,
|
||||||
sum(hc.street4CheckCallRaiseChance) AS ccr_opp_4,
|
sum(hc.street4CheckCallRaiseChance) AS ccr_opp_4,
|
||||||
sum(hc.street4CheckCallRaiseDone) AS ccr_4
|
sum(hc.street4CheckCallRaiseDone) AS ccr_4
|
||||||
|
sum(hc.street0Calls) AS call_0,
|
||||||
|
sum(hc.street1Calls) AS call_1,
|
||||||
|
sum(hc.street2Calls) AS call_2,
|
||||||
|
sum(hc.street3Calls) AS call_3,
|
||||||
|
sum(hc.street4Calls) AS call_4,
|
||||||
|
sum(hc.street0Bets) AS bet_0,
|
||||||
|
sum(hc.street1Bets) AS bet_1,
|
||||||
|
sum(hc.street2Bets) AS bet_2,
|
||||||
|
sum(hc.street3Bets) AS bet_3,
|
||||||
|
sum(hc.street4Bets) AS bet_4,
|
||||||
|
sum(hc.street0Raises) AS raise_0,
|
||||||
|
sum(hc.street1Raises) AS raise_1,
|
||||||
|
sum(hc.street2Raises) AS raise_2,
|
||||||
|
sum(hc.street3Raises) AS raise_3,
|
||||||
|
sum(hc.street4Raises) AS raise_4
|
||||||
FROM Hands h
|
FROM Hands h
|
||||||
INNER JOIN HandsPlayers hp ON (hp.handId = h.id)
|
INNER JOIN HandsPlayers hp ON (hp.handId = h.id)
|
||||||
INNER JOIN HudCache hc ON ( hc.PlayerId = hp.PlayerId+0
|
INNER JOIN HudCache hc ON ( hc.PlayerId = hp.PlayerId+0
|
||||||
|
@ -1420,7 +1434,22 @@ class Sql:
|
||||||
sum(hc.street3CheckCallRaiseChance) AS ccr_opp_3,
|
sum(hc.street3CheckCallRaiseChance) AS ccr_opp_3,
|
||||||
sum(hc.street3CheckCallRaiseDone) AS ccr_3,
|
sum(hc.street3CheckCallRaiseDone) AS ccr_3,
|
||||||
sum(hc.street4CheckCallRaiseChance) AS ccr_opp_4,
|
sum(hc.street4CheckCallRaiseChance) AS ccr_opp_4,
|
||||||
sum(hc.street4CheckCallRaiseDone) AS ccr_4
|
sum(hc.street4CheckCallRaiseDone) AS ccr_4,
|
||||||
|
sum(hc.street0Calls) AS call_0,
|
||||||
|
sum(hc.street1Calls) AS call_1,
|
||||||
|
sum(hc.street2Calls) AS call_2,
|
||||||
|
sum(hc.street3Calls) AS call_3,
|
||||||
|
sum(hc.street4Calls) AS call_4,
|
||||||
|
sum(hc.street0Bets) AS bet_0,
|
||||||
|
sum(hc.street1Bets) AS bet_1,
|
||||||
|
sum(hc.street2Bets) AS bet_2,
|
||||||
|
sum(hc.street3Bets) AS bet_3,
|
||||||
|
sum(hc.street4Bets) AS bet_4,
|
||||||
|
sum(hc.street0Raises) AS raise_0,
|
||||||
|
sum(hc.street1Raises) AS raise_1,
|
||||||
|
sum(hc.street2Raises) AS raise_2,
|
||||||
|
sum(hc.street3Raises) AS raise_3,
|
||||||
|
sum(hc.street4Raises) AS raise_4
|
||||||
FROM Hands h
|
FROM Hands h
|
||||||
INNER JOIN HandsPlayers hp ON (hp.handId = h.id)
|
INNER JOIN HandsPlayers hp ON (hp.handId = h.id)
|
||||||
INNER JOIN HudCache hc ON (hc.playerId = hp.playerId)
|
INNER JOIN HudCache hc ON (hc.playerId = hp.playerId)
|
||||||
|
@ -1531,7 +1560,22 @@ class Sql:
|
||||||
cast(hp2.street3CheckCallRaiseChance as <signed>integer) AS ccr_opp_3,
|
cast(hp2.street3CheckCallRaiseChance as <signed>integer) AS ccr_opp_3,
|
||||||
cast(hp2.street3CheckCallRaiseDone as <signed>integer) AS ccr_3,
|
cast(hp2.street3CheckCallRaiseDone as <signed>integer) AS ccr_3,
|
||||||
cast(hp2.street4CheckCallRaiseChance as <signed>integer) AS ccr_opp_4,
|
cast(hp2.street4CheckCallRaiseChance as <signed>integer) AS ccr_opp_4,
|
||||||
cast(hp2.street4CheckCallRaiseDone as <signed>integer) AS ccr_4
|
cast(hp2.street4CheckCallRaiseDone as <signed>integer) AS ccr_4,
|
||||||
|
cast(hp2.street0Calls as <signed>integer) AS call_0,
|
||||||
|
cast(hp2.street1Calls as <signed>integer) AS call_1,
|
||||||
|
cast(hp2.street2Calls as <signed>integer) AS call_2,
|
||||||
|
cast(hp2.street3Calls as <signed>integer) AS call_3,
|
||||||
|
cast(hp2.street4Calls as <signed>integer) AS call_4,
|
||||||
|
cast(hp2.street0Bets as <signed>integer) AS bet_0,
|
||||||
|
cast(hp2.street1Bets as <signed>integer) AS bet_1,
|
||||||
|
cast(hp2.street2Bets as <signed>integer) AS bet_2,
|
||||||
|
cast(hp2.street3Bets as <signed>integer) AS bet_3,
|
||||||
|
cast(hp2.street4Bets as <signed>integer) AS bet_4,
|
||||||
|
cast(hp2.street0Raises as <signed>integer) AS raise_0,
|
||||||
|
cast(hp2.street1Raises as <signed>integer) AS raise_1,
|
||||||
|
cast(hp2.street2Raises as <signed>integer) AS raise_2,
|
||||||
|
cast(hp2.street3Raises as <signed>integer) AS raise_3,
|
||||||
|
cast(hp2.street4Raises as <signed>integer) AS raise_4
|
||||||
FROM
|
FROM
|
||||||
Hands h
|
Hands h
|
||||||
INNER JOIN Hands h2 ON (h2.id > %s AND h2.tableName = h.tableName)
|
INNER JOIN Hands h2 ON (h2.id > %s AND h2.tableName = h.tableName)
|
||||||
|
@ -1618,8 +1662,23 @@ class Sql:
|
||||||
cast(hp2.street3CheckCallRaiseChance as <signed>integer) AS ccr_opp_3,
|
cast(hp2.street3CheckCallRaiseChance as <signed>integer) AS ccr_opp_3,
|
||||||
cast(hp2.street3CheckCallRaiseDone as <signed>integer) AS ccr_3,
|
cast(hp2.street3CheckCallRaiseDone as <signed>integer) AS ccr_3,
|
||||||
cast(hp2.street4CheckCallRaiseChance as <signed>integer) AS ccr_opp_4,
|
cast(hp2.street4CheckCallRaiseChance as <signed>integer) AS ccr_opp_4,
|
||||||
cast(hp2.street4CheckCallRaiseDone as <signed>integer) AS ccr_4
|
cast(hp2.street4CheckCallRaiseDone as <signed>integer) AS ccr_4,
|
||||||
FROM Hands h /* this hand */
|
cast(hp2.street0Calls as <signed>integer) AS call_0,
|
||||||
|
cast(hp2.street1Calls as <signed>integer) AS call_1,
|
||||||
|
cast(hp2.street2Calls as <signed>integer) AS call_2,
|
||||||
|
cast(hp2.street3Calls as <signed>integer) AS call_3,
|
||||||
|
cast(hp2.street4Calls as <signed>integer) AS call_4,
|
||||||
|
cast(hp2.street0Bets as <signed>integer) AS bet_0,
|
||||||
|
cast(hp2.street1Bets as <signed>integer) AS bet_1,
|
||||||
|
cast(hp2.street2Bets as <signed>integer) AS bet_2,
|
||||||
|
cast(hp2.street3Bets as <signed>integer) AS bet_3,
|
||||||
|
cast(hp2.street4Bets as <signed>integer) AS bet_4,
|
||||||
|
cast(hp2.street0Raises as <signed>integer) AS raise_0,
|
||||||
|
cast(hp2.street1Raises as <signed>integer) AS raise_1,
|
||||||
|
cast(hp2.street2Raises as <signed>integer) AS raise_2,
|
||||||
|
cast(hp2.street3Raises as <signed>integer) AS raise_3,
|
||||||
|
cast(hp2.street4Raises as <signed>integer) AS raise_4
|
||||||
|
FROM Hands h /* this hand */
|
||||||
INNER JOIN Hands h2 ON ( h2.id > %s /* other hands */
|
INNER JOIN Hands h2 ON ( h2.id > %s /* other hands */
|
||||||
AND h2.tableName = h.tableName)
|
AND h2.tableName = h.tableName)
|
||||||
INNER JOIN HandsPlayers hp ON (h.id = hp.handId) /* players in this hand */
|
INNER JOIN HandsPlayers hp ON (h.id = hp.handId) /* players in this hand */
|
||||||
|
@ -1706,8 +1765,23 @@ class Sql:
|
||||||
cast(hp2.street3CheckCallRaiseChance as <signed>integer) AS ccr_opp_3,
|
cast(hp2.street3CheckCallRaiseChance as <signed>integer) AS ccr_opp_3,
|
||||||
cast(hp2.street3CheckCallRaiseDone as <signed>integer) AS ccr_3,
|
cast(hp2.street3CheckCallRaiseDone as <signed>integer) AS ccr_3,
|
||||||
cast(hp2.street4CheckCallRaiseChance as <signed>integer) AS ccr_opp_4,
|
cast(hp2.street4CheckCallRaiseChance as <signed>integer) AS ccr_opp_4,
|
||||||
cast(hp2.street4CheckCallRaiseDone as <signed>integer) AS ccr_4
|
cast(hp2.street4CheckCallRaiseDone as <signed>integer) AS ccr_4,
|
||||||
FROM Hands h /* this hand */
|
cast(hp2.street0Calls as <signed>integer) AS call_0,
|
||||||
|
cast(hp2.street1Calls as <signed>integer) AS call_1,
|
||||||
|
cast(hp2.street2Calls as <signed>integer) AS call_2,
|
||||||
|
cast(hp2.street3Calls as <signed>integer) AS call_3,
|
||||||
|
cast(hp2.street4Calls as <signed>integer) AS call_4,
|
||||||
|
cast(hp2.street0Bets as <signed>integer) AS bet_0,
|
||||||
|
cast(hp2.street1Bets as <signed>integer) AS bet_1,
|
||||||
|
cast(hp2.street2Bets as <signed>integer) AS bet_2,
|
||||||
|
cast(hp2.street3Bets as <signed>integer) AS bet_3,
|
||||||
|
cast(hp2.street4Bets as <signed>integer) AS bet_4,
|
||||||
|
cast(hp2.street0Raises as <signed>integer) AS raise_0,
|
||||||
|
cast(hp2.street1Raises as <signed>integer) AS raise_1,
|
||||||
|
cast(hp2.street2Raises as <signed>integer) AS raise_2,
|
||||||
|
cast(hp2.street3Raises as <signed>integer) AS raise_3,
|
||||||
|
cast(hp2.street4Raises as <signed>integer) AS raise_4
|
||||||
|
FROM Hands h /* this hand */
|
||||||
INNER JOIN Hands h2 ON ( h2.id > %s /* other hands */
|
INNER JOIN Hands h2 ON ( h2.id > %s /* other hands */
|
||||||
AND h2.tableName = h.tableName)
|
AND h2.tableName = h.tableName)
|
||||||
INNER JOIN HandsPlayers hp ON (h.id = hp.handId) /* players in this hand */
|
INNER JOIN HandsPlayers hp ON (h.id = hp.handId) /* players in this hand */
|
||||||
|
@ -1913,6 +1987,18 @@ class Sql:
|
||||||
else 100.0*(sum(cast(hp.street1Aggr as <signed>integer))+sum(cast(hp.street2Aggr as <signed>integer))+sum(cast(hp.street3Aggr as <signed>integer)))
|
else 100.0*(sum(cast(hp.street1Aggr as <signed>integer))+sum(cast(hp.street2Aggr as <signed>integer))+sum(cast(hp.street3Aggr as <signed>integer)))
|
||||||
/(sum(cast(hp.street1Seen as <signed>integer))+sum(cast(hp.street2Seen as <signed>integer))+sum(cast(hp.street3Seen as <signed>integer)))
|
/(sum(cast(hp.street1Seen as <signed>integer))+sum(cast(hp.street2Seen as <signed>integer))+sum(cast(hp.street3Seen as <signed>integer)))
|
||||||
end AS pofafq
|
end AS pofafq
|
||||||
|
,case when sum(cast(hp.street1Calls as <signed>integer))+ sum(cast(hp.street2Calls as <signed>integer))+ sum(cast(hp.street3Calls as <signed>integer))+ sum(cast(hp.street4Calls as <signed>integer)) = 0 then -999
|
||||||
|
else (sum(cast(hp.street1Aggr as <signed>integer)) + sum(cast(hp.street2Aggr as <signed>integer)) + sum(cast(hp.street3Aggr as <signed>integer)) + sum(cast(hp.street4Aggr as <signed>integer)))
|
||||||
|
/(sum(cast(hp.street1Calls as <signed>integer))+ sum(cast(hp.street2Calls as <signed>integer))+ sum(cast(hp.street3Calls as <signed>integer))+ sum(cast(hp.street4Calls as <signed>integer)))
|
||||||
|
end AS aggfac
|
||||||
|
,100.0*(sum(cast(hp.street1Aggr as <signed>integer)) + sum(cast(hp.street2Aggr as <signed>integer)) + sum(cast(hp.street3Aggr as <signed>integer)) + sum(cast(hp.street4Aggr as <signed>integer)))
|
||||||
|
/ ((sum(cast(hp.foldToOtherRaisedStreet1 as <signed>integer))+ sum(cast(hp.foldToOtherRaisedStreet2 as <signed>integer))+ sum(cast(hp.foldToOtherRaisedStreet3 as <signed>integer))+ sum(cast(hp.foldToOtherRaisedStreet4 as <signed>integer))) +
|
||||||
|
(sum(cast(hp.street1Calls as <signed>integer))+ sum(cast(hp.street2Calls as <signed>integer))+ sum(cast(hp.street3Calls as <signed>integer))+ sum(cast(hp.street4Calls as <signed>integer))) +
|
||||||
|
(sum(cast(hp.street1Aggr as <signed>integer)) + sum(cast(hp.street2Aggr as <signed>integer)) + sum(cast(hp.street3Aggr as <signed>integer)) + sum(cast(hp.street4Aggr as <signed>integer))) )
|
||||||
|
AS aggfrq
|
||||||
|
,100.0*(sum(cast(hp.street1CBDone as <signed>integer)) + sum(cast(hp.street2CBDone as <signed>integer)) + sum(cast(hp.street2CBDone as <signed>integer)) + sum(cast(hp.street4CBDone as <signed>integer)))
|
||||||
|
/ (sum(cast(hp.street1CBChance as <signed>integer))+ sum(cast(hp.street2CBChance as <signed>integer))+ sum(cast(hp.street3CBChance as <signed>integer))+ sum(cast(hp.street4CBChance as <signed>integer)))
|
||||||
|
AS conbet
|
||||||
,sum(hp.totalProfit)/100.0 AS net
|
,sum(hp.totalProfit)/100.0 AS net
|
||||||
,sum(hp.rake)/100.0 AS rake
|
,sum(hp.rake)/100.0 AS rake
|
||||||
,100.0*avg(hp.totalProfit/(gt.bigBlind+0.0)) AS bbper100
|
,100.0*avg(hp.totalProfit/(gt.bigBlind+0.0)) AS bbper100
|
||||||
|
@ -1998,6 +2084,18 @@ class Sql:
|
||||||
else 100.0*(sum(cast(hp.street1Aggr as <signed>integer))+sum(cast(hp.street2Aggr as <signed>integer))+sum(cast(hp.street3Aggr as <signed>integer)))
|
else 100.0*(sum(cast(hp.street1Aggr as <signed>integer))+sum(cast(hp.street2Aggr as <signed>integer))+sum(cast(hp.street3Aggr as <signed>integer)))
|
||||||
/(sum(cast(hp.street1Seen as <signed>integer))+sum(cast(hp.street2Seen as <signed>integer))+sum(cast(hp.street3Seen as <signed>integer)))
|
/(sum(cast(hp.street1Seen as <signed>integer))+sum(cast(hp.street2Seen as <signed>integer))+sum(cast(hp.street3Seen as <signed>integer)))
|
||||||
end AS pofafq
|
end AS pofafq
|
||||||
|
,case when sum(cast(hp.street1Calls as <signed>integer))+ sum(cast(hp.street2Calls as <signed>integer))+ sum(cast(hp.street3Calls as <signed>integer))+ sum(cast(hp.street4Calls as <signed>integer)) = 0 then -999
|
||||||
|
else (sum(cast(hp.street1Aggr as <signed>integer)) + sum(cast(hp.street2Aggr as <signed>integer)) + sum(cast(hp.street3Aggr as <signed>integer)) + sum(cast(hp.street4Aggr as <signed>integer)))
|
||||||
|
/(sum(cast(hp.street1Calls as <signed>integer))+ sum(cast(hp.street2Calls as <signed>integer))+ sum(cast(hp.street3Calls as <signed>integer))+ sum(cast(hp.street4Calls as <signed>integer)))
|
||||||
|
end AS aggfac
|
||||||
|
,100.0*(sum(cast(hp.street1Aggr as <signed>integer)) + sum(cast(hp.street2Aggr as <signed>integer)) + sum(cast(hp.street3Aggr as <signed>integer)) + sum(cast(hp.street4Aggr as <signed>integer)))
|
||||||
|
/ ((sum(cast(hp.foldToOtherRaisedStreet1 as <signed>integer))+ sum(cast(hp.foldToOtherRaisedStreet2 as <signed>integer))+ sum(cast(hp.foldToOtherRaisedStreet3 as <signed>integer))+ sum(cast(hp.foldToOtherRaisedStreet4 as <signed>integer))) +
|
||||||
|
(sum(cast(hp.street1Calls as <signed>integer))+ sum(cast(hp.street2Calls as <signed>integer))+ sum(cast(hp.street3Calls as <signed>integer))+ sum(cast(hp.street4Calls as <signed>integer))) +
|
||||||
|
(sum(cast(hp.street1Aggr as <signed>integer)) + sum(cast(hp.street2Aggr as <signed>integer)) + sum(cast(hp.street3Aggr as <signed>integer)) + sum(cast(hp.street4Aggr as <signed>integer))) )
|
||||||
|
AS aggfrq
|
||||||
|
,100.0*(sum(cast(hp.street1CBDone as <signed>integer)) + sum(cast(hp.street2CBDone as <signed>integer)) + sum(cast(hp.street2CBDone as <signed>integer)) + sum(cast(hp.street4CBDone as <signed>integer)))
|
||||||
|
/ (sum(cast(hp.street1CBChance as <signed>integer))+ sum(cast(hp.street2CBChance as <signed>integer))+ sum(cast(hp.street3CBChance as <signed>integer))+ sum(cast(hp.street4CBChance as <signed>integer)))
|
||||||
|
AS conbet
|
||||||
,sum(hp.totalProfit)/100.0 AS net
|
,sum(hp.totalProfit)/100.0 AS net
|
||||||
,sum(hp.rake)/100.0 AS rake
|
,sum(hp.rake)/100.0 AS rake
|
||||||
,100.0*avg(hp.totalProfit/(gt.bigBlind+0.0)) AS bbper100
|
,100.0*avg(hp.totalProfit/(gt.bigBlind+0.0)) AS bbper100
|
||||||
|
@ -2084,6 +2182,18 @@ class Sql:
|
||||||
else 100.0*(sum(cast(hp.street1Aggr as <signed>integer))+sum(cast(hp.street2Aggr as <signed>integer))+sum(cast(hp.street3Aggr as <signed>integer)))
|
else 100.0*(sum(cast(hp.street1Aggr as <signed>integer))+sum(cast(hp.street2Aggr as <signed>integer))+sum(cast(hp.street3Aggr as <signed>integer)))
|
||||||
/(sum(cast(hp.street1Seen as <signed>integer))+sum(cast(hp.street2Seen as <signed>integer))+sum(cast(hp.street3Seen as <signed>integer)))
|
/(sum(cast(hp.street1Seen as <signed>integer))+sum(cast(hp.street2Seen as <signed>integer))+sum(cast(hp.street3Seen as <signed>integer)))
|
||||||
end AS pofafq
|
end AS pofafq
|
||||||
|
,case when sum(cast(hp.street1Calls as <signed>integer))+ sum(cast(hp.street2Calls as <signed>integer))+ sum(cast(hp.street3Calls as <signed>integer))+ sum(cast(hp.street4Calls as <signed>integer)) = 0 then -999
|
||||||
|
else (sum(cast(hp.street1Aggr as <signed>integer)) + sum(cast(hp.street2Aggr as <signed>integer)) + sum(cast(hp.street3Aggr as <signed>integer)) + sum(cast(hp.street4Aggr as <signed>integer)))
|
||||||
|
/(sum(cast(hp.street1Calls as <signed>integer))+ sum(cast(hp.street2Calls as <signed>integer))+ sum(cast(hp.street3Calls as <signed>integer))+ sum(cast(hp.street4Calls as <signed>integer)))
|
||||||
|
end AS aggfac
|
||||||
|
,100.0*(sum(cast(hp.street1Aggr as <signed>integer)) + sum(cast(hp.street2Aggr as <signed>integer)) + sum(cast(hp.street3Aggr as <signed>integer)) + sum(cast(hp.street4Aggr as <signed>integer)))
|
||||||
|
/ ((sum(cast(hp.foldToOtherRaisedStreet1 as <signed>integer))+ sum(cast(hp.foldToOtherRaisedStreet2 as <signed>integer))+ sum(cast(hp.foldToOtherRaisedStreet3 as <signed>integer))+ sum(cast(hp.foldToOtherRaisedStreet4 as <signed>integer))) +
|
||||||
|
(sum(cast(hp.street1Calls as <signed>integer))+ sum(cast(hp.street2Calls as <signed>integer))+ sum(cast(hp.street3Calls as <signed>integer))+ sum(cast(hp.street4Calls as <signed>integer))) +
|
||||||
|
(sum(cast(hp.street1Aggr as <signed>integer)) + sum(cast(hp.street2Aggr as <signed>integer)) + sum(cast(hp.street3Aggr as <signed>integer)) + sum(cast(hp.street4Aggr as <signed>integer))) )
|
||||||
|
AS aggfrq
|
||||||
|
,100.0*(sum(cast(hp.street1CBDone as <signed>integer)) + sum(cast(hp.street2CBDone as <signed>integer)) + sum(cast(hp.street2CBDone as <signed>integer)) + sum(cast(hp.street4CBDone as <signed>integer)))
|
||||||
|
/ (sum(cast(hp.street1CBChance as <signed>integer))+ sum(cast(hp.street2CBChance as <signed>integer))+ sum(cast(hp.street3CBChance as <signed>integer))+ sum(cast(hp.street4CBChance as <signed>integer)))
|
||||||
|
AS conbet
|
||||||
,sum(hp.totalProfit)/100.0 AS net
|
,sum(hp.totalProfit)/100.0 AS net
|
||||||
,sum(hp.rake)/100.0 AS rake
|
,sum(hp.rake)/100.0 AS rake
|
||||||
,100.0*avg(hp.totalProfit/(gt.bigBlind+0.0)) AS bbper100
|
,100.0*avg(hp.totalProfit/(gt.bigBlind+0.0)) AS bbper100
|
||||||
|
@ -2632,6 +2742,7 @@ class Sql:
|
||||||
GROUP BY h.handStart, hp.handId, hp.sawShowdown, hp.totalProfit
|
GROUP BY h.handStart, hp.handId, hp.sawShowdown, hp.totalProfit
|
||||||
ORDER BY h.handStart"""
|
ORDER BY h.handStart"""
|
||||||
|
|
||||||
|
|
||||||
####################################
|
####################################
|
||||||
# Session stats query
|
# Session stats query
|
||||||
####################################
|
####################################
|
||||||
|
@ -2743,6 +2854,21 @@ class Sql:
|
||||||
,street3CheckCallRaiseDone
|
,street3CheckCallRaiseDone
|
||||||
,street4CheckCallRaiseChance
|
,street4CheckCallRaiseChance
|
||||||
,street4CheckCallRaiseDone
|
,street4CheckCallRaiseDone
|
||||||
|
,street0Calls
|
||||||
|
,street1Calls
|
||||||
|
,street2Calls
|
||||||
|
,street3Calls
|
||||||
|
,street4Calls
|
||||||
|
,street0Bets
|
||||||
|
,street1Bets
|
||||||
|
,street2Bets
|
||||||
|
,street3Bets
|
||||||
|
,street4Bets
|
||||||
|
,street0Raises
|
||||||
|
,street1Raises
|
||||||
|
,street2Raises
|
||||||
|
,street3Raises
|
||||||
|
,street4Raises
|
||||||
)
|
)
|
||||||
SELECT h.gametypeId
|
SELECT h.gametypeId
|
||||||
,hp.playerId
|
,hp.playerId
|
||||||
|
@ -2818,6 +2944,21 @@ class Sql:
|
||||||
,sum(street3CheckCallRaiseDone)
|
,sum(street3CheckCallRaiseDone)
|
||||||
,sum(street4CheckCallRaiseChance)
|
,sum(street4CheckCallRaiseChance)
|
||||||
,sum(street4CheckCallRaiseDone)
|
,sum(street4CheckCallRaiseDone)
|
||||||
|
,sum(street0Calls)
|
||||||
|
,sum(street1Calls)
|
||||||
|
,sum(street2Calls)
|
||||||
|
,sum(street3Calls)
|
||||||
|
,sum(street4Calls)
|
||||||
|
,sum(street0Bets)
|
||||||
|
,sum(street1Bets)
|
||||||
|
,sum(street2Bets)
|
||||||
|
,sum(street3Bets)
|
||||||
|
,sum(street4Bets)
|
||||||
|
,sum(hp.street0Raises)
|
||||||
|
,sum(hp.street1Raises)
|
||||||
|
,sum(hp.street2Raises)
|
||||||
|
,sum(hp.street3Raises)
|
||||||
|
,sum(hp.street4Raises)
|
||||||
FROM HandsPlayers hp
|
FROM HandsPlayers hp
|
||||||
INNER JOIN Hands h ON (h.id = hp.handId)
|
INNER JOIN Hands h ON (h.id = hp.handId)
|
||||||
<where_clause>
|
<where_clause>
|
||||||
|
@ -2892,6 +3033,21 @@ class Sql:
|
||||||
,street3CheckCallRaiseDone
|
,street3CheckCallRaiseDone
|
||||||
,street4CheckCallRaiseChance
|
,street4CheckCallRaiseChance
|
||||||
,street4CheckCallRaiseDone
|
,street4CheckCallRaiseDone
|
||||||
|
,street0Calls
|
||||||
|
,street1Calls
|
||||||
|
,street2Calls
|
||||||
|
,street3Calls
|
||||||
|
,street4Calls
|
||||||
|
,street0Bets
|
||||||
|
,street1Bets
|
||||||
|
,street2Bets
|
||||||
|
,street3Bets
|
||||||
|
,street4Bets
|
||||||
|
,street0Raises
|
||||||
|
,street1Raises
|
||||||
|
,street2Raises
|
||||||
|
,street3Raises
|
||||||
|
,street4Raises
|
||||||
)
|
)
|
||||||
SELECT h.gametypeId
|
SELECT h.gametypeId
|
||||||
,hp.playerId
|
,hp.playerId
|
||||||
|
@ -2967,6 +3123,21 @@ class Sql:
|
||||||
,sum(CAST(street3CheckCallRaiseDone as integer))
|
,sum(CAST(street3CheckCallRaiseDone as integer))
|
||||||
,sum(CAST(street4CheckCallRaiseChance as integer))
|
,sum(CAST(street4CheckCallRaiseChance as integer))
|
||||||
,sum(CAST(street4CheckCallRaiseDone as integer))
|
,sum(CAST(street4CheckCallRaiseDone as integer))
|
||||||
|
,sum(CAST(street0Calls as integer))
|
||||||
|
,sum(CAST(street1Calls as integer))
|
||||||
|
,sum(CAST(street2Calls as integer))
|
||||||
|
,sum(CAST(street3Calls as integer))
|
||||||
|
,sum(CAST(street4Calls as integer))
|
||||||
|
,sum(CAST(street0Bets as integer))
|
||||||
|
,sum(CAST(street1Bets as integer))
|
||||||
|
,sum(CAST(street2Bets as integer))
|
||||||
|
,sum(CAST(street3Bets as integer))
|
||||||
|
,sum(CAST(street4Bets as integer))
|
||||||
|
,sum(CAST(hp.street0Raises as integer))
|
||||||
|
,sum(CAST(hp.street1Raises as integer))
|
||||||
|
,sum(CAST(hp.street2Raises as integer))
|
||||||
|
,sum(CAST(hp.street3Raises as integer))
|
||||||
|
,sum(CAST(hp.street4Raises as integer))
|
||||||
FROM HandsPlayers hp
|
FROM HandsPlayers hp
|
||||||
INNER JOIN Hands h ON (h.id = hp.handId)
|
INNER JOIN Hands h ON (h.id = hp.handId)
|
||||||
<where_clause>
|
<where_clause>
|
||||||
|
@ -3041,6 +3212,21 @@ class Sql:
|
||||||
,street3CheckCallRaiseDone
|
,street3CheckCallRaiseDone
|
||||||
,street4CheckCallRaiseChance
|
,street4CheckCallRaiseChance
|
||||||
,street4CheckCallRaiseDone
|
,street4CheckCallRaiseDone
|
||||||
|
,street0Calls
|
||||||
|
,street1Calls
|
||||||
|
,street2Calls
|
||||||
|
,street3Calls
|
||||||
|
,street4Calls
|
||||||
|
,street0Bets
|
||||||
|
,street1Bets
|
||||||
|
,street2Bets
|
||||||
|
,street3Bets
|
||||||
|
,street4Bets
|
||||||
|
,street0Raises
|
||||||
|
,street1Raises
|
||||||
|
,street2Raises
|
||||||
|
,street3Raises
|
||||||
|
,street4Raises
|
||||||
)
|
)
|
||||||
SELECT h.gametypeId
|
SELECT h.gametypeId
|
||||||
,hp.playerId
|
,hp.playerId
|
||||||
|
@ -3116,6 +3302,21 @@ class Sql:
|
||||||
,sum(CAST(street3CheckCallRaiseDone as integer))
|
,sum(CAST(street3CheckCallRaiseDone as integer))
|
||||||
,sum(CAST(street4CheckCallRaiseChance as integer))
|
,sum(CAST(street4CheckCallRaiseChance as integer))
|
||||||
,sum(CAST(street4CheckCallRaiseDone as integer))
|
,sum(CAST(street4CheckCallRaiseDone as integer))
|
||||||
|
,sum(CAST(street0Calls as integer))
|
||||||
|
,sum(CAST(street1Calls as integer))
|
||||||
|
,sum(CAST(street2Calls as integer))
|
||||||
|
,sum(CAST(street3Calls as integer))
|
||||||
|
,sum(CAST(street4Calls as integer))
|
||||||
|
,sum(CAST(street0Bets as integer))
|
||||||
|
,sum(CAST(street1Bets as integer))
|
||||||
|
,sum(CAST(street2Bets as integer))
|
||||||
|
,sum(CAST(street3Bets as integer))
|
||||||
|
,sum(CAST(street4Bets as integer))
|
||||||
|
,sum(CAST(hp.street0Raises as integer))
|
||||||
|
,sum(CAST(hp.street1Raises as integer))
|
||||||
|
,sum(CAST(hp.street2Raises as integer))
|
||||||
|
,sum(CAST(hp.street3Raises as integer))
|
||||||
|
,sum(CAST(hp.street4Raises as integer))
|
||||||
FROM HandsPlayers hp
|
FROM HandsPlayers hp
|
||||||
INNER JOIN Hands h ON (h.id = hp.handId)
|
INNER JOIN Hands h ON (h.id = hp.handId)
|
||||||
<where_clause>
|
<where_clause>
|
||||||
|
@ -3189,7 +3390,22 @@ class Sql:
|
||||||
street3CheckCallRaiseChance,
|
street3CheckCallRaiseChance,
|
||||||
street3CheckCallRaiseDone,
|
street3CheckCallRaiseDone,
|
||||||
street4CheckCallRaiseChance,
|
street4CheckCallRaiseChance,
|
||||||
street4CheckCallRaiseDone)
|
street4CheckCallRaiseDone,
|
||||||
|
street0Calls,
|
||||||
|
street1Calls,
|
||||||
|
street2Calls,
|
||||||
|
street3Calls,
|
||||||
|
street4Calls,
|
||||||
|
street0Bets,
|
||||||
|
street1Bets,
|
||||||
|
street2Bets,
|
||||||
|
street3Bets,
|
||||||
|
street4Bets,
|
||||||
|
street0Raises,
|
||||||
|
street1Raises,
|
||||||
|
street2Raises,
|
||||||
|
street3Raises,
|
||||||
|
street4Raises)
|
||||||
VALUES (%s, %s, %s, %s, %s,
|
VALUES (%s, %s, %s, %s, %s,
|
||||||
%s, %s, %s, %s, %s,
|
%s, %s, %s, %s, %s,
|
||||||
%s, %s, %s, %s, %s,
|
%s, %s, %s, %s, %s,
|
||||||
|
@ -3202,6 +3418,9 @@ class Sql:
|
||||||
%s, %s, %s, %s, %s,
|
%s, %s, %s, %s, %s,
|
||||||
%s, %s, %s, %s, %s,
|
%s, %s, %s, %s, %s,
|
||||||
%s, %s, %s, %s, %s,
|
%s, %s, %s, %s, %s,
|
||||||
|
%s, %s, %s, %s, %s,
|
||||||
|
%s, %s, %s, %s, %s,
|
||||||
|
%s, %s, %s, %s, %s,
|
||||||
%s)"""
|
%s)"""
|
||||||
|
|
||||||
self.query['update_hudcache'] = """
|
self.query['update_hudcache'] = """
|
||||||
|
@ -3260,7 +3479,22 @@ class Sql:
|
||||||
street3CheckCallRaiseChance=street3CheckCallRaiseChance+%s,
|
street3CheckCallRaiseChance=street3CheckCallRaiseChance+%s,
|
||||||
street3CheckCallRaiseDone=street3CheckCallRaiseDone+%s,
|
street3CheckCallRaiseDone=street3CheckCallRaiseDone+%s,
|
||||||
street4CheckCallRaiseChance=street4CheckCallRaiseChance+%s,
|
street4CheckCallRaiseChance=street4CheckCallRaiseChance+%s,
|
||||||
street4CheckCallRaiseDone=street4CheckCallRaiseDone+%s
|
street4CheckCallRaiseDone=street4CheckCallRaiseDone+%s,
|
||||||
|
street0Calls=street0Calls+%s,
|
||||||
|
street1Calls=street1Calls+%s,
|
||||||
|
street2Calls=street2Calls+%s,
|
||||||
|
street3Calls=street3Calls+%s,
|
||||||
|
street4Calls=street4Calls+%s,
|
||||||
|
street0Bets=street0Bets+%s,
|
||||||
|
street1Bets=street1Bets+%s,
|
||||||
|
street2Bets=street2Bets+%s,
|
||||||
|
street3Bets=street3Bets+%s,
|
||||||
|
street4Bets=street4Bets+%s,
|
||||||
|
street0Raises=street0Raises+%s,
|
||||||
|
street1Raises=street1Raises+%s,
|
||||||
|
street2Raises=street2Raises+%s,
|
||||||
|
street3Raises=street3Raises+%s,
|
||||||
|
street4Raises=street4Raises+%s
|
||||||
WHERE gametypeId+0=%s
|
WHERE gametypeId+0=%s
|
||||||
AND playerId=%s
|
AND playerId=%s
|
||||||
AND activeSeats=%s
|
AND activeSeats=%s
|
||||||
|
@ -3586,7 +3820,12 @@ class Sql:
|
||||||
street3CheckCallRaiseChance,
|
street3CheckCallRaiseChance,
|
||||||
street3CheckCallRaiseDone,
|
street3CheckCallRaiseDone,
|
||||||
street4CheckCallRaiseChance,
|
street4CheckCallRaiseChance,
|
||||||
street4CheckCallRaiseDone
|
street4CheckCallRaiseDone,
|
||||||
|
street0Raises,
|
||||||
|
street1Raises,
|
||||||
|
street2Raises,
|
||||||
|
street3Raises,
|
||||||
|
street4Raises
|
||||||
)
|
)
|
||||||
VALUES (
|
VALUES (
|
||||||
%s, %s, %s, %s, %s,
|
%s, %s, %s, %s, %s,
|
||||||
|
@ -3604,6 +3843,7 @@ class Sql:
|
||||||
%s, %s, %s, %s, %s,
|
%s, %s, %s, %s, %s,
|
||||||
%s, %s, %s, %s, %s,
|
%s, %s, %s, %s, %s,
|
||||||
%s, %s, %s, %s, %s,
|
%s, %s, %s, %s, %s,
|
||||||
|
%s, %s, %s, %s, %s,
|
||||||
%s, %s, %s, %s, %s
|
%s, %s, %s, %s, %s
|
||||||
)"""
|
)"""
|
||||||
|
|
||||||
|
|
|
@ -505,6 +505,91 @@ def a_freq_123(stat_dict, player):
|
||||||
'Post-Flop Aggression Freq'
|
'Post-Flop Aggression Freq'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
def agg_freq(stat_dict, player):
|
||||||
|
""" Post-Flop aggression frequency."""
|
||||||
|
""" Aggression frequency % = (times bet or raised post-flop) * 100 / (times bet, raised, called, or folded post-flop) """
|
||||||
|
stat = 0.0
|
||||||
|
try:
|
||||||
|
""" Agression on the flop and all streets """
|
||||||
|
bet_raise = stat_dict[player]['aggr_1'] + stat_dict[player]['aggr_2'] + stat_dict[player]['aggr_3'] + stat_dict[player]['aggr_4']
|
||||||
|
""" number post flop streets seen, this must be number of post-flop calls !! """
|
||||||
|
post_call = stat_dict[player]['call_1'] + stat_dict[player]['call_2'] + stat_dict[player]['call_3'] + stat_dict[player]['call_4']
|
||||||
|
""" Number of post flop folds this info is not yet in the database """
|
||||||
|
post_fold = stat_dict[player]['f_freq_1'] + stat_dict[player]['f_freq_2'] + stat_dict[player]['f_freq_3'] + stat_dict[player]['f_freq_4']
|
||||||
|
|
||||||
|
stat = float (bet_raise) / float(post_call + post_fold + bet_raise)
|
||||||
|
|
||||||
|
return (stat,
|
||||||
|
'%3.1f' % (100*stat) + '%',
|
||||||
|
'afr=%3.1f' % (100*stat) + '%',
|
||||||
|
'agg_fr=%3.1f' % (100*stat) + '%',
|
||||||
|
'(%d/%d)' % (bet_raise, (post_call + post_fold + bet_raise)),
|
||||||
|
'Aggression Freq'
|
||||||
|
)
|
||||||
|
except:
|
||||||
|
return (stat,
|
||||||
|
'%2.1f' % (0) + '%',
|
||||||
|
'af=%3.1f' % (0) + '%',
|
||||||
|
'agg_f=%3.1f' % (0) + '%',
|
||||||
|
'(%d/%d)' % (0, 0),
|
||||||
|
'Aggression Freq'
|
||||||
|
)
|
||||||
|
|
||||||
|
def agg_fact(stat_dict, player):
|
||||||
|
""" Post-Flop aggression frequency."""
|
||||||
|
""" Aggression factor = (times bet or raised post-flop) / (times called post-flop) """
|
||||||
|
stat = 0.0
|
||||||
|
try:
|
||||||
|
bet_raise = stat_dict[player]['aggr_1'] + stat_dict[player]['aggr_2'] + stat_dict[player]['aggr_3'] + stat_dict[player]['aggr_4']
|
||||||
|
post_call = stat_dict[player]['call_1'] + stat_dict[player]['call_2'] + stat_dict[player]['call_3'] + stat_dict[player]['call_4']
|
||||||
|
|
||||||
|
if post_call > 0:
|
||||||
|
stat = float (bet_raise) / float(post_call)
|
||||||
|
else:
|
||||||
|
stat = float (bet_raise)
|
||||||
|
return (stat,
|
||||||
|
'%2.2f' % (stat) ,
|
||||||
|
'afa=%2.2f' % (stat) ,
|
||||||
|
'agg_fa=%2.2f' % (stat) ,
|
||||||
|
'(%d/%d)' % (bet_raise, post_call),
|
||||||
|
'Aggression Factor'
|
||||||
|
)
|
||||||
|
except:
|
||||||
|
return (stat,
|
||||||
|
'%2.2f' % (0) ,
|
||||||
|
'afa=%2.2f' % (0) ,
|
||||||
|
'agg_fa=%2.2f' % (0),
|
||||||
|
'(%d/%d)' % (0, 0),
|
||||||
|
'Aggression Factor'
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def cbet(stat_dict, player):
|
||||||
|
|
||||||
|
""" Flop continuation bet."""
|
||||||
|
""" Continuation bet % = (times made a continuation bet on the flop) * 100 / (number of opportunities to make a continuation bet on the flop) """
|
||||||
|
|
||||||
|
stat = 0.0
|
||||||
|
try:
|
||||||
|
cbets = stat_dict[player]['cb_1']+stat_dict[player]['cb_2']+stat_dict[player]['cb_3']+stat_dict[player]['cb_4']
|
||||||
|
oppt = stat_dict[player]['cb_opp_1']+stat_dict[player]['cb_opp_2']+stat_dict[player]['cb_opp_3']+stat_dict[player]['cb_opp_4']
|
||||||
|
stat = float(cbets)/float(oppt)
|
||||||
|
return (stat,
|
||||||
|
'%3.1f' % (100*stat) + '%',
|
||||||
|
'cbet=%3.1f' % (100*stat) + '%',
|
||||||
|
'cbet=%3.1f' % (100*stat) + '%',
|
||||||
|
'(%d/%d)' % (cbets, oppt),
|
||||||
|
'% continuation bet '
|
||||||
|
)
|
||||||
|
except:
|
||||||
|
return (stat,
|
||||||
|
'%3.1f' % (0) + '%',
|
||||||
|
'cbet=%3.1f' % (0) + '%',
|
||||||
|
'cbet=%3.1f' % (0) + '%',
|
||||||
|
'(%d/%d)' % (0, 0),
|
||||||
|
'% continuation bet '
|
||||||
|
)
|
||||||
|
|
||||||
def cb1(stat_dict, player):
|
def cb1(stat_dict, player):
|
||||||
""" Flop continuation bet."""
|
""" Flop continuation bet."""
|
||||||
stat = 0.0
|
stat = 0.0
|
||||||
|
|
Loading…
Reference in New Issue
Block a user