Revert "Remove trailing percent symbols from HUD values"
This reverts commit b4a08af2b1
.
Conflicts:
pyfpdb/Stats.py
This commit is contained in:
parent
978464e7c6
commit
54279cafef
196
pyfpdb/Stats.py
196
pyfpdb/Stats.py
|
@ -78,6 +78,7 @@ log = logging.getLogger("db")
|
||||||
|
|
||||||
|
|
||||||
re_Places = re.compile("_[0-9]$")
|
re_Places = re.compile("_[0-9]$")
|
||||||
|
re_Percent = re.compile("%$")
|
||||||
|
|
||||||
# String manipulation
|
# String manipulation
|
||||||
import codecs
|
import codecs
|
||||||
|
@ -87,26 +88,35 @@ def do_tip(widget, tip):
|
||||||
_tip = Charset.to_utf8(tip)
|
_tip = Charset.to_utf8(tip)
|
||||||
widget.set_tooltip_text(_tip)
|
widget.set_tooltip_text(_tip)
|
||||||
|
|
||||||
|
|
||||||
def do_stat(stat_dict, player = 24, stat = 'vpip'):
|
def do_stat(stat_dict, player = 24, stat = 'vpip'):
|
||||||
match = re_Places.search(stat)
|
match = re_Places.search(stat)
|
||||||
|
if match is None:
|
||||||
result = eval("%(stat)s(stat_dict, %(player)d)" % {'stat': stat, 'player': player})
|
result = eval("%(stat)s(stat_dict, %(player)d)" % {'stat': stat, 'player': player})
|
||||||
|
else:
|
||||||
# If decimal places have been defined, override result[1]
|
|
||||||
# NOTE: decimal place override ALWAYS assumes the raw result is a
|
|
||||||
# fraction (x/100); manual decimal places really only make sense for
|
|
||||||
# percentage values. Also, profit/100 hands (bb/BB) already default
|
|
||||||
# to three decimal places anyhow, so they are unlikely override
|
|
||||||
# candidates.
|
|
||||||
if match:
|
|
||||||
base = stat[0:-2]
|
base = stat[0:-2]
|
||||||
places = int(stat[-1:])
|
places = int(stat[-1:])
|
||||||
result[1] = '%.*f' % (places, 100.0*result[0])
|
result = (0.0, '0.0', 'notset=0', 'notset=0', '0', 'not set')
|
||||||
|
try:
|
||||||
|
result = eval("%(stat)s(stat_dict, %(player)d)" % {'stat': base, 'player': player})
|
||||||
|
except:
|
||||||
|
pass #
|
||||||
|
log.info(_("exception getting stat %s for player %s %s") % (base, str(player), str(sys.exc_info())))
|
||||||
|
log.debug(_("Stats.do_stat result = %s") % str(result) )
|
||||||
|
|
||||||
|
match = re_Percent.search(result[1])
|
||||||
|
try:
|
||||||
|
if match is None:
|
||||||
|
result = (result[0], "%.*f" % (places, result[0]), result[2], result[3], result[4], result[5])
|
||||||
|
else:
|
||||||
|
result = (result[0], "%.*f%%" % (places, 100*result[0]), result[2], result[3], result[4], result[5])
|
||||||
|
except:
|
||||||
|
log.info(_("error: %s") % str(sys.exc_info()))
|
||||||
|
raise
|
||||||
return result
|
return result
|
||||||
|
|
||||||
# OK, for reference the tuple returned by the stat is:
|
# OK, for reference the tuple returned by the stat is:
|
||||||
# 0 - The stat, raw, no formating, eg 0.33333333
|
# 0 - The stat, raw, no formating, eg 0.33333333
|
||||||
# 1 - formatted stat with appropriate precision, eg. 33; shown in HUD
|
# 1 - formatted stat with appropriate precision and punctuation, eg 33%
|
||||||
# 2 - formatted stat with appropriate precision, punctuation and a hint, eg v=33%
|
# 2 - formatted stat with appropriate precision, punctuation and a hint, eg v=33%
|
||||||
# 3 - same as #2 except name of stat instead of hint, eg vpip=33%
|
# 3 - same as #2 except name of stat instead of hint, eg vpip=33%
|
||||||
# 4 - the calculation that got the stat, eg 9/27
|
# 4 - the calculation that got the stat, eg 9/27
|
||||||
|
@ -137,9 +147,9 @@ def vpip(stat_dict, player):
|
||||||
try:
|
try:
|
||||||
stat = float(stat_dict[player]['vpip'])/float(stat_dict[player]['n'])
|
stat = float(stat_dict[player]['vpip'])/float(stat_dict[player]['n'])
|
||||||
return (stat,
|
return (stat,
|
||||||
'%3.1f' % (100.0*stat),
|
'%3.1f' % (100*stat) + '%',
|
||||||
'v=%3.1f%%' % (100.0*stat),
|
'v=%3.1f' % (100*stat) + '%',
|
||||||
'vpip=%3.1f%%' % (100.0*stat),
|
'vpip=%3.1f' % (100*stat) + '%',
|
||||||
'(%d/%d)' % (stat_dict[player]['vpip'], stat_dict[player]['n']),
|
'(%d/%d)' % (stat_dict[player]['vpip'], stat_dict[player]['n']),
|
||||||
_('Voluntarily Put In Pot Pre-Flop%')
|
_('Voluntarily Put In Pot Pre-Flop%')
|
||||||
)
|
)
|
||||||
|
@ -157,9 +167,9 @@ def pfr(stat_dict, player):
|
||||||
try:
|
try:
|
||||||
stat = float(stat_dict[player]['pfr'])/float(stat_dict[player]['n'])
|
stat = float(stat_dict[player]['pfr'])/float(stat_dict[player]['n'])
|
||||||
return (stat,
|
return (stat,
|
||||||
'%3.1f' % (100.0*stat),
|
'%3.1f' % (100*stat) + '%',
|
||||||
'p=%3.1f%%' % (100.0*stat),
|
'p=%3.1f' % (100*stat) + '%',
|
||||||
'pfr=%3.1f%%' % (100.0*stat),
|
'pfr=%3.1f' % (100*stat) + '%',
|
||||||
'(%d/%d)' % (stat_dict[player]['pfr'], stat_dict[player]['n']),
|
'(%d/%d)' % (stat_dict[player]['pfr'], stat_dict[player]['n']),
|
||||||
_('Pre-Flop Raise %')
|
_('Pre-Flop Raise %')
|
||||||
)
|
)
|
||||||
|
@ -178,9 +188,9 @@ def wtsd(stat_dict, player):
|
||||||
try:
|
try:
|
||||||
stat = float(stat_dict[player]['sd'])/float(stat_dict[player]['saw_f'])
|
stat = float(stat_dict[player]['sd'])/float(stat_dict[player]['saw_f'])
|
||||||
return (stat,
|
return (stat,
|
||||||
'%3.1f' % (100.0*stat),
|
'%3.1f' % (100*stat) + '%',
|
||||||
'w=%3.1f%%' % (100.0*stat),
|
'w=%3.1f' % (100*stat) + '%',
|
||||||
'wtsd=%3.1f%%' % (100.0*stat),
|
'wtsd=%3.1f' % (100*stat) + '%',
|
||||||
'(%d/%d)' % (stat_dict[player]['sd'], stat_dict[player]['saw_f']),
|
'(%d/%d)' % (stat_dict[player]['sd'], stat_dict[player]['saw_f']),
|
||||||
_('% went to showdown')
|
_('% went to showdown')
|
||||||
)
|
)
|
||||||
|
@ -199,9 +209,9 @@ def wmsd(stat_dict, player):
|
||||||
try:
|
try:
|
||||||
stat = float(stat_dict[player]['wmsd'])/float(stat_dict[player]['sd'])
|
stat = float(stat_dict[player]['wmsd'])/float(stat_dict[player]['sd'])
|
||||||
return (stat,
|
return (stat,
|
||||||
'%3.1f' % (100.0*stat),
|
'%3.1f' % (100*stat) + '%',
|
||||||
'w=%3.1f%%' % (100.0*stat),
|
'w=%3.1f' % (100*stat) + '%',
|
||||||
'wmsd=%3.1f%%' % (100.0*stat),
|
'wmsd=%3.1f' % (100*stat) + '%',
|
||||||
'(%5.1f/%d)' % (float(stat_dict[player]['wmsd']), stat_dict[player]['sd']),
|
'(%5.1f/%d)' % (float(stat_dict[player]['wmsd']), stat_dict[player]['sd']),
|
||||||
_('% won money at showdown')
|
_('% won money at showdown')
|
||||||
)
|
)
|
||||||
|
@ -287,9 +297,9 @@ def saw_f(stat_dict, player):
|
||||||
den = float(stat_dict[player]['n'])
|
den = float(stat_dict[player]['n'])
|
||||||
stat = num/den
|
stat = num/den
|
||||||
return (stat,
|
return (stat,
|
||||||
'%3.1f' % (100.0*stat),
|
'%3.1f' % (100*stat) + '%',
|
||||||
'sf=%3.1f%%' % (100.0*stat),
|
'sf=%3.1f' % (100*stat) + '%',
|
||||||
'saw_f=%3.1f%%' % (100.0*stat),
|
'saw_f=%3.1f' % (100*stat) + '%',
|
||||||
'(%d/%d)' % (stat_dict[player]['saw_f'], stat_dict[player]['n']),
|
'(%d/%d)' % (stat_dict[player]['saw_f'], stat_dict[player]['n']),
|
||||||
_('Flop Seen %')
|
_('Flop Seen %')
|
||||||
)
|
)
|
||||||
|
@ -341,9 +351,9 @@ def fold_f(stat_dict, player):
|
||||||
try:
|
try:
|
||||||
stat = float(stat_dict[player]['fold_2'])/float(stat_dict[player]['saw_f'])
|
stat = float(stat_dict[player]['fold_2'])/float(stat_dict[player]['saw_f'])
|
||||||
return (stat,
|
return (stat,
|
||||||
'%3.1f' % (100.0*stat),
|
'%3.1f' % (100*stat) + '%',
|
||||||
'ff=%3.1f%%' % (100.0*stat),
|
'ff=%3.1f' % (100*stat) + '%',
|
||||||
'fold_f=%3.1f%%' % (100.0*stat),
|
'fold_f=%3.1f' % (100*stat) + '%',
|
||||||
'(%d/%d)' % (stat_dict[player]['fold_2'], stat_dict[player]['saw_f']),
|
'(%d/%d)' % (stat_dict[player]['fold_2'], stat_dict[player]['saw_f']),
|
||||||
_('folded flop/4th')
|
_('folded flop/4th')
|
||||||
)
|
)
|
||||||
|
@ -362,9 +372,9 @@ def steal(stat_dict, player):
|
||||||
try:
|
try:
|
||||||
stat = float(stat_dict[player]['steal'])/float(stat_dict[player]['steal_opp'])
|
stat = float(stat_dict[player]['steal'])/float(stat_dict[player]['steal_opp'])
|
||||||
return (stat,
|
return (stat,
|
||||||
'%3.1f' % (100.0*stat),
|
'%3.1f' % (100*stat) + '%',
|
||||||
'st=%3.1f%%' % (100.0*stat),
|
'st=%3.1f' % (100*stat) + '%',
|
||||||
'steal=%3.1f%%' % (100.0*stat),
|
'steal=%3.1f' % (100*stat) + '%',
|
||||||
'(%d/%d)' % (stat_dict[player]['steal'], stat_dict[player]['steal_opp']),
|
'(%d/%d)' % (stat_dict[player]['steal'], stat_dict[player]['steal_opp']),
|
||||||
_('% steal attempted')
|
_('% steal attempted')
|
||||||
)
|
)
|
||||||
|
@ -377,9 +387,9 @@ def f_SB_steal(stat_dict, player):
|
||||||
try:
|
try:
|
||||||
stat = float(stat_dict[player]['sbnotdef'])/float(stat_dict[player]['sbstolen'])
|
stat = float(stat_dict[player]['sbnotdef'])/float(stat_dict[player]['sbstolen'])
|
||||||
return (stat,
|
return (stat,
|
||||||
'%3.1f' % (100.0*stat),
|
'%3.1f' % (100*stat) + '%',
|
||||||
'fSB=%3.1f%%' % (100.0*stat),
|
'fSB=%3.1f' % (100*stat) + '%',
|
||||||
'fSB_s=%3.1f%%' % (100.0*stat),
|
'fSB_s=%3.1f' % (100*stat) + '%',
|
||||||
'(%d/%d)' % (stat_dict[player]['sbnotdef'], stat_dict[player]['sbstolen']),
|
'(%d/%d)' % (stat_dict[player]['sbnotdef'], stat_dict[player]['sbstolen']),
|
||||||
_('% folded SB to steal'))
|
_('% folded SB to steal'))
|
||||||
except:
|
except:
|
||||||
|
@ -396,9 +406,9 @@ def f_BB_steal(stat_dict, player):
|
||||||
try:
|
try:
|
||||||
stat = float(stat_dict[player]['bbnotdef'])/float(stat_dict[player]['bbstolen'])
|
stat = float(stat_dict[player]['bbnotdef'])/float(stat_dict[player]['bbstolen'])
|
||||||
return (stat,
|
return (stat,
|
||||||
'%3.1f' % (100.0*stat),
|
'%3.1f' % (100*stat) + '%',
|
||||||
'fBB=%3.1f%%' % (100.0*stat),
|
'fBB=%3.1f' % (100*stat) + '%',
|
||||||
'fBB_s=%3.1f%%' % (100.0*stat),
|
'fBB_s=%3.1f' % (100*stat) + '%',
|
||||||
'(%d/%d)' % (stat_dict[player]['bbnotdef'], stat_dict[player]['bbstolen']),
|
'(%d/%d)' % (stat_dict[player]['bbnotdef'], stat_dict[player]['bbstolen']),
|
||||||
_('% folded BB to steal'))
|
_('% folded BB to steal'))
|
||||||
except:
|
except:
|
||||||
|
@ -418,9 +428,9 @@ def f_steal(stat_dict, player):
|
||||||
|
|
||||||
stat = float(folded_blind)/float(blind_stolen)
|
stat = float(folded_blind)/float(blind_stolen)
|
||||||
return (stat,
|
return (stat,
|
||||||
'%3.1f' % (100.0*stat),
|
'%3.1f' % (100*stat) + '%',
|
||||||
'fB=%3.1f%%' % (100.0*stat),
|
'fB=%3.1f' % (100*stat) + '%',
|
||||||
'fB_s=%3.1f%%' % (100.0*stat),
|
'fB_s=%3.1f' % (100*stat) + '%',
|
||||||
'(%d/%d)' % (folded_blind, blind_stolen),
|
'(%d/%d)' % (folded_blind, blind_stolen),
|
||||||
_('% folded blind to steal'))
|
_('% folded blind to steal'))
|
||||||
except:
|
except:
|
||||||
|
@ -437,9 +447,9 @@ def three_B(stat_dict, player):
|
||||||
try:
|
try:
|
||||||
stat = float(stat_dict[player]['tb_0'])/float(stat_dict[player]['tb_opp_0'])
|
stat = float(stat_dict[player]['tb_0'])/float(stat_dict[player]['tb_opp_0'])
|
||||||
return (stat,
|
return (stat,
|
||||||
'%3.1f' % (100.0*stat),
|
'%3.1f' % (100*stat) + '%',
|
||||||
'3B=%3.1f%%' % (100.0*stat),
|
'3B=%3.1f' % (100*stat) + '%',
|
||||||
'3B_pf=%3.1f%%' % (100.0*stat),
|
'3B_pf=%3.1f' % (100*stat) + '%',
|
||||||
'(%d/%d)' % (stat_dict[player]['tb_0'], stat_dict[player]['tb_opp_0']),
|
'(%d/%d)' % (stat_dict[player]['tb_0'], stat_dict[player]['tb_opp_0']),
|
||||||
_('% 3/4 Bet preflop/3rd'))
|
_('% 3/4 Bet preflop/3rd'))
|
||||||
except:
|
except:
|
||||||
|
@ -456,9 +466,9 @@ def WMsF(stat_dict, player):
|
||||||
try:
|
try:
|
||||||
stat = float(stat_dict[player]['w_w_s_1'])/float(stat_dict[player]['saw_1'])
|
stat = float(stat_dict[player]['w_w_s_1'])/float(stat_dict[player]['saw_1'])
|
||||||
return (stat,
|
return (stat,
|
||||||
'%3.1f' % (100.0*stat),
|
'%3.1f' % (100*stat) + '%',
|
||||||
'wf=%3.1f%%' % (100.0*stat),
|
'wf=%3.1f' % (100*stat) + '%',
|
||||||
'w_w_f=%3.1f%%' % (100.0*stat),
|
'w_w_f=%3.1f' % (100*stat) + '%',
|
||||||
'(%d/%d)' % (stat_dict[player]['w_w_s_1'], stat_dict[player]['saw_f']),
|
'(%d/%d)' % (stat_dict[player]['w_w_s_1'], stat_dict[player]['saw_f']),
|
||||||
_('% won$/saw flop/4th'))
|
_('% won$/saw flop/4th'))
|
||||||
except:
|
except:
|
||||||
|
@ -475,9 +485,9 @@ def a_freq1(stat_dict, player):
|
||||||
try:
|
try:
|
||||||
stat = float(stat_dict[player]['aggr_1'])/float(stat_dict[player]['saw_f'])
|
stat = float(stat_dict[player]['aggr_1'])/float(stat_dict[player]['saw_f'])
|
||||||
return (stat,
|
return (stat,
|
||||||
'%3.1f' % (100.0*stat),
|
'%3.1f' % (100*stat) + '%',
|
||||||
'a1=%3.1f%%' % (100.0*stat),
|
'a1=%3.1f' % (100*stat) + '%',
|
||||||
'a_fq_1=%3.1f%%' % (100.0*stat),
|
'a_fq_1=%3.1f' % (100*stat) + '%',
|
||||||
'(%d/%d)' % (stat_dict[player]['aggr_1'], stat_dict[player]['saw_f']),
|
'(%d/%d)' % (stat_dict[player]['aggr_1'], stat_dict[player]['saw_f']),
|
||||||
_('Aggression Freq flop/4th'))
|
_('Aggression Freq flop/4th'))
|
||||||
except:
|
except:
|
||||||
|
@ -494,9 +504,9 @@ def a_freq2(stat_dict, player):
|
||||||
try:
|
try:
|
||||||
stat = float(stat_dict[player]['aggr_2'])/float(stat_dict[player]['saw_2'])
|
stat = float(stat_dict[player]['aggr_2'])/float(stat_dict[player]['saw_2'])
|
||||||
return (stat,
|
return (stat,
|
||||||
'%3.1f' % (100.0*stat),
|
'%3.1f' % (100*stat) + '%',
|
||||||
'a2=%3.1f%%' % (100.0*stat),
|
'a2=%3.1f' % (100*stat) + '%',
|
||||||
'a_fq_2=%3.1f%%' % (100.0*stat),
|
'a_fq_2=%3.1f' % (100*stat) + '%',
|
||||||
'(%d/%d)' % (stat_dict[player]['aggr_2'], stat_dict[player]['saw_2']),
|
'(%d/%d)' % (stat_dict[player]['aggr_2'], stat_dict[player]['saw_2']),
|
||||||
_('Aggression Freq turn/5th'))
|
_('Aggression Freq turn/5th'))
|
||||||
except:
|
except:
|
||||||
|
@ -513,9 +523,9 @@ def a_freq3(stat_dict, player):
|
||||||
try:
|
try:
|
||||||
stat = float(stat_dict[player]['aggr_3'])/float(stat_dict[player]['saw_3'])
|
stat = float(stat_dict[player]['aggr_3'])/float(stat_dict[player]['saw_3'])
|
||||||
return (stat,
|
return (stat,
|
||||||
'%3.1f' % (100.0*stat),
|
'%3.1f' % (100*stat) + '%',
|
||||||
'a3=%3.1f%%' % (100.0*stat),
|
'a3=%3.1f' % (100*stat) + '%',
|
||||||
'a_fq_3=%3.1f%%' % (100.0*stat),
|
'a_fq_3=%3.1f' % (100*stat) + '%',
|
||||||
'(%d/%d)' % (stat_dict[player]['aggr_3'], stat_dict[player]['saw_3']),
|
'(%d/%d)' % (stat_dict[player]['aggr_3'], stat_dict[player]['saw_3']),
|
||||||
_('Aggression Freq river/6th'))
|
_('Aggression Freq river/6th'))
|
||||||
except:
|
except:
|
||||||
|
@ -532,9 +542,9 @@ def a_freq4(stat_dict, player):
|
||||||
try:
|
try:
|
||||||
stat = float(stat_dict[player]['aggr_4'])/float(stat_dict[player]['saw_4'])
|
stat = float(stat_dict[player]['aggr_4'])/float(stat_dict[player]['saw_4'])
|
||||||
return (stat,
|
return (stat,
|
||||||
'%3.1f' % (100.0*stat),
|
'%3.1f' % (100*stat) + '%',
|
||||||
'a4=%3.1f%%' % (100.0*stat),
|
'a4=%3.1f' % (100*stat) + '%',
|
||||||
'a_fq_4=%3.1f%%' % (100.0*stat),
|
'a_fq_4=%3.1f' % (100*stat) + '%',
|
||||||
'(%d/%d)' % (stat_dict[player]['aggr_4'], stat_dict[player]['saw_4']),
|
'(%d/%d)' % (stat_dict[player]['aggr_4'], stat_dict[player]['saw_4']),
|
||||||
_('Aggression Freq 7th'))
|
_('Aggression Freq 7th'))
|
||||||
except:
|
except:
|
||||||
|
@ -552,9 +562,9 @@ def a_freq_123(stat_dict, player):
|
||||||
stat = float( stat_dict[player]['aggr_1'] + stat_dict[player]['aggr_2'] + stat_dict[player]['aggr_3']
|
stat = float( stat_dict[player]['aggr_1'] + stat_dict[player]['aggr_2'] + stat_dict[player]['aggr_3']
|
||||||
) / float( stat_dict[player]['saw_1'] + stat_dict[player]['saw_2'] + stat_dict[player]['saw_3']);
|
) / float( stat_dict[player]['saw_1'] + stat_dict[player]['saw_2'] + stat_dict[player]['saw_3']);
|
||||||
return (stat,
|
return (stat,
|
||||||
'%3.1f' % (100.0*stat),
|
'%3.1f' % (100*stat) + '%',
|
||||||
'afq=%3.1f%%' % (100.0*stat),
|
'afq=%3.1f' % (100*stat) + '%',
|
||||||
'postf_aggfq=%3.1f%%' % (100.0*stat),
|
'postf_aggfq=%3.1f' % (100*stat) + '%',
|
||||||
'(%d/%d)' % ( stat_dict[player]['aggr_1']
|
'(%d/%d)' % ( stat_dict[player]['aggr_1']
|
||||||
+ stat_dict[player]['aggr_2']
|
+ stat_dict[player]['aggr_2']
|
||||||
+ stat_dict[player]['aggr_3']
|
+ stat_dict[player]['aggr_3']
|
||||||
|
@ -586,9 +596,9 @@ def agg_freq(stat_dict, player):
|
||||||
stat = float (bet_raise) / float(post_call + post_fold + bet_raise)
|
stat = float (bet_raise) / float(post_call + post_fold + bet_raise)
|
||||||
|
|
||||||
return (stat,
|
return (stat,
|
||||||
'%3.1f' % (100.0*stat),
|
'%3.1f' % (100*stat) + '%',
|
||||||
'afr=%3.1f%%' % (100.0*stat),
|
'afr=%3.1f' % (100*stat) + '%',
|
||||||
'agg_fr=%3.1f%%' % (100.0*stat),
|
'agg_fr=%3.1f' % (100*stat) + '%',
|
||||||
'(%d/%d)' % (bet_raise, (post_call + post_fold + bet_raise)),
|
'(%d/%d)' % (bet_raise, (post_call + post_fold + bet_raise)),
|
||||||
_('Aggression Freq'))
|
_('Aggression Freq'))
|
||||||
except:
|
except:
|
||||||
|
@ -636,9 +646,9 @@ def cbet(stat_dict, player):
|
||||||
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']
|
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)
|
stat = float(cbets)/float(oppt)
|
||||||
return (stat,
|
return (stat,
|
||||||
'%3.1f' % (100.0*stat),
|
'%3.1f' % (100*stat) + '%',
|
||||||
'cbet=%3.1f%%' % (100.0*stat),
|
'cbet=%3.1f' % (100*stat) + '%',
|
||||||
'cbet=%3.1f%%' % (100.0*stat),
|
'cbet=%3.1f' % (100*stat) + '%',
|
||||||
'(%d/%d)' % (cbets, oppt),
|
'(%d/%d)' % (cbets, oppt),
|
||||||
_('% continuation bet '))
|
_('% continuation bet '))
|
||||||
except:
|
except:
|
||||||
|
@ -655,9 +665,9 @@ def cb1(stat_dict, player):
|
||||||
try:
|
try:
|
||||||
stat = float(stat_dict[player]['cb_1'])/float(stat_dict[player]['cb_opp_1'])
|
stat = float(stat_dict[player]['cb_1'])/float(stat_dict[player]['cb_opp_1'])
|
||||||
return (stat,
|
return (stat,
|
||||||
'%3.1f' % (100.0*stat),
|
'%3.1f' % (100*stat) + '%',
|
||||||
'cb1=%3.1f%%' % (100.0*stat),
|
'cb1=%3.1f' % (100*stat) + '%',
|
||||||
'cb_1=%3.1f%%' % (100.0*stat),
|
'cb_1=%3.1f' % (100*stat) + '%',
|
||||||
'(%d/%d)' % (stat_dict[player]['cb_1'], stat_dict[player]['cb_opp_1']),
|
'(%d/%d)' % (stat_dict[player]['cb_1'], stat_dict[player]['cb_opp_1']),
|
||||||
_('% continuation bet flop/4th'))
|
_('% continuation bet flop/4th'))
|
||||||
except:
|
except:
|
||||||
|
@ -674,9 +684,9 @@ def cb2(stat_dict, player):
|
||||||
try:
|
try:
|
||||||
stat = float(stat_dict[player]['cb_2'])/float(stat_dict[player]['cb_opp_2'])
|
stat = float(stat_dict[player]['cb_2'])/float(stat_dict[player]['cb_opp_2'])
|
||||||
return (stat,
|
return (stat,
|
||||||
'%3.1f' % (100.0*stat),
|
'%3.1f' % (100*stat) + '%',
|
||||||
'cb2=%3.1f%%' % (100.0*stat),
|
'cb2=%3.1f' % (100*stat) + '%',
|
||||||
'cb_2=%3.1f%%' % (100.0*stat),
|
'cb_2=%3.1f' % (100*stat) + '%',
|
||||||
'(%d/%d)' % (stat_dict[player]['cb_2'], stat_dict[player]['cb_opp_2']),
|
'(%d/%d)' % (stat_dict[player]['cb_2'], stat_dict[player]['cb_opp_2']),
|
||||||
_('% continuation bet turn/5th'))
|
_('% continuation bet turn/5th'))
|
||||||
except:
|
except:
|
||||||
|
@ -693,9 +703,9 @@ def cb3(stat_dict, player):
|
||||||
try:
|
try:
|
||||||
stat = float(stat_dict[player]['cb_3'])/float(stat_dict[player]['cb_opp_3'])
|
stat = float(stat_dict[player]['cb_3'])/float(stat_dict[player]['cb_opp_3'])
|
||||||
return (stat,
|
return (stat,
|
||||||
'%3.1f' % (100.0*stat),
|
'%3.1f' % (100*stat) + '%',
|
||||||
'cb3=%3.1f%%' % (100.0*stat),
|
'cb3=%3.1f' % (100*stat) + '%',
|
||||||
'cb_3=%3.1f%%' % (100.0*stat),
|
'cb_3=%3.1f' % (100*stat) + '%',
|
||||||
'(%d/%d)' % (stat_dict[player]['cb_3'], stat_dict[player]['cb_opp_3']),
|
'(%d/%d)' % (stat_dict[player]['cb_3'], stat_dict[player]['cb_opp_3']),
|
||||||
_('% continuation bet river/6th'))
|
_('% continuation bet river/6th'))
|
||||||
except:
|
except:
|
||||||
|
@ -712,9 +722,9 @@ def cb4(stat_dict, player):
|
||||||
try:
|
try:
|
||||||
stat = float(stat_dict[player]['cb_4'])/float(stat_dict[player]['cb_opp_4'])
|
stat = float(stat_dict[player]['cb_4'])/float(stat_dict[player]['cb_opp_4'])
|
||||||
return (stat,
|
return (stat,
|
||||||
'%3.1f' % (100.0*stat),
|
'%3.1f' % (100*stat) + '%',
|
||||||
'cb4=%3.1f%%' % (100.0*stat),
|
'cb4=%3.1f' % (100*stat) + '%',
|
||||||
'cb_4=%3.1f%%' % (100.0*stat),
|
'cb_4=%3.1f' % (100*stat) + '%',
|
||||||
'(%d/%d)' % (stat_dict[player]['cb_4'], stat_dict[player]['cb_opp_4']),
|
'(%d/%d)' % (stat_dict[player]['cb_4'], stat_dict[player]['cb_opp_4']),
|
||||||
_('% continuation bet 7th'))
|
_('% continuation bet 7th'))
|
||||||
except:
|
except:
|
||||||
|
@ -731,9 +741,9 @@ def ffreq1(stat_dict, player):
|
||||||
try:
|
try:
|
||||||
stat = float(stat_dict[player]['f_freq_1'])/float(stat_dict[player]['was_raised_1'])
|
stat = float(stat_dict[player]['f_freq_1'])/float(stat_dict[player]['was_raised_1'])
|
||||||
return (stat,
|
return (stat,
|
||||||
'%3.1f' % (100.0*stat),
|
'%3.1f' % (100*stat) + '%',
|
||||||
'ff1=%3.1f%%' % (100.0*stat),
|
'ff1=%3.1f' % (100*stat) + '%',
|
||||||
'ff_1=%3.1f%%' % (100.0*stat),
|
'ff_1=%3.1f' % (100*stat) + '%',
|
||||||
'(%d/%d)' % (stat_dict[player]['f_freq_1'], stat_dict[player]['was_raised_1']),
|
'(%d/%d)' % (stat_dict[player]['f_freq_1'], stat_dict[player]['was_raised_1']),
|
||||||
_('% fold frequency flop/4th'))
|
_('% fold frequency flop/4th'))
|
||||||
except:
|
except:
|
||||||
|
@ -750,9 +760,9 @@ def ffreq2(stat_dict, player):
|
||||||
try:
|
try:
|
||||||
stat = float(stat_dict[player]['f_freq_2'])/float(stat_dict[player]['was_raised_2'])
|
stat = float(stat_dict[player]['f_freq_2'])/float(stat_dict[player]['was_raised_2'])
|
||||||
return (stat,
|
return (stat,
|
||||||
'%3.1f' % (100.0*stat),
|
'%3.1f' % (100*stat) + '%',
|
||||||
'ff2=%3.1f%%' % (100.0*stat),
|
'ff2=%3.1f' % (100*stat) + '%',
|
||||||
'ff_2=%3.1f%%' % (100.0*stat),
|
'ff_2=%3.1f' % (100*stat) + '%',
|
||||||
'(%d/%d)' % (stat_dict[player]['f_freq_2'], stat_dict[player]['was_raised_2']),
|
'(%d/%d)' % (stat_dict[player]['f_freq_2'], stat_dict[player]['was_raised_2']),
|
||||||
_('% fold frequency turn/5th'))
|
_('% fold frequency turn/5th'))
|
||||||
except:
|
except:
|
||||||
|
@ -769,9 +779,9 @@ def ffreq3(stat_dict, player):
|
||||||
try:
|
try:
|
||||||
stat = float(stat_dict[player]['f_freq_3'])/float(stat_dict[player]['was_raised_3'])
|
stat = float(stat_dict[player]['f_freq_3'])/float(stat_dict[player]['was_raised_3'])
|
||||||
return (stat,
|
return (stat,
|
||||||
'%3.1f' % (100.0*stat),
|
'%3.1f' % (100*stat) + '%',
|
||||||
'ff3=%3.1f%%' % (100.0*stat),
|
'ff3=%3.1f' % (100*stat) + '%',
|
||||||
'ff_3=%3.1f%%' % (100.0*stat),
|
'ff_3=%3.1f' % (100*stat) + '%',
|
||||||
'(%d/%d)' % (stat_dict[player]['f_freq_3'], stat_dict[player]['was_raised_3']),
|
'(%d/%d)' % (stat_dict[player]['f_freq_3'], stat_dict[player]['was_raised_3']),
|
||||||
_('% fold frequency river/6th'))
|
_('% fold frequency river/6th'))
|
||||||
except:
|
except:
|
||||||
|
@ -788,9 +798,9 @@ def ffreq4(stat_dict, player):
|
||||||
try:
|
try:
|
||||||
stat = float(stat_dict[player]['f_freq_4'])/float(stat_dict[player]['was_raised_4'])
|
stat = float(stat_dict[player]['f_freq_4'])/float(stat_dict[player]['was_raised_4'])
|
||||||
return (stat,
|
return (stat,
|
||||||
'%3.1f' % (100.0*stat),
|
'%3.1f' % (100*stat) + '%',
|
||||||
'ff4=%3.1f%%' % (100.0*stat),
|
'ff4=%3.1f' % (100*stat) + '%',
|
||||||
'ff_4=%3.1f%%' % (100.0*stat),
|
'ff_4=%3.1f' % (100*stat) + '%',
|
||||||
'(%d/%d)' % (stat_dict[player]['f_freq_4'], stat_dict[player]['was_raised_4']),
|
'(%d/%d)' % (stat_dict[player]['f_freq_4'], stat_dict[player]['was_raised_4']),
|
||||||
_('% fold frequency 7th'))
|
_('% fold frequency 7th'))
|
||||||
except:
|
except:
|
||||||
|
@ -805,7 +815,7 @@ if __name__== "__main__":
|
||||||
statlist = dir()
|
statlist = dir()
|
||||||
misslist = [ "Configuration", "Database", "Charset", "codecs", "encoder"
|
misslist = [ "Configuration", "Database", "Charset", "codecs", "encoder"
|
||||||
, "do_stat", "do_tip", "GInitiallyUnowned", "gtk", "pygtk"
|
, "do_stat", "do_tip", "GInitiallyUnowned", "gtk", "pygtk"
|
||||||
, "re", "re_Places"
|
, "re", "re_Percent", "re_Places"
|
||||||
]
|
]
|
||||||
statlist = [ x for x in statlist if x not in dir(sys) ]
|
statlist = [ x for x in statlist if x not in dir(sys) ]
|
||||||
statlist = [ x for x in statlist if x not in dir(codecs) ]
|
statlist = [ x for x in statlist if x not in dir(codecs) ]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user