From 5c5520eaaae36ba0c5121364bc7ab0cf9af6821f Mon Sep 17 00:00:00 2001 From: Worros Date: Wed, 23 Feb 2011 19:09:05 +0800 Subject: [PATCH 1/8] Regression: FTP 5 Card Draw PL --- ...w-PL-0.10-0.25-201011.Sample.Not.UTF16.txt | Bin 0 -> 2284 bytes ....10-0.25-201011.Sample.Not.UTF16.txt.hands | 31 ++ ...L-0.10-0.25-201011.Sample.Not.UTF16.txt.hp | 412 ++++++++++++++++++ 3 files changed, 443 insertions(+) create mode 100644 pyfpdb/regression-test-files/cash/FTP/Draw/5-Carddraw-PL-0.10-0.25-201011.Sample.Not.UTF16.txt create mode 100644 pyfpdb/regression-test-files/cash/FTP/Draw/5-Carddraw-PL-0.10-0.25-201011.Sample.Not.UTF16.txt.hands create mode 100644 pyfpdb/regression-test-files/cash/FTP/Draw/5-Carddraw-PL-0.10-0.25-201011.Sample.Not.UTF16.txt.hp diff --git a/pyfpdb/regression-test-files/cash/FTP/Draw/5-Carddraw-PL-0.10-0.25-201011.Sample.Not.UTF16.txt b/pyfpdb/regression-test-files/cash/FTP/Draw/5-Carddraw-PL-0.10-0.25-201011.Sample.Not.UTF16.txt new file mode 100644 index 0000000000000000000000000000000000000000..02e4c45e1a8b9cc68954cd04de2f69756e4a2fa7 GIT binary patch literal 2284 zcmb_dZEq4m5T4H_{)bI!A{wQ@Q7rvNO105irC=IE`r$ahl0s=XOl#8Lu0GGqZTH|H zwTZdh?cDCXKQps`e!rKWGR5PhCljnoP+w&(S2B_X=noRh478ISsmY#1QkROZO{{zl zR5q3Yq{-KkJ6(?jew-OlH5p+bHldcl4%)ES9DDpnu)t z8)Pj-L@D@}a;Z3^nsvjN7)=xv2hK6L0tSpOM6*fL0J1+IvrP-pqn2J~d4Sql;+eyu zgDkzGbqC64eg_dz=CwW!9()1jN8mX`C7l7~E@(R?Ut1-uPN|s^#EVp4I$9YYVc*Fo zN$~9`9l_#-+R0~(2qZw9xuI{C3m-+ElldRR#uWO~f*#h&>S^#P(Oe|xCzJDWwh>!P z&LQb{O4@fz#ojz=JXBrKH`F}RYjy#>j_~IH`;w1;d*qkULHVlo6%k1kDbvbc9s@hp z5px^kbXka;87z9ld<2jF6*VGt0m(jkD8brNEF;jHk+XUl=IWtnH{@*{hdjEBVgNnX zH>*{U*RZWpJc3=VUSirt6`#u~s8G4<7E{DK$NVA&ee^VAZt7oCBX8+W4Li&VyLka0 zIbp4HV^CMxPeXYF`c&x=_?hwG_Y7Sa>TlhPTa}^@eqONiiMvg|GHP&7CpJ0B^K@TA ze!j_PJnZZ5&=YdgQ=81M6K|ih*KP+V_t-x}4f0mEly;^91BAW}APDfhs**6P*LfKTZ3b$&vI=B0Z$lf5@2|V#=cYq?%zs~RtQE$Fk we06!dkJXpm)eiM&)B69RA3WW5ujTKFr=r3-@~ literal 0 HcmV?d00001 diff --git a/pyfpdb/regression-test-files/cash/FTP/Draw/5-Carddraw-PL-0.10-0.25-201011.Sample.Not.UTF16.txt.hands b/pyfpdb/regression-test-files/cash/FTP/Draw/5-Carddraw-PL-0.10-0.25-201011.Sample.Not.UTF16.txt.hands new file mode 100644 index 00000000..d9716d32 --- /dev/null +++ b/pyfpdb/regression-test-files/cash/FTP/Draw/5-Carddraw-PL-0.10-0.25-201011.Sample.Not.UTF16.txt.hands @@ -0,0 +1,31 @@ +{ 'boardcard1': 0, + 'boardcard2': 0, + 'boardcard3': 0, + 'boardcard4': 0, + 'boardcard5': 0, + 'gametypeId': 1, + 'importTime': None, + 'maxSeats': 6, + 'playersAtShowdown': 2, + 'playersAtStreet1': 2, + 'playersAtStreet2': 2, + 'playersAtStreet3': 2, + 'playersAtStreet4': 0, + 'playersVpi': 1, + 'seats': 4, + 'sessionId': None, + 'showdownPot': 0, + 'siteHandNo': u'25340539000', + 'startTime': datetime.datetime(2010, 11, 7, 7, 58, tzinfo=pytz.utc), + 'street0Raises': 0, + 'street1Pot': 0, + 'street1Raises': 1, + 'street2Pot': 0, + 'street2Raises': 0, + 'street3Pot': 0, + 'street3Raises': 0, + 'street4Pot': 0, + 'street4Raises': 0, + 'tableName': u'Axe Handle', + 'texture': None, + 'tourneyId': None} diff --git a/pyfpdb/regression-test-files/cash/FTP/Draw/5-Carddraw-PL-0.10-0.25-201011.Sample.Not.UTF16.txt.hp b/pyfpdb/regression-test-files/cash/FTP/Draw/5-Carddraw-PL-0.10-0.25-201011.Sample.Not.UTF16.txt.hp new file mode 100644 index 00000000..0bbc0953 --- /dev/null +++ b/pyfpdb/regression-test-files/cash/FTP/Draw/5-Carddraw-PL-0.10-0.25-201011.Sample.Not.UTF16.txt.hp @@ -0,0 +1,412 @@ +{ u'Hero': { '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': True, + 'otherRaisedStreet2': False, + 'otherRaisedStreet3': False, + 'otherRaisedStreet4': False, + 'position': 'B', + 'raiseFirstInChance': False, + 'raisedFirstIn': False, + 'rake': 0, + 'sawShowdown': True, + 'seatNo': 3, + 'sitout': False, + 'startCards': 0, + 'startCash': 2713, + 'street0Aggr': False, + 'street0Bets': 0, + 'street0Calls': 0, + 'street0Raises': 0, + 'street0VPI': False, + 'street0_3BChance': False, + 'street0_3BDone': False, + 'street0_4BChance': False, + 'street0_4BDone': False, + 'street0_C4BChance': False, + 'street0_C4BDone': False, + 'street0_FoldTo3BChance': False, + 'street0_FoldTo3BDone': False, + 'street0_FoldTo4BChance': False, + 'street0_FoldTo4BDone': False, + 'street0_SqueezeChance': False, + 'street0_SqueezeDone': 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': 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, + 'success_Steal': False, + 'totalProfit': -50, + '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': 'S', + 'raiseFirstInChance': False, + 'raisedFirstIn': False, + 'rake': 0, + 'sawShowdown': False, + 'seatNo': 2, + 'sitout': False, + 'startCards': 0, + 'startCash': 1470, + 'street0Aggr': False, + 'street0Bets': 0, + 'street0Calls': 0, + 'street0Raises': 0, + 'street0VPI': False, + 'street0_3BChance': False, + 'street0_3BDone': False, + 'street0_4BChance': False, + 'street0_4BDone': False, + 'street0_C4BChance': False, + 'street0_C4BDone': False, + 'street0_FoldTo3BChance': False, + 'street0_FoldTo3BDone': False, + 'street0_FoldTo4BChance': False, + 'street0_FoldTo4BDone': False, + 'street0_SqueezeChance': False, + 'street0_SqueezeDone': 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, + 'success_Steal': False, + 'totalProfit': -10, + 'tourneyTypeId': None, + 'tourneysPlayersIds': None, + 'winnings': 0, + 'wonAtSD': 0.0, + 'wonWhenSeenStreet1': 0.0, + 'wonWhenSeenStreet2': 0.0, + 'wonWhenSeenStreet3': 0.0, + 'wonWhenSeenStreet4': 0.0}, + u'Player4': { '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': 1, + 'raiseFirstInChance': True, + 'raisedFirstIn': False, + 'rake': 5, + 'sawShowdown': True, + 'seatNo': 4, + 'sitout': False, + 'startCards': 0, + 'startCash': 800, + 'street0Aggr': False, + 'street0Bets': 0, + 'street0Calls': 1, + 'street0Raises': 0, + 'street0VPI': True, + 'street0_3BChance': False, + 'street0_3BDone': False, + 'street0_4BChance': False, + 'street0_4BDone': False, + 'street0_C4BChance': False, + 'street0_C4BDone': False, + 'street0_FoldTo3BChance': False, + 'street0_FoldTo3BDone': False, + 'street0_FoldTo4BChance': False, + 'street0_FoldTo4BDone': False, + 'street0_SqueezeChance': False, + 'street0_SqueezeDone': 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': 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, + 'success_Steal': False, + 'totalProfit': 55, + 'tourneyTypeId': None, + 'tourneysPlayersIds': None, + 'winnings': 105, + 'wonAtSD': 1.0, + 'wonWhenSeenStreet1': 1.0, + 'wonWhenSeenStreet2': 1.0, + 'wonWhenSeenStreet3': 1.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': 0, + 'raiseFirstInChance': False, + 'raisedFirstIn': False, + 'rake': 0, + 'sawShowdown': False, + 'seatNo': 6, + 'sitout': False, + 'startCards': 0, + 'startCash': 2693, + 'street0Aggr': False, + 'street0Bets': 0, + 'street0Calls': 0, + 'street0Raises': 0, + 'street0VPI': False, + 'street0_3BChance': False, + 'street0_3BDone': False, + 'street0_4BChance': False, + 'street0_4BDone': False, + 'street0_C4BChance': False, + 'street0_C4BDone': False, + 'street0_FoldTo3BChance': False, + 'street0_FoldTo3BDone': False, + 'street0_FoldTo4BChance': False, + 'street0_FoldTo4BDone': False, + 'street0_SqueezeChance': False, + 'street0_SqueezeDone': 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, + 'success_Steal': False, + 'totalProfit': 0, + 'tourneyTypeId': None, + 'tourneysPlayersIds': None, + 'winnings': 0, + 'wonAtSD': 0.0, + 'wonWhenSeenStreet1': 0.0, + 'wonWhenSeenStreet2': 0.0, + 'wonWhenSeenStreet3': 0.0, + 'wonWhenSeenStreet4': 0.0}} From cc1c90eadef20d9db96103663a101b7ee89aee2f Mon Sep 17 00:00:00 2001 From: Worros Date: Wed, 23 Feb 2011 19:21:45 +0800 Subject: [PATCH 2/8] Regression: FTP Badugi sample hand --- ...-USD-0.05-0.10-201011.Sample.Not.UTF16.txt | Bin 0 -> 4702 bytes ...D-0.05-0.10-201011.Sample.Not.UTF16.txt.gt | 1 + ....05-0.10-201011.Sample.Not.UTF16.txt.hands | 31 + ...D-0.05-0.10-201011.Sample.Not.UTF16.txt.hp | 721 ++++++++++++++++++ 4 files changed, 753 insertions(+) create mode 100644 pyfpdb/regression-test-files/cash/FTP/Draw/Badugi-USD-0.05-0.10-201011.Sample.Not.UTF16.txt create mode 100644 pyfpdb/regression-test-files/cash/FTP/Draw/Badugi-USD-0.05-0.10-201011.Sample.Not.UTF16.txt.gt create mode 100644 pyfpdb/regression-test-files/cash/FTP/Draw/Badugi-USD-0.05-0.10-201011.Sample.Not.UTF16.txt.hands create mode 100644 pyfpdb/regression-test-files/cash/FTP/Draw/Badugi-USD-0.05-0.10-201011.Sample.Not.UTF16.txt.hp diff --git a/pyfpdb/regression-test-files/cash/FTP/Draw/Badugi-USD-0.05-0.10-201011.Sample.Not.UTF16.txt b/pyfpdb/regression-test-files/cash/FTP/Draw/Badugi-USD-0.05-0.10-201011.Sample.Not.UTF16.txt new file mode 100644 index 0000000000000000000000000000000000000000..31b7fbeec0d50eb658b5c0ee8ae13274551d233c GIT binary patch literal 4702 zcmcIo+fExX5S`~r{fCvPR9dx#?B-V9QbI3?ULdJZg?Pvff|>v#Nux^r_O|DY*R139 zCP9FrUA(sEerD|9-{1E#lM#NAwB-VSrx<;cEBPq{xxx5@bYzTiBpVV-MG`5?HvZP} z#8Si8j?#9d3u^8=0L2Wn1APC&*v!7h$}>>DQR=O9T*6l*TswgDF&@f)2dX}Joa5W9 zZbR-4_QrTuq>9-+=xf$u%#+U+-X*-Zq197)A}wgpQGO-W@gu%(U|A%akY17(-Y)W{ z?ITeA*1d7MH-^?V$n`0x(;`KZQY4@#2PllUTp8t*f}VK`-F+FAoQz6JQ36FZAfuY2 zpucD{?MOi5%c$ijY7Pbc>r>Qo6!lxJXi0LbmuoAzULyh%L}h~UREF?#gz;E$LKG53 z7jlXCN7#9Ww?$2?@pAc5=7n;aC~~Gsd9IW*a3>0~sD~tXLBajSQY*@(ood+R_G#whefgl3(gCf(BoK?mg_;m4+Ni6UdCxRqkslrO7;UCWS@n2`Gk`IaDhX zeeX+8PJ_OnUpwkMdUpn2lfUaRBKiz6M)2<>w@UODuM(-fG*0Ai<6=DIOBrG(cXeUQ zKt0sgSoPF*mze88+X3|ObtJymlS5oD>U#~TtY@rPL=W*}ut8n=n43cvUn0F?^<~{! zts{{f(lJrqS^Rp6n;xpE@wUapd-((;w6umbF>1&$INH@st-w>wG2`Vd2SXOJS~8xD zNhxO?b+x|lpaPnmw3!x|Z+axtde!boPEtgMu}Gw>;^D`DQNJqYqMD{h~>hMlJ%V^m;65VW|Wp|}9_!=q}Eq1c__^5KFQA6gOsj$U4x_*`! zUFh9WiZOeNFQO)t52iL)T(?jKcTo+$pyow*R^y&`4RiLmHii*h0#A$RMa}ZKa`)Pp zhoik%Q<;6{TygaYW7n18qdkmVpJH9yM!1a;t+b@BIQHd*G3d*4ZMq)hQ$*gn|G@s5o;-3E14~M+}fQMw{6r$*6VdqTe}BpeeITG*Z0|DA<@?= zU(c3d>0!|4>#z=nD7iSkF306)vq)&^ZSELco2X;QsATrk_9H=LO>mO%#=(=BCnoQ- zW&KL@jEU2%?O@*RdDvAP$}8Q?ccSC`{g>8_ao@@A7rsTstJH6fbLmp`u{Uwvk*8Q; zw_rLFc0Fb%_e7|F>+70%?Yn%&kGJ0+pf~gMSX<@sY%!eyW%CXb$sasNkj6gLziTe* z?D98y>ThcV@0+yY3|5-{)>n!TMaQQ6?wc8!mDs9y!AsWY*hQe)K7Gxeqzd z)yD?EerFZ#DIY^pxEHmUHJ)0ITGOS?VKY0Rhrvwd^Kj>D5pDIWD1OU|&4xyIA2U1) z`CkR1HNj{XBi?kGSrsR<8eW`>dS|!q%j4-`B45;nhr45H;rpVDN Date: Wed, 23 Feb 2011 20:06:53 +0800 Subject: [PATCH 3/8] Filters: Init varible in constructor --- pyfpdb/Filters.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pyfpdb/Filters.py b/pyfpdb/Filters.py index 06935e50..9179caac 100644 --- a/pyfpdb/Filters.py +++ b/pyfpdb/Filters.py @@ -158,6 +158,7 @@ class Filters(threading.Thread): self.type = None # ring/tour self.types = {} # list of all ring/tour values + self.num_limit_types = 0 self.fillLimitsFrame(vbox, self.display) limitsFrame.add(vbox) From d30fb9e72ca9c3e38728694439f2af6a61407431 Mon Sep 17 00:00:00 2001 From: Eratosthenes Date: Wed, 23 Feb 2011 11:59:59 -0500 Subject: [PATCH 4/8] Catch match error on new tables retry or fail gracefully. --- pyfpdb/TableWindow.py | 10 +++++++++- pyfpdb/XTables.py | 4 ++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/pyfpdb/TableWindow.py b/pyfpdb/TableWindow.py index 05c6ce4e..4cab43ad 100644 --- a/pyfpdb/TableWindow.py +++ b/pyfpdb/TableWindow.py @@ -118,6 +118,7 @@ class Table_Window(object): self.site = site self.hud = None # fill in later self.gdkhandle = None + self.number = None if tournament is not None and table_number is not None: self.tournament = int(tournament) self.table = int(table_number) @@ -135,7 +136,14 @@ class Table_Window(object): return None self.search_string = getTableTitleRe(self.config, self.site, self.type, **table_kwargs) - self.find_table_parameters() + trys = 0 + while True: + self.find_table_parameters() + if self.number is not None: break + trys += 1 + if trys > 4: + log.error("Can't find table %s" % table_name) + return None geo = self.get_geometry() if geo is None: return None diff --git a/pyfpdb/XTables.py b/pyfpdb/XTables.py index 6ca77e67..fa39e044 100644 --- a/pyfpdb/XTables.py +++ b/pyfpdb/XTables.py @@ -67,11 +67,11 @@ class Table(Table_Window): self.number = int( mo.groupdict()["XID"], 0 ) self.title = title if self.number is None: - log.error("Could not retrieve XID from table xwininfo. xwininfo is %s" % listing) + log.warning("Could not retrieve XID from table xwininfo. xwininfo is %s" % listing) break if self.number is None: - log.error("No match in XTables for table '%s'." % self.search_string) + log.warning("No match in XTables for table '%s'." % self.search_string) return None (self.window, self.parent) = self.get_window_from_xid(self.number) From ddb45ff8c3fae9350934d9eb2aaba742b25d2e86 Mon Sep 17 00:00:00 2001 From: Worros Date: Thu, 24 Feb 2011 15:00:03 +0800 Subject: [PATCH 5/8] Filters: Fix broken show/hide button for Graphing Options Patch from scott@wolchok.org --- pyfpdb/Filters.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/pyfpdb/Filters.py b/pyfpdb/Filters.py index 1e216552..75737ae2 100644 --- a/pyfpdb/Filters.py +++ b/pyfpdb/Filters.py @@ -830,11 +830,16 @@ class Filters(threading.Thread): 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') + showb.connect('clicked', self.__toggle_box, 'graphops') top_hbox.pack_start(showb, expand=False, padding=1) + vbox1 = gtk.VBox(False, 0) + vbox.pack_start(vbox1, False, False, 0) + vbox1.show() + self.boxes['graphops'] = vbox1 + hbox1 = gtk.HBox(False, 0) - vbox.pack_start(hbox1, False, False, 0) + vbox1.pack_start(hbox1, False, False, 0) hbox1.show() label = gtk.Label(_("Show Graph In:")) @@ -853,10 +858,6 @@ class Filters(threading.Thread): 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 From 1e482a8a3767d0d8e3d56dbbf6b220c184bf72bf Mon Sep 17 00:00:00 2001 From: Worros Date: Thu, 24 Feb 2011 22:48:53 +0800 Subject: [PATCH 6/8] FTP: Specify full filename in log when gametype not matched --- pyfpdb/FulltiltToFpdb.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyfpdb/FulltiltToFpdb.py b/pyfpdb/FulltiltToFpdb.py index 29b6d4d2..20980de1 100755 --- a/pyfpdb/FulltiltToFpdb.py +++ b/pyfpdb/FulltiltToFpdb.py @@ -208,8 +208,8 @@ class Fulltilt(HandHistoryConverter): m = self.re_GameInfo.search(handText) if not m: tmp = handText[0:100] + log.error(_("determineGameType: Raising FpdbParseError for file '%s'") % self.in_path) log.error(_("determineGameType: Unable to recognise gametype from: '%s'") % tmp) - log.error(_("determineGameType: Raising FpdbParseError")) raise FpdbParseError(_("Unable to recognise gametype from: '%s'") % tmp) mg = m.groupdict() From cf937285ea62feb2226d74659c772147af47badf Mon Sep 17 00:00:00 2001 From: Worros Date: Thu, 24 Feb 2011 22:49:50 +0800 Subject: [PATCH 7/8] Hand.py: Use str.replace instead of re.sub for stripping commas. From: Scott Wolchok --- pyfpdb/Hand.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/pyfpdb/Hand.py b/pyfpdb/Hand.py index 1e3642aa..0bd08470 100644 --- a/pyfpdb/Hand.py +++ b/pyfpdb/Hand.py @@ -445,7 +445,7 @@ chips (string) the chips the player has at the start of the hand (can be None) If a player has None chips he won't be added.""" log.debug("addPlayer: %s %s (%s)" % (seat, name, chips)) if chips is not None: - chips = re.sub(u',', u'', chips) #some sites have commas + chips = chips.replace(u',', u'') #some sites have commas self.players.append([seat, name, chips]) self.stacks[name] = Decimal(chips) self.pot.addPlayer(name) @@ -487,7 +487,7 @@ If a player has None chips he won't be added.""" For sites (currently only Carbon Poker) which record "all in" as a special action, which can mean either "calls and is all in" or "raises all in". """ self.checkPlayerExists(player) - amount = re.sub(u',', u'', amount) #some sites have commas + amount = amount.replace(u',', u'') #some sites have commas Ai = Decimal(amount) Bp = self.lastBet[street] Bc = reduce(operator.add, self.bets[street][player], 0) @@ -503,7 +503,7 @@ For sites (currently only Carbon Poker) which record "all in" as a special actio def addAnte(self, player, ante): log.debug("%s %s antes %s" % ('BLINDSANTES', player, ante)) if player is not None: - ante = re.sub(u',', u'', ante) #some sites have commas + ante = ante.replace(u',', u'') #some sites have commas self.bets['BLINDSANTES'][player].append(Decimal(ante)) self.stacks[player] -= Decimal(ante) act = (player, 'ante', Decimal(ante), self.stacks[player]==0) @@ -522,7 +522,7 @@ For sites (currently only Carbon Poker) which record "all in" as a special actio # log.debug("addBlind: %s posts %s, %s" % (player, blindtype, amount)) if player is not None: - amount = re.sub(u',', u'', amount) #some sites have commas + amount = amount.replace(u',', u'') #some sites have commas self.stacks[player] -= Decimal(amount) act = (player, blindtype, Decimal(amount), self.stacks[player]==0) self.actions['BLINDSANTES'].append(act) @@ -555,7 +555,7 @@ For sites (currently only Carbon Poker) which record "all in" as a special actio def addCall(self, street, player=None, amount=None): if amount: - amount = re.sub(u',', u'', amount) #some sites have commas + amount = amount.replace(u',', u'') #some sites have commas log.debug(_("%s %s calls %s") %(street, player, amount)) # Potentially calculate the amount of the call if not supplied # corner cases include if player would be all in @@ -583,7 +583,7 @@ Add a raise by amountBy on [street] by [player] # then: C = Bp - Bc (amount to call) # Rt = Bp + Rb (raise to) # - amountBy = re.sub(u',', u'', amountBy) #some sites have commas + amountBy = amountBy.replace(u',', u'') #some sites have commas self.checkPlayerExists(player) Rb = Decimal(amountBy) Bp = self.lastBet[street] @@ -601,7 +601,7 @@ Add a raise by amountBy on [street] by [player] """\ For sites which by "raises x" mean "calls and raises putting a total of x in the por". """ self.checkPlayerExists(player) - amount = re.sub(u',', u'', amount) #some sites have commas + amount = amount.replace(u',', u'') #some sites have commas CRb = Decimal(amount) Bp = self.lastBet[street] Bc = reduce(operator.add, self.bets[street][player], 0) @@ -617,7 +617,7 @@ Add a raise on [street] by [player] to [amountTo] """ #CG - No idea if this function has been test/verified self.checkPlayerExists(player) - amountTo = re.sub(u',', u'', amountTo) #some sites have commas + amountTo = amountTo.replace(u',', u'') #some sites have commas Bp = self.lastBet[street] Bc = reduce(operator.add, self.bets[street][player], 0) Rt = Decimal(amountTo) @@ -638,7 +638,7 @@ Add a raise on [street] by [player] to [amountTo] def addBet(self, street, player, amount): log.debug(_("%s %s bets %s") %(street, player, amount)) - amount = re.sub(u',', u'', amount) #some sites have commas + amount = amount.replace(u',', u'') #some sites have commas self.checkPlayerExists(player) self.bets[street][player].append(Decimal(amount)) self.stacks[player] -= Decimal(amount) @@ -1377,7 +1377,7 @@ closed likewise, but known only to player Add a complete on [street] by [player] to [amountTo] """ log.debug(_("%s %s completes %s") % (street, player, amountTo)) - amountTo = re.sub(u',', u'', amountTo) #some sites have commas + amountTo = amountTo.replace(u',', u'') #some sites have commas self.checkPlayerExists(player) Bp = self.lastBet['THIRD'] Bc = reduce(operator.add, self.bets[street][player], 0) From 0f54f3d80c512ccad96680e39a0d8b93aa215626 Mon Sep 17 00:00:00 2001 From: Worros Date: Thu, 24 Feb 2011 22:51:40 +0800 Subject: [PATCH 8/8] Hand.py: Call Decimal ctor a lot less. From: Scott Wolchok --- pyfpdb/Hand.py | 67 ++++++++++++++++++++++++++++---------------------- 1 file changed, 37 insertions(+), 30 deletions(-) diff --git a/pyfpdb/Hand.py b/pyfpdb/Hand.py index 0bd08470..db6b0620 100644 --- a/pyfpdb/Hand.py +++ b/pyfpdb/Hand.py @@ -504,12 +504,13 @@ For sites (currently only Carbon Poker) which record "all in" as a special actio log.debug("%s %s antes %s" % ('BLINDSANTES', player, ante)) if player is not None: ante = ante.replace(u',', u'') #some sites have commas - self.bets['BLINDSANTES'][player].append(Decimal(ante)) - self.stacks[player] -= Decimal(ante) - act = (player, 'ante', Decimal(ante), self.stacks[player]==0) + ante = Decimal(ante) + self.bets['BLINDSANTES'][player].append(ante) + self.stacks[player] -= ante + act = (player, 'ante', ante, self.stacks[player]==0) self.actions['BLINDSANTES'].append(act) -# self.pot.addMoney(player, Decimal(ante)) - self.pot.addCommonMoney(player, Decimal(ante)) +# self.pot.addMoney(player, ante) + self.pot.addCommonMoney(player, ante) #I think the antes should be common money, don't have enough hand history to check def addBlind(self, player, blindtype, amount): @@ -523,21 +524,24 @@ For sites (currently only Carbon Poker) which record "all in" as a special actio log.debug("addBlind: %s posts %s, %s" % (player, blindtype, amount)) if player is not None: amount = amount.replace(u',', u'') #some sites have commas - self.stacks[player] -= Decimal(amount) - act = (player, blindtype, Decimal(amount), self.stacks[player]==0) + amount = Decimal(amount) + self.stacks[player] -= amount + act = (player, blindtype, amount, self.stacks[player]==0) self.actions['BLINDSANTES'].append(act) if blindtype == 'both': # work with the real amount. limit games are listed as $1, $2, where # the SB 0.50 and the BB is $1, after the turn the minimum bet amount is $2.... - amount = self.bb - self.bets['BLINDSANTES'][player].append(Decimal(self.sb)) - self.pot.addCommonMoney(player, Decimal(self.sb)) + amount = Decimal(self.bb) + sb = Decimal(self.sb) + self.bets['BLINDSANTES'][player].append(sb) + self.pot.addCommonMoney(player, sb) if blindtype == 'secondsb': amount = Decimal(0) - self.bets['BLINDSANTES'][player].append(Decimal(self.sb)) - self.pot.addCommonMoney(player, Decimal(self.sb)) + sb = Decimal(self.sb) + self.bets['BLINDSANTES'][player].append(sb) + self.pot.addCommonMoney(player, sb) street = 'BLAH' @@ -546,9 +550,9 @@ For sites (currently only Carbon Poker) which record "all in" as a special actio elif self.gametype['base'] == 'draw': street = 'DEAL' - self.bets[street][player].append(Decimal(amount)) - self.pot.addMoney(player, Decimal(amount)) - self.lastBet[street] = Decimal(amount) + self.bets[street][player].append(amount) + self.pot.addMoney(player, amount) + self.lastBet[street] = amount self.posted = self.posted + [[player,blindtype]] @@ -560,13 +564,14 @@ For sites (currently only Carbon Poker) which record "all in" as a special actio # Potentially calculate the amount of the call if not supplied # corner cases include if player would be all in if amount is not None: - self.bets[street][player].append(Decimal(amount)) - #self.lastBet[street] = Decimal(amount) - self.stacks[player] -= Decimal(amount) + amount = Decimal(amount) + self.bets[street][player].append(amount) + #self.lastBet[street] = amount + self.stacks[player] -= amount #print "DEBUG %s calls %s, stack %s" % (player, amount, self.stacks[player]) - act = (player, 'calls', Decimal(amount), self.stacks[player]==0) + act = (player, 'calls', amount, self.stacks[player] == 0) self.actions[street].append(act) - self.pot.addMoney(player, Decimal(amount)) + self.pot.addMoney(player, amount) def addRaiseBy(self, street, player, amountBy): """\ @@ -639,14 +644,15 @@ Add a raise on [street] by [player] to [amountTo] def addBet(self, street, player, amount): log.debug(_("%s %s bets %s") %(street, player, amount)) amount = amount.replace(u',', u'') #some sites have commas + amount = Decimal(amount) self.checkPlayerExists(player) - self.bets[street][player].append(Decimal(amount)) - self.stacks[player] -= Decimal(amount) + self.bets[street][player].append(amount) + self.stacks[player] -= amount #print "DEBUG %s bets %s, stack %s" % (player, amount, self.stacks[player]) - act = (player, 'bets', Decimal(amount), self.stacks[player]==0) + act = (player, 'bets', amount, self.stacks[player]==0) self.actions[street].append(act) - self.lastBet[street] = Decimal(amount) - self.pot.addMoney(player, Decimal(amount)) + self.lastBet[street] = amount + self.pot.addMoney(player, amount) def addStandsPat(self, street, player): @@ -1395,12 +1401,13 @@ Add a complete on [street] by [player] to [amountTo] def addBringIn(self, player, bringin): if player is not None: log.debug(_("Bringin: %s, %s") % (player , bringin)) - self.bets['THIRD'][player].append(Decimal(bringin)) - self.stacks[player] -= Decimal(bringin) - act = (player, 'bringin', Decimal(bringin), self.stacks[player]==0) + bringin = Decimal(bringin) + self.bets['THIRD'][player].append(bringin) + self.stacks[player] -= bringin + act = (player, 'bringin', bringin, self.stacks[player]==0) self.actions['THIRD'].append(act) - self.lastBet['THIRD'] = Decimal(bringin) - self.pot.addMoney(player, Decimal(bringin)) + self.lastBet['THIRD'] = bringin + self.pot.addMoney(player, bringin) def getStreetTotals(self): # street1Pot INT, /* pot size at flop/street4 */