Merge branch 'master' of git://git.assembla.com/fpdb
This commit is contained in:
commit
a46f0211cd
|
@ -1,9 +1,16 @@
|
|||
This is a list of download links of Windows packages for Python 2.7 of our dependencies.
|
||||
|
||||
|
||||
These are as of 26Feb2011:
|
||||
matplotlib 1.0.1 ... http://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-1.0.1/
|
||||
pygtk 2.22 ... http://ftp.gnome.org/pub/GNOME/binaries/win32/pygtk/2.22/
|
||||
pycairo 1.8.10 ... http://ftp.gnome.org/pub/GNOME/binaries/win32/pycairo/1.8/
|
||||
pyGobject X ... http://ftp.gnome.org/pub/GNOME/binaries/win32/pygobject/2.26/
|
||||
|
||||
|
||||
The below are from Aug2010, and should probably be updated to newer versions:
|
||||
Python 2.7 ... http://python.org/ftp/python/2.7/python-2.7.msi
|
||||
pywin 214 ... https://sourceforge.net/projects/pywin32/files/pywin32/Build%20214/pywin32-214.win32-py2.7.exe/download
|
||||
matplotlib X ... not available as py27 as of 16aug2010: https://sourceforge.net/projects/matplotlib/files/matplotlib/
|
||||
pygtk X ... not available as py27 as of 16aug2010: http://ftp.gnome.org/pub/GNOME/binaries/win32/pygtk/
|
||||
pycairo X ... not available as py27 as of 16aug2010: http://ftp.gnome.org/pub/GNOME/binaries/win32/pycairo/
|
||||
pyGobject X ... not available as py27 as of 16aug2010: http://ftp.gnome.org/pub/GNOME/binaries/win32/pygobject/
|
||||
py2exe 0.6.9 ... https://sourceforge.net/projects/py2exe/files/py2exe/0.6.9/py2exe-0.6.9.win32-py2.7.exe/download
|
||||
psycopg2 ... http://www.stickpeople.com/projects/python/win-psycopg/psycopg2-2.2.2.win32-py2.7-pg8.4.4-release.exe
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
#TODO: gettextify if file is used again
|
||||
|
||||
from decimal import Decimal
|
||||
from decimal_wrapper import Decimal
|
||||
|
||||
from sqlalchemy import types
|
||||
from sqlalchemy.orm.exc import NoResultFound
|
||||
|
|
|
@ -23,7 +23,7 @@ This package contains all classes to be mapped and mappers themselves
|
|||
|
||||
import logging
|
||||
import re
|
||||
from decimal import Decimal
|
||||
from decimal_wrapper import Decimal
|
||||
from sqlalchemy.orm import mapper, relation, reconstructor
|
||||
from sqlalchemy.sql import select
|
||||
from collections import defaultdict
|
||||
|
|
|
@ -53,7 +53,7 @@ _ = L10n.get_translation()
|
|||
import sys
|
||||
import logging
|
||||
from HandHistoryConverter import *
|
||||
from decimal import Decimal
|
||||
from decimal_wrapper import Decimal
|
||||
|
||||
|
||||
class Carbon(HandHistoryConverter):
|
||||
|
|
|
@ -38,7 +38,7 @@ import sys
|
|||
import traceback
|
||||
from datetime import datetime, date, time, timedelta
|
||||
from time import time, strftime, sleep
|
||||
from decimal import Decimal
|
||||
from decimal_wrapper import Decimal
|
||||
import string
|
||||
import re
|
||||
import Queue
|
||||
|
@ -454,7 +454,7 @@ class Database:
|
|||
self.connection = sqlite3.connect(self.db_path, detect_types=sqlite3.PARSE_DECLTYPES )
|
||||
self.__connected = True
|
||||
sqlite3.register_converter("bool", lambda x: bool(int(x)))
|
||||
sqlite3.register_adapter(bool, lambda x: "1" if x else "0")
|
||||
sqlite3.register_adapter(bool, lambda x: 1 if x else 0)
|
||||
self.connection.create_function("floor", 1, math.floor)
|
||||
tmp = sqlitemath()
|
||||
self.connection.create_function("mod", 2, tmp.mod)
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
#fpdb modules
|
||||
import Card
|
||||
from decimal import Decimal
|
||||
from decimal_wrapper import Decimal
|
||||
|
||||
import logging
|
||||
# logging has been set up in fpdb.py or HUD_main.py, use their settings:
|
||||
|
@ -30,71 +30,76 @@ class DerivedStats():
|
|||
self.hands = {}
|
||||
self.handsplayers = {}
|
||||
self.handsactions = {}
|
||||
self._initStats = DerivedStats._buildStatsInitializer()
|
||||
|
||||
def getStats(self, hand):
|
||||
|
||||
for player in hand.players:
|
||||
self.handsplayers[player[1]] = {}
|
||||
@staticmethod
|
||||
def _buildStatsInitializer():
|
||||
init = {}
|
||||
#Init vars that may not be used, but still need to be inserted.
|
||||
# All stud street4 need this when importing holdem
|
||||
self.handsplayers[player[1]]['winnings'] = 0
|
||||
self.handsplayers[player[1]]['rake'] = 0
|
||||
self.handsplayers[player[1]]['totalProfit'] = 0
|
||||
self.handsplayers[player[1]]['street4Aggr'] = False
|
||||
self.handsplayers[player[1]]['wonWhenSeenStreet1'] = 0.0
|
||||
self.handsplayers[player[1]]['sawShowdown'] = False
|
||||
self.handsplayers[player[1]]['wonAtSD'] = 0.0
|
||||
self.handsplayers[player[1]]['startCards'] = 0
|
||||
self.handsplayers[player[1]]['position'] = 2
|
||||
self.handsplayers[player[1]]['street0_3BChance'] = False
|
||||
self.handsplayers[player[1]]['street0_3BDone'] = False
|
||||
self.handsplayers[player[1]]['street0_4BChance'] = False
|
||||
self.handsplayers[player[1]]['street0_4BDone'] = False
|
||||
self.handsplayers[player[1]]['street0_C4BChance'] = False
|
||||
self.handsplayers[player[1]]['street0_C4BDone'] = False
|
||||
self.handsplayers[player[1]]['street0_FoldTo3BChance']= False
|
||||
self.handsplayers[player[1]]['street0_FoldTo3BDone']= False
|
||||
self.handsplayers[player[1]]['street0_FoldTo4BChance']= False
|
||||
self.handsplayers[player[1]]['street0_FoldTo4BDone']= False
|
||||
self.handsplayers[player[1]]['street0_SqueezeChance']= False
|
||||
self.handsplayers[player[1]]['street0_SqueezeDone'] = False
|
||||
self.handsplayers[player[1]]['success_Steal'] = False
|
||||
self.handsplayers[player[1]]['raiseFirstInChance'] = False
|
||||
self.handsplayers[player[1]]['raisedFirstIn'] = False
|
||||
self.handsplayers[player[1]]['foldBbToStealChance'] = False
|
||||
self.handsplayers[player[1]]['foldSbToStealChance'] = False
|
||||
self.handsplayers[player[1]]['foldedSbToSteal'] = False
|
||||
self.handsplayers[player[1]]['foldedBbToSteal'] = False
|
||||
self.handsplayers[player[1]]['tourneyTypeId'] = None
|
||||
self.handsplayers[player[1]]['street1Seen'] = False
|
||||
self.handsplayers[player[1]]['street2Seen'] = False
|
||||
self.handsplayers[player[1]]['street3Seen'] = False
|
||||
self.handsplayers[player[1]]['street4Seen'] = False
|
||||
init['winnings'] = 0
|
||||
init['rake'] = 0
|
||||
init['totalProfit'] = 0
|
||||
init['street4Aggr'] = False
|
||||
init['wonWhenSeenStreet1'] = 0.0
|
||||
init['sawShowdown'] = False
|
||||
init['wonAtSD'] = 0.0
|
||||
init['startCards'] = 0
|
||||
init['position'] = 2
|
||||
init['street0_3BChance'] = False
|
||||
init['street0_3BDone'] = False
|
||||
init['street0_4BChance'] = False
|
||||
init['street0_4BDone'] = False
|
||||
init['street0_C4BChance'] = False
|
||||
init['street0_C4BDone'] = False
|
||||
init['street0_FoldTo3BChance']= False
|
||||
init['street0_FoldTo3BDone']= False
|
||||
init['street0_FoldTo4BChance']= False
|
||||
init['street0_FoldTo4BDone']= False
|
||||
init['street0_SqueezeChance']= False
|
||||
init['street0_SqueezeDone'] = False
|
||||
init['success_Steal'] = False
|
||||
init['raiseFirstInChance'] = False
|
||||
init['raisedFirstIn'] = False
|
||||
init['foldBbToStealChance'] = False
|
||||
init['foldSbToStealChance'] = False
|
||||
init['foldedSbToSteal'] = False
|
||||
init['foldedBbToSteal'] = False
|
||||
init['tourneyTypeId'] = None
|
||||
init['street1Seen'] = False
|
||||
init['street2Seen'] = False
|
||||
init['street3Seen'] = False
|
||||
init['street4Seen'] = False
|
||||
|
||||
|
||||
for i in range(5):
|
||||
self.handsplayers[player[1]]['street%dCalls' % i] = 0
|
||||
self.handsplayers[player[1]]['street%dBets' % i] = 0
|
||||
self.handsplayers[player[1]]['street%dRaises' % i] = 0
|
||||
init['street%dCalls' % i] = 0
|
||||
init['street%dBets' % i] = 0
|
||||
init['street%dRaises' % i] = 0
|
||||
for i in range(1,5):
|
||||
self.handsplayers[player[1]]['street%dCBChance' %i] = False
|
||||
self.handsplayers[player[1]]['street%dCBDone' %i] = False
|
||||
self.handsplayers[player[1]]['street%dCheckCallRaiseChance' %i] = False
|
||||
self.handsplayers[player[1]]['street%dCheckCallRaiseDone' %i] = False
|
||||
self.handsplayers[player[1]]['otherRaisedStreet%d' %i] = False
|
||||
self.handsplayers[player[1]]['foldToOtherRaisedStreet%d' %i] = False
|
||||
init['street%dCBChance' %i] = False
|
||||
init['street%dCBDone' %i] = False
|
||||
init['street%dCheckCallRaiseChance' %i] = False
|
||||
init['street%dCheckCallRaiseDone' %i] = False
|
||||
init['otherRaisedStreet%d' %i] = False
|
||||
init['foldToOtherRaisedStreet%d' %i] = False
|
||||
|
||||
#FIXME - Everything below this point is incomplete.
|
||||
self.handsplayers[player[1]]['other3BStreet0'] = False
|
||||
self.handsplayers[player[1]]['other4BStreet0'] = False
|
||||
self.handsplayers[player[1]]['otherRaisedStreet0'] = False
|
||||
self.handsplayers[player[1]]['foldToOtherRaisedStreet0'] = False
|
||||
init['other3BStreet0'] = False
|
||||
init['other4BStreet0'] = False
|
||||
init['otherRaisedStreet0'] = False
|
||||
init['foldToOtherRaisedStreet0'] = False
|
||||
for i in range(1,5):
|
||||
self.handsplayers[player[1]]['foldToStreet%dCBChance' %i] = False
|
||||
self.handsplayers[player[1]]['foldToStreet%dCBDone' %i] = False
|
||||
self.handsplayers[player[1]]['wonWhenSeenStreet2'] = 0.0
|
||||
self.handsplayers[player[1]]['wonWhenSeenStreet3'] = 0.0
|
||||
self.handsplayers[player[1]]['wonWhenSeenStreet4'] = 0.0
|
||||
init['foldToStreet%dCBChance' %i] = False
|
||||
init['foldToStreet%dCBDone' %i] = False
|
||||
init['wonWhenSeenStreet2'] = 0.0
|
||||
init['wonWhenSeenStreet3'] = 0.0
|
||||
init['wonWhenSeenStreet4'] = 0.0
|
||||
return init
|
||||
|
||||
def getStats(self, hand):
|
||||
for player in hand.players:
|
||||
self.handsplayers[player[1]] = self._initStats.copy()
|
||||
|
||||
self.assembleHands(self.hand)
|
||||
self.assembleHandsPlayers(self.hand)
|
||||
|
|
|
@ -25,7 +25,7 @@ _ = L10n.get_translation()
|
|||
import sys
|
||||
import logging
|
||||
from HandHistoryConverter import *
|
||||
from decimal import Decimal
|
||||
from decimal_wrapper import Decimal
|
||||
|
||||
|
||||
class Everest(HandHistoryConverter):
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
import L10n
|
||||
_ = L10n.get_translation()
|
||||
|
||||
from decimal import Decimal
|
||||
from decimal_wrapper import Decimal
|
||||
import datetime
|
||||
|
||||
from Exceptions import FpdbParseError
|
||||
|
|
|
@ -263,7 +263,7 @@ Left-Drag to Move"
|
|||
bgcolor="#000000"
|
||||
converter="EverleafToFpdb"
|
||||
decoder="everleaf_decode_table"
|
||||
enabled="False"
|
||||
enabled="True"
|
||||
fgcolor="#EEEEEE"
|
||||
hudopacity="0.75"
|
||||
screen_name="PlayerName"
|
||||
|
@ -312,7 +312,7 @@ Left-Drag to Move"
|
|||
|
||||
</site>
|
||||
|
||||
<site enabled="False"
|
||||
<site enabled="True"
|
||||
site_name="Win2day"
|
||||
table_finder="Win2day.exe"
|
||||
screen_name="YOUR SCREEN NAME HERE"
|
||||
|
@ -357,7 +357,7 @@ Left-Drag to Move"
|
|||
</site>
|
||||
|
||||
|
||||
<site enabled="False"
|
||||
<site enabled="True"
|
||||
site_name="Absolute"
|
||||
table_finder="AbsolutePoker.exe"
|
||||
screen_name="YOUR SCREEN NAME HERE"
|
||||
|
@ -402,7 +402,7 @@ Left-Drag to Move"
|
|||
</site>
|
||||
|
||||
|
||||
<site enabled="False"
|
||||
<site enabled="True"
|
||||
site_name="PartyPoker"
|
||||
table_finder="PartyGaming.exe"
|
||||
screen_name="YOUR SCREEN NAME HERE"
|
||||
|
@ -494,7 +494,7 @@ Left-Drag to Move"
|
|||
</layout>
|
||||
</site>
|
||||
|
||||
<site HH_path="C:/Program Files/OnGame Sking/HandHistory/YOUR SCREEN NAME HERE/" converter="OnGameToFpdb" decoder="everleaf_decode_table" enabled="False" screen_name="YOUR SCREEN NAME HERE" site_name="OnGame" site_path="C:/Program Files/OnGame/" supported_games="holdem" table_finder="OnGame.exe">
|
||||
<site HH_path="C:/Program Files/OnGame Sking/HandHistory/YOUR SCREEN NAME HERE/" converter="OnGameToFpdb" decoder="everleaf_decode_table" enabled="True" screen_name="YOUR SCREEN NAME HERE" site_name="OnGame" site_path="C:/Program Files/OnGame/" supported_games="holdem" table_finder="OnGame.exe">
|
||||
<layout fav_seat="0" height="547" max="8" width="794">
|
||||
<location seat="1" x="640" y="64"> </location>
|
||||
<location seat="2" x="650" y="230"> </location>
|
||||
|
@ -542,7 +542,7 @@ Left-Drag to Move"
|
|||
</layout>
|
||||
</site>
|
||||
|
||||
<site HH_path="C:/Program Files/PKR/HandHistory/YOUR SCREEN NAME HERE/" converter="PkrToFpdb" decoder="everleaf_decode_table" enabled="False" screen_name="YOUR SCREEN NAME HERE" site_name="PKR" site_path="C:/Program Files/PKR/" supported_games="holdem" table_finder="PKR.exe">
|
||||
<site HH_path="C:/Program Files/PKR/HandHistory/YOUR SCREEN NAME HERE/" converter="PkrToFpdb" decoder="everleaf_decode_table" enabled="True" screen_name="YOUR SCREEN NAME HERE" site_name="PKR" site_path="C:/Program Files/PKR/" supported_games="holdem" table_finder="PKR.exe">
|
||||
<layout fav_seat="0" height="547" max="8" width="794">
|
||||
<location seat="1" x="640" y="64"> </location>
|
||||
<location seat="2" x="650" y="230"> </location>
|
||||
|
@ -578,7 +578,7 @@ Left-Drag to Move"
|
|||
</layout>
|
||||
</site>
|
||||
|
||||
<site HH_path="C:/Program Files/Winamax/HandHistory/YOUR SCREEN NAME HERE/" converter="WinamaxToFpdb" decoder="everleaf_decode_table" enabled="False" screen_name="YOUR SCREEN NAME HERE" site_name="Winamax" site_path="C:/Program Files/Winamax/" supported_games="holdem" table_finder="Winamax.exe">
|
||||
<site HH_path="C:/Program Files/Winamax/HandHistory/YOUR SCREEN NAME HERE/" converter="WinamaxToFpdb" decoder="everleaf_decode_table" enabled="True" screen_name="YOUR SCREEN NAME HERE" site_name="Winamax" site_path="C:/Program Files/Winamax/" supported_games="holdem" table_finder="Winamax.exe">
|
||||
<layout fav_seat="0" height="547" max="8" width="794">
|
||||
<location seat="1" x="640" y="64"> </location>
|
||||
<location seat="2" x="650" y="230"> </location>
|
||||
|
@ -614,7 +614,7 @@ Left-Drag to Move"
|
|||
</layout>
|
||||
</site>
|
||||
|
||||
<site HH_path="C:/Program Files/Everest/HandHistory/YOUR SCREEN NAME HERE/" converter="EverestToFpdb" decoder="everleaf_decode_table" enabled="False" screen_name="YOUR SCREEN NAME HERE" site_name="Everest" site_path="C:/Program Files/Everest/" supported_games="holdem" table_finder="Everest.exe">
|
||||
<site HH_path="C:/Program Files/Everest/HandHistory/YOUR SCREEN NAME HERE/" converter="EverestToFpdb" decoder="everleaf_decode_table" enabled="True" screen_name="YOUR SCREEN NAME HERE" site_name="Everest" site_path="C:/Program Files/Everest/" supported_games="holdem" table_finder="Everest.exe">
|
||||
<layout fav_seat="0" height="547" max="8" width="794">
|
||||
<location seat="1" x="640" y="64"> </location>
|
||||
<location seat="2" x="650" y="230"> </location>
|
||||
|
|
|
@ -25,7 +25,7 @@ import sys
|
|||
import traceback
|
||||
import os
|
||||
import os.path
|
||||
from decimal import Decimal
|
||||
from decimal_wrapper import Decimal
|
||||
import operator
|
||||
import time,datetime
|
||||
from copy import deepcopy
|
||||
|
@ -490,7 +490,7 @@ For sites (currently only Carbon Poker) which record "all in" as a special actio
|
|||
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)
|
||||
Bc = sum(self.bets[street][player])
|
||||
C = Bp - Bc
|
||||
if Ai <= C:
|
||||
self.addCall(street, player, amount)
|
||||
|
@ -592,7 +592,7 @@ Add a raise by amountBy on [street] by [player]
|
|||
self.checkPlayerExists(player)
|
||||
Rb = Decimal(amountBy)
|
||||
Bp = self.lastBet[street]
|
||||
Bc = reduce(operator.add, self.bets[street][player], 0)
|
||||
Bc = sum(self.bets[street][player])
|
||||
C = Bp - Bc
|
||||
Rt = Bp + Rb
|
||||
|
||||
|
@ -609,7 +609,7 @@ For sites which by "raises x" mean "calls and raises putting a total of x in the
|
|||
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)
|
||||
Bc = sum(self.bets[street][player])
|
||||
C = Bp - Bc
|
||||
Rb = CRb - C
|
||||
Rt = Bp + Rb
|
||||
|
@ -624,7 +624,7 @@ Add a raise on [street] by [player] to [amountTo]
|
|||
self.checkPlayerExists(player)
|
||||
amountTo = amountTo.replace(u',', u'') #some sites have commas
|
||||
Bp = self.lastBet[street]
|
||||
Bc = reduce(operator.add, self.bets[street][player], 0)
|
||||
Bc = sum(self.bets[street][player])
|
||||
Rt = Decimal(amountTo)
|
||||
C = Bp - Bc
|
||||
Rb = Rt - C - Bc
|
||||
|
@ -1386,7 +1386,7 @@ Add a complete on [street] by [player] to [amountTo]
|
|||
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)
|
||||
Bc = sum(self.bets[street][player])
|
||||
Rt = Decimal(amountTo)
|
||||
C = Bp - Bc
|
||||
Rb = Rt - C
|
||||
|
@ -1401,6 +1401,7 @@ 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))
|
||||
bringin = bringin.replace(u',', u'') #some sites have commas
|
||||
bringin = Decimal(bringin)
|
||||
self.bets['THIRD'][player].append(bringin)
|
||||
self.stacks[player] -= bringin
|
||||
|
|
|
@ -26,7 +26,7 @@ import os
|
|||
import os.path
|
||||
import xml.dom.minidom
|
||||
import codecs
|
||||
from decimal import Decimal
|
||||
from decimal_wrapper import Decimal
|
||||
import operator
|
||||
from xml.dom.minidom import Node
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ log = logging.getLogger("parser")
|
|||
|
||||
import Configuration
|
||||
from HandHistoryConverter import *
|
||||
from decimal import Decimal
|
||||
from decimal_wrapper import Decimal
|
||||
|
||||
# OnGame HH Format
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
import L10n
|
||||
_ = L10n.get_translation()
|
||||
|
||||
from decimal import Decimal
|
||||
from decimal_wrapper import Decimal
|
||||
import datetime
|
||||
|
||||
from Exceptions import FpdbParseError
|
||||
|
|
|
@ -25,7 +25,7 @@ _ = L10n.get_translation()
|
|||
|
||||
import sys
|
||||
from HandHistoryConverter import *
|
||||
from decimal import Decimal
|
||||
from decimal_wrapper import Decimal
|
||||
|
||||
# PokerStars HH Format
|
||||
|
||||
|
@ -131,34 +131,29 @@ class PokerStars(HandHistoryConverter):
|
|||
# revised re including timezone (not currently used):
|
||||
#re_DateTime = re.compile("""(?P<Y>[0-9]{4})\/(?P<M>[0-9]{2})\/(?P<D>[0-9]{2})[\- ]+(?P<H>[0-9]+):(?P<MIN>[0-9]+):(?P<S>[0-9]+) \(?(?P<TZ>[A-Z0-9]+)""", re.MULTILINE)
|
||||
|
||||
def compilePlayerRegexs(self, hand):
|
||||
players = set([player[1] for player in hand.players])
|
||||
if not players <= self.compiledPlayers: # x <= y means 'x is subset of y'
|
||||
# we need to recompile the player regexs.
|
||||
# TODO: should probably rename re_HeroCards and corresponding method,
|
||||
# since they are used to find all cards on lines starting with "Dealt to:"
|
||||
# They still identify the hero.
|
||||
self.compiledPlayers = players
|
||||
player_re = "(?P<PNAME>" + "|".join(map(re.escape, players)) + ")"
|
||||
subst = {'PLYR': player_re, 'CUR': self.sym[hand.gametype['currency']]}
|
||||
log.debug("player_re: " + player_re)
|
||||
self.re_PostSB = re.compile(r"^%(PLYR)s: posts small blind %(CUR)s(?P<SB>[.0-9]+)" % subst, re.MULTILINE)
|
||||
self.re_PostBB = re.compile(r"^%(PLYR)s: posts big blind %(CUR)s(?P<BB>[.0-9]+)" % subst, re.MULTILINE)
|
||||
self.re_Antes = re.compile(r"^%(PLYR)s: posts the ante %(CUR)s(?P<ANTE>[.0-9]+)" % subst, re.MULTILINE)
|
||||
self.re_BringIn = re.compile(r"^%(PLYR)s: brings[- ]in( low|) for %(CUR)s(?P<BRINGIN>[.0-9]+)" % subst, re.MULTILINE)
|
||||
self.re_PostBoth = re.compile(r"^%(PLYR)s: posts small \& big blinds %(CUR)s(?P<SBBB>[.0-9]+)" % subst, re.MULTILINE)
|
||||
self.re_HeroCards = re.compile(r"^Dealt to %(PLYR)s(?: \[(?P<OLDCARDS>.+?)\])?( \[(?P<NEWCARDS>.+?)\])" % subst, re.MULTILINE)
|
||||
self.re_Action = re.compile(r"""
|
||||
# These used to be compiled per player, but regression tests say
|
||||
# we don't have to, and it makes life faster.
|
||||
short_subst = {'PLYR': r'(?P<PNAME>.+?)', 'CUR': '\$?'}
|
||||
re_PostSB = re.compile(r"^%(PLYR)s: posts small blind %(CUR)s(?P<SB>[.0-9]+)" % short_subst, re.MULTILINE)
|
||||
re_PostBB = re.compile(r"^%(PLYR)s: posts big blind %(CUR)s(?P<BB>[.0-9]+)" % short_subst, re.MULTILINE)
|
||||
re_Antes = re.compile(r"^%(PLYR)s: posts the ante %(CUR)s(?P<ANTE>[.0-9]+)" % short_subst, re.MULTILINE)
|
||||
re_BringIn = re.compile(r"^%(PLYR)s: brings[- ]in( low|) for %(CUR)s(?P<BRINGIN>[.0-9]+)" % short_subst, re.MULTILINE)
|
||||
re_PostBoth = re.compile(r"^%(PLYR)s: posts small \& big blinds %(CUR)s(?P<SBBB>[.0-9]+)" % short_subst, re.MULTILINE)
|
||||
re_HeroCards = re.compile(r"^Dealt to %(PLYR)s(?: \[(?P<OLDCARDS>.+?)\])?( \[(?P<NEWCARDS>.+?)\])" % short_subst, re.MULTILINE)
|
||||
re_Action = re.compile(r"""
|
||||
^%(PLYR)s:(?P<ATYPE>\sbets|\schecks|\sraises|\scalls|\sfolds|\sdiscards|\sstands\spat)
|
||||
(\s(%(CUR)s)?(?P<BET>[.\d]+))?(\sto\s%(CUR)s(?P<BETTO>[.\d]+))? # the number discarded goes in <BET>
|
||||
\s*(and\sis\sall.in)?
|
||||
(and\shas\sreached\sthe\s[%(CUR)s\d\.]+\scap)?
|
||||
(\scards?(\s\[(?P<DISCARDED>.+?)\])?)?\s*$"""
|
||||
% subst, re.MULTILINE|re.VERBOSE)
|
||||
self.re_ShowdownAction = re.compile(r"^%s: shows \[(?P<CARDS>.*)\]" % player_re, re.MULTILINE)
|
||||
self.re_CollectPot = re.compile(r"Seat (?P<SEAT>[0-9]+): %(PLYR)s (\(button\) |\(small blind\) |\(big blind\) |\(button\) \(small blind\) |\(button\) \(big blind\) )?(collected|showed \[.*\] and won) \(%(CUR)s(?P<POT>[.\d]+)\)(, mucked| with.*|)" % subst, re.MULTILINE)
|
||||
self.re_sitsOut = re.compile("^%s sits out" % player_re, re.MULTILINE)
|
||||
self.re_ShownCards = re.compile("^Seat (?P<SEAT>[0-9]+): %s (\(.*\) )?(?P<SHOWED>showed|mucked) \[(?P<CARDS>.*)\].*" % player_re, re.MULTILINE)
|
||||
% short_subst, re.MULTILINE|re.VERBOSE)
|
||||
re_ShowdownAction = re.compile(r"^%s: shows \[(?P<CARDS>.*)\]" % short_subst['PLYR'], re.MULTILINE)
|
||||
re_sitsOut = re.compile("^%s sits out" % short_subst['PLYR'], re.MULTILINE)
|
||||
re_ShownCards = re.compile("^Seat (?P<SEAT>[0-9]+): %s (\(.*\) )?(?P<SHOWED>showed|mucked) \[(?P<CARDS>.*)\].*" % short_subst['PLYR'], re.MULTILINE)
|
||||
re_CollectPot = re.compile(r"Seat (?P<SEAT>[0-9]+): %(PLYR)s (\(button\) |\(small blind\) |\(big blind\) |\(button\) \(small blind\) |\(button\) \(big blind\) )?(collected|showed \[.*\] and won) \(%(CUR)s(?P<POT>[.\d]+)\)(, mucked| with.*|)" % short_subst, re.MULTILINE)
|
||||
|
||||
def compilePlayerRegexs(self, hand):
|
||||
pass
|
||||
|
||||
def readSupportedGames(self):
|
||||
return [["ring", "hold", "nl"],
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
import L10n
|
||||
_ = L10n.get_translation()
|
||||
|
||||
from decimal import Decimal
|
||||
from decimal_wrapper import Decimal
|
||||
import datetime
|
||||
|
||||
from Exceptions import FpdbParseError
|
||||
|
|
|
@ -142,7 +142,7 @@ class Table_Window(object):
|
|||
if self.number is not None: break
|
||||
trys += 1
|
||||
if trys > 4:
|
||||
log.error("Can't find table %s" % table_name)
|
||||
log.error(_("Can't find table %s") % table_name)
|
||||
return None
|
||||
|
||||
geo = self.get_geometry()
|
||||
|
|
|
@ -28,7 +28,7 @@ import traceback
|
|||
import logging
|
||||
import os
|
||||
import os.path
|
||||
from decimal import Decimal
|
||||
from decimal_wrapper import Decimal
|
||||
import operator
|
||||
import time,datetime
|
||||
from copy import deepcopy
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
import L10n
|
||||
_ = L10n.get_translation()
|
||||
|
||||
from decimal import Decimal
|
||||
from decimal_wrapper import Decimal
|
||||
import datetime
|
||||
from BeautifulSoup import BeautifulSoup
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ import logging
|
|||
|
||||
import Configuration
|
||||
from HandHistoryConverter import *
|
||||
from decimal import Decimal
|
||||
from decimal_wrapper import Decimal
|
||||
import time
|
||||
|
||||
# Winamax HH Format
|
||||
|
|
4
pyfpdb/decimal_wrapper.py
Normal file
4
pyfpdb/decimal_wrapper.py
Normal file
|
@ -0,0 +1,4 @@
|
|||
try:
|
||||
from cdecimal import *
|
||||
except ImportError:
|
||||
from decimal import *
|
|
@ -46,7 +46,7 @@ _ = L10n.get_translation()
|
|||
import sys
|
||||
import logging
|
||||
from HandHistoryConverter import *
|
||||
from decimal import Decimal
|
||||
from decimal_wrapper import Decimal
|
||||
|
||||
|
||||
class iPoker(HandHistoryConverter):
|
||||
|
|
|
@ -6,7 +6,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: 0.20.905 plus git\n"
|
||||
"POT-Creation-Date: 2011-02-23 16:58+CET\n"
|
||||
"PO-Revision-Date: 2011-02-20 21:27+0100\n"
|
||||
"PO-Revision-Date: 2011-02-24 12:08+0100\n"
|
||||
"Last-Translator: Ferenc Erki <erkiferenc@gmail.com>\n"
|
||||
"Language-Team: Hungarian <erkiferenc@gmail.com>\n"
|
||||
"Language: hu\n"
|
||||
|
@ -654,7 +654,7 @@ msgstr "Versenyek"
|
|||
|
||||
#: Filters.py:80
|
||||
msgid "DEBUG: New packing box created!"
|
||||
msgstr ""
|
||||
msgstr "DEBUG: Új csoportosító doboz létrehozva!"
|
||||
|
||||
#: Filters.py:106 TourneyFilters.py:114
|
||||
msgid "Either 0 or more than one site matched (%s) - EEK"
|
||||
|
@ -714,20 +714,19 @@ msgstr "Nem található játék az adatbázisban"
|
|||
|
||||
#: Filters.py:827
|
||||
msgid "Graphing Options:"
|
||||
msgstr ""
|
||||
msgstr "Grafikon opciók:"
|
||||
|
||||
#: Filters.py:839
|
||||
msgid "Show Graph In:"
|
||||
msgstr ""
|
||||
msgstr "Profit:"
|
||||
|
||||
#: Filters.py:859
|
||||
msgid "Showdown Winnings"
|
||||
msgstr ""
|
||||
msgstr "Nyeremény mutatással"
|
||||
|
||||
#: Filters.py:867
|
||||
#, fuzzy
|
||||
msgid "Non-Showdown Winnings"
|
||||
msgstr "Mutatás nélkül: $%.2f"
|
||||
msgstr "Nyeremény mutatás nélkül"
|
||||
|
||||
#: Filters.py:984
|
||||
msgid "From:"
|
||||
|
@ -842,9 +841,8 @@ msgid " Start _Auto Import "
|
|||
msgstr " _Auto Import indítása "
|
||||
|
||||
#: GuiAutoImport.py:125
|
||||
#, fuzzy
|
||||
msgid "Detect Directories"
|
||||
msgstr "'%s' könyvtár létrehozva"
|
||||
msgstr "Könyvtárak felismerése"
|
||||
|
||||
#: GuiAutoImport.py:144
|
||||
msgid "Auto Import Ready."
|
||||
|
@ -3117,10 +3115,11 @@ msgstr "Nem sikerült az utcák hozzáadása. handtext=%s"
|
|||
#: XTables.py:70
|
||||
msgid "Could not retrieve XID from table xwininfo. xwininfo is %s"
|
||||
msgstr ""
|
||||
"Nem sikerült az XID meghatározása az asztal xwininfo-jából. Az xwininfo: %s"
|
||||
|
||||
#: XTables.py:74
|
||||
msgid "No match in XTables for table '%s'."
|
||||
msgstr ""
|
||||
msgstr "Nincs találat az XTables-ben ehhez az asztalhoz: '%s'"
|
||||
|
||||
#: fpdb.pyw:38
|
||||
msgid " - press return to continue\n"
|
||||
|
|
Binary file not shown.
|
@ -0,0 +1 @@
|
|||
(1, 'T$', 'tour', 'stud', 'razz', 'fl', 'l', 8000, 16000, 16000, 32000)
|
|
@ -0,0 +1,31 @@
|
|||
{ 'boardcard1': 0,
|
||||
'boardcard2': 0,
|
||||
'boardcard3': 0,
|
||||
'boardcard4': 0,
|
||||
'boardcard5': 0,
|
||||
'gametypeId': 1,
|
||||
'importTime': None,
|
||||
'maxSeats': 2,
|
||||
'playersAtShowdown': 2,
|
||||
'playersAtStreet1': 2,
|
||||
'playersAtStreet2': 2,
|
||||
'playersAtStreet3': 2,
|
||||
'playersAtStreet4': 2,
|
||||
'playersVpi': 1,
|
||||
'seats': 2,
|
||||
'sessionId': None,
|
||||
'showdownPot': 0,
|
||||
'siteHandNo': u'28333847000',
|
||||
'startTime': datetime.datetime(2011, 2, 19, 10, 46, tzinfo=pytz.utc),
|
||||
'street0Raises': 0,
|
||||
'street1Pot': 0,
|
||||
'street1Raises': 0,
|
||||
'street2Pot': 0,
|
||||
'street2Raises': 0,
|
||||
'street3Pot': 0,
|
||||
'street3Raises': 0,
|
||||
'street4Pot': 0,
|
||||
'street4Raises': 0,
|
||||
'tableName': u'220338000 1',
|
||||
'texture': None,
|
||||
'tourneyId': 1}
|
|
@ -0,0 +1,206 @@
|
|||
{ u'Hero': { 'card1': 17,
|
||||
'card2': 44,
|
||||
'card3': 40,
|
||||
'card4': 22,
|
||||
'card5': 10,
|
||||
'card6': 1,
|
||||
'card7': 37,
|
||||
'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': True,
|
||||
'raisedFirstIn': False,
|
||||
'rake': 0,
|
||||
'sawShowdown': True,
|
||||
'seatNo': 2,
|
||||
'sitout': False,
|
||||
'startCards': 52,
|
||||
'startCash': 97600,
|
||||
'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': False,
|
||||
'street1Bets': 0,
|
||||
'street1CBChance': False,
|
||||
'street1CBDone': False,
|
||||
'street1Calls': 0,
|
||||
'street1CheckCallRaiseChance': False,
|
||||
'street1CheckCallRaiseDone': False,
|
||||
'street1Raises': 0,
|
||||
'street1Seen': True,
|
||||
'street2Aggr': False,
|
||||
'street2Bets': 0,
|
||||
'street2CBChance': False,
|
||||
'street2CBDone': False,
|
||||
'street2Calls': 0,
|
||||
'street2CheckCallRaiseChance': False,
|
||||
'street2CheckCallRaiseDone': False,
|
||||
'street2Raises': 0,
|
||||
'street2Seen': 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': True,
|
||||
'success_Steal': False,
|
||||
'totalProfit': 2400,
|
||||
'tourneyTypeId': 1,
|
||||
'tourneysPlayersIds': 2,
|
||||
'winnings': 4800,
|
||||
'wonAtSD': 1.0,
|
||||
'wonWhenSeenStreet1': 1.0,
|
||||
'wonWhenSeenStreet2': 1.0,
|
||||
'wonWhenSeenStreet3': 1.0,
|
||||
'wonWhenSeenStreet4': 1.0},
|
||||
u'Villain': { 'card1': 52,
|
||||
'card2': 32,
|
||||
'card3': 38,
|
||||
'card4': 49,
|
||||
'card5': 42,
|
||||
'card6': 19,
|
||||
'card7': 35,
|
||||
'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': True,
|
||||
'seatNo': 1,
|
||||
'sitout': False,
|
||||
'startCards': 708,
|
||||
'startCash': 2400,
|
||||
'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': 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': True,
|
||||
'success_Steal': False,
|
||||
'totalProfit': -2400,
|
||||
'tourneyTypeId': 1,
|
||||
'tourneysPlayersIds': 1,
|
||||
'winnings': 0,
|
||||
'wonAtSD': 0.0,
|
||||
'wonWhenSeenStreet1': 0.0,
|
||||
'wonWhenSeenStreet2': 0.0,
|
||||
'wonWhenSeenStreet3': 0.0,
|
||||
'wonWhenSeenStreet4': 0.0}}
|
Loading…
Reference in New Issue
Block a user