Two Plus Two Publishing LLC
Two Plus Two Publishing LLC
 

Go Back   Two Plus Two Poker Forums > > >

Notices

Free Software Discussion of Free / Freeware / Donationware / Open Source poker software and Free Graphics mods

Reply
 
Thread Tools Display Modes
Old 03-04-2009, 03:42 AM   #1126
panicked
enthusiast
 
panicked's Avatar
 
Join Date: Mar 2009
Posts: 69
Re: New Free/open source poker tracking software: FPDB - (Alpha9 - updates) - 10-Nov-

Quote:
Originally Posted by Eratosthenes View Post
I am not happy with the installer--I'm working up my courage to give it another try. I have been hoping that someone with more windows expertise than I have (which is nearly anyone) would come along and take over the installer.

I think you need to install numpy and matplotlib to get the graph to work.
Thanks. I went ahead and installed those packages, but I'm still getting errors when I try to generate the graph. They're different errors, and it looks like it's finding the right path for matplotlib, so that's a start.

Code:
C:\Documents and Settings\xxx\My Documents\fpdb_0.10\pyfpdb\fpdb.py:247: DeprecationWarning: use gtk.UIManager
  self.item_factory = gtk.ItemFactory(gtk.MenuBar, "<main>", accel_group)
Traceback (most recent call last):
  File "C:\Documents and Settings\xxx\My Documents\fpdb_0.10\pyfpdb\GuiGraphViewer.py", line 296, in exportGraph
    self.fig.savefig(self.exportDir, format="png")
AttributeError: 'GuiGraphViewer' object has no attribute 'fig'
Traceback (most recent call last):
  File "C:\Documents and Settings\xxx\My Documents\fpdb_0.10\pyfpdb\GuiGraphViewer.py", line 296, in exportGraph
    self.fig.savefig(self.exportDir, format="png")
  File "C:\Python25\Lib\site-packages\matplotlib\figure.py", line 990, in savefig
    self.canvas.print_figure(*args, **kwargs)
AttributeError: 'NoneType' object has no attribute 'print_figure'
As far as Windows installers go, I have to admit it's not my particular area of expertise. The only one that I've had any experience with personally is CMake/CPack. It's open source/BSD license and allows for cross platform packaging, which is nice. If you're looking for a new packaging system, you might want to check it out. http://en.wikipedia.org/wiki/CPack
panicked is offline   Reply With Quote
Old 03-04-2009, 03:54 AM   #1127
sorrow
old hand
 
sorrow's Avatar
 
Join Date: Apr 2008
Location: Perth, Western Australia
Posts: 1,531
Re: New Free/open source poker tracking software: FPDB - (Alpha9 - updates) - 10-Nov-

Code:
AttributeError: 'GuiGraphViewer' object has no attribute 'fig'
Traceback (most recent call last):
  File "C:\Documents and Settings\xxx\My Documents\fpdb_0.10\pyfpdb\GuiGraphViewer.py", line 296, in exportGraph
    self.fig.savefig(self.exportDir, format="png")
  File "C:\Python25\Lib\site-packages\matplotlib\figure.py", line 990, in savefig
    self.canvas.print_figure(*args, **kwargs)
AttributeError: 'NoneType' object has no attribute 'print_figure'
That looks like you haven't actually generated a graph yet. You need to "Generate Graph" before you can export to file
sorrow is offline   Reply With Quote
Old 03-05-2009, 02:59 PM   #1128
donkequity
enthusiast
 
Join Date: Dec 2008
Posts: 95
Re: New Free/open source poker tracking software: FPDB - (Alpha9 - updates) - 10-Nov-

how do I set up the Hand Replayer?
donkequity is offline   Reply With Quote
Old 03-05-2009, 04:04 PM   #1129
Eratosthenes
old hand
 
Join Date: Oct 2004
Posts: 1,535
Re: New Free/open source poker tracking software: FPDB - (Alpha9 - updates) - 10-Nov-

Quote:
Originally Posted by donkequity View Post
how do I set up the Hand Replayer?
There isn't a replayer yet. I am planning a hand reviewer thingie, but it is still a few spots down on my to do list.
Eratosthenes is offline   Reply With Quote
Old 03-05-2009, 04:50 PM   #1130
panicked
enthusiast
 
panicked's Avatar
 
Join Date: Mar 2009
Posts: 69
Re: New Free/open source poker tracking software: FPDB - (Alpha9 - updates) - 10-Nov-

Quote:
Originally Posted by sorrow View Post
That looks like you haven't actually generated a graph yet. You need to "Generate Graph" before you can export to file
D'oh. Thanks. That did the trick.

I had one other question about the graphs. If I click generate graph a second time, a new graph shows up tiled in the same pane as the old graph. If I click it again, I have three graphs in the window, etc. Is there any way to delete the old graph from the UI without restarting the program? Thanks again.
panicked is offline   Reply With Quote
Old 03-05-2009, 04:58 PM   #1131
Eratosthenes
old hand
 
Join Date: Oct 2004
Posts: 1,535
Re: New Free/open source poker tracking software: FPDB - (Alpha9 - updates) - 10-Nov-

Hi all--

They guys working on the importer need some hand history files from draw games. Specifically, Badugi, 5 Card Draw, and 2-7 Triple Draw on Stars, are needed. That's all of the Stars draw games, right? We'll also be happy to have draw HHs from other sites.

Leave me a PM and I'll reply with my email addr.

Thanks
Eratosthenes is offline   Reply With Quote
Old 03-05-2009, 11:59 PM   #1132
sorrow
old hand
 
sorrow's Avatar
 
Join Date: Apr 2008
Location: Perth, Western Australia
Posts: 1,531
Re: New Free/open source poker tracking software: FPDB - (Alpha9 - updates) - 10-Nov-

Quote:
Originally Posted by panicked View Post
D'oh. Thanks. That did the trick.
Cool - you might be the first person to

Quote:
Originally Posted by panicked View Post
I had one other question about the graphs. If I click generate graph a second time, a new graph shows up tiled in the same pane as the old graph. If I click it again, I have three graphs in the window, etc. Is there any way to delete the old graph from the UI without restarting the program? Thanks again.
Thats a bug I fixed some time ago, and its not happening on any of the devs machines. Can you post what versions of gtk and pygtk you are running please?
sorrow is offline   Reply With Quote
Old 03-06-2009, 12:39 AM   #1133
panicked
enthusiast
 
panicked's Avatar
 
Join Date: Mar 2009
Posts: 69
Re: New Free/open source poker tracking software: FPDB - (Alpha9 - updates) - 10-Nov-

Quote:
Originally Posted by sorrow View Post
Cool - you might be the first person to
Thats a bug I fixed some time ago, and its not happening on any of the devs machines. Can you post what versions of gtk and pygtk you are running please?
gtk: 2.12.11

pygtk: 2.12.1
panicked is offline   Reply With Quote
Old 03-06-2009, 07:23 PM   #1134
xaiviax
grinder
 
xaiviax's Avatar
 
Join Date: Jun 2008
Posts: 552
Re: New Free/open source poker tracking software: FPDB - (Alpha9 - updates) - 10-Nov-

Quote:
Originally Posted by sorrow View Post
Thats a bug I fixed some time ago, and its not happening on any of the devs machines. Can you post what versions of gtk and pygtk you are running please?
I've always had that happen, and still currently.
gtk2: 2.14.7
pygtk: 2.14.0
xaiviax is offline   Reply With Quote
Old 03-06-2009, 08:36 PM   #1135
Eratosthenes
old hand
 
Join Date: Oct 2004
Posts: 1,535
Re: New Free/open source poker tracking software: FPDB - (Alpha9 - updates) - 10-Nov-

Quote:
Originally Posted by sorrow View Post
Thats a bug I fixed some time ago, and its not happening on any of the devs machines. Can you post what versions of gtk and pygtk you are running please?
I do not have this problem; Here's what I'm using:

gtk2: 2.12.12
pygtk: 2.12.1

This is the most recent from the Fedora repos.
Eratosthenes is offline   Reply With Quote
Old 03-07-2009, 12:34 AM   #1136
sorrow
old hand
 
sorrow's Avatar
 
Join Date: Apr 2008
Location: Perth, Western Australia
Posts: 1,531
Re: New Free/open source poker tracking software: FPDB - (Alpha9 - updates) - 10-Nov-

Quote:
Originally Posted by xaiviax View Post
I've always had that happen, and still currently.
gtk2: 2.14.7
pygtk: 2.14.0
You're a linux user from memory, thats the first i've heard of it happening there.

Can you try the following for me in GuiGraphViewer.py
Code:
def generateGraph(self, widget, data):
        try: 
            self.fig.clf()
            self.canvas.destroy()
It just adds the self.fig.clf() line before the canvas line to explicity clear the figure object.
sorrow is offline   Reply With Quote
Old 03-07-2009, 02:57 AM   #1137
xaiviax
grinder
 
xaiviax's Avatar
 
Join Date: Jun 2008
Posts: 552
Re: New Free/open source poker tracking software: FPDB - (Alpha9 - updates) - 10-Nov-

@sorrow:
That "clears" the previous graph, but still leaves the blank spot.
xaiviax is offline   Reply With Quote
Old 03-07-2009, 12:31 PM   #1138
FileNotFound
newbie
 
Join Date: Jan 2009
Location: earth - europe - germany
Posts: 33
Re: New Free/open source poker tracking software: FPDB - (Alpha9 - updates) - 10-Nov-

I would like to bring up a new issue.

It seems that fpdb has reached some maturity and you can work really well with it.
What I am really looking forward to, and wan't to know your thoughts about it, would be an graphically-DB-interface.

When you play e.g. 6 months you may want to delete all hands that are older than 3 months.
This is necessary to correctly display any changed behavior of your opponents because only very little player won't change their style over time.


So it would be really nice to have a grahical interface where you can manage basic DB functionalities, e.g.:

Delete all hands that are older than <selectAgeInMonths> from <selectSite>
on <selectLimit>.


I also think that this would be a necessary functionality to stickt to a clean and up to date DB.
Although I really think that everybody can do this already by using mysql-commands(?) I have no clue how.
And imho a graphical dialog would enlarge the fpdb functionality perfectly.

Just a thought
FileNotFound is offline   Reply With Quote
Old 03-07-2009, 06:29 PM   #1139
Eratosthenes
old hand
 
Join Date: Oct 2004
Posts: 1,535
Re: New Free/open source poker tracking software: FPDB - (Alpha9 - updates) - 10-Nov-

Quote:
Originally Posted by FileNotFound View Post
I would like to bring up a new issue.

It seems that fpdb has reached some maturity and you can work really well with it.
What I am really looking forward to, and wan't to know your thoughts about it, would be an graphically-DB-interface.

When you play e.g. 6 months you may want to delete all hands that are older than 3 months.
This is necessary to correctly display any changed behavior of your opponents because only very little player won't change their style over time.


So it would be really nice to have a grahical interface where you can manage basic DB functionalities, e.g.:

Delete all hands that are older than <selectAgeInMonths> from <selectSite>
on <selectLimit>.


I also think that this would be a necessary functionality to stickt to a clean and up to date DB.
Although I really think that everybody can do this already by using mysql-commands(?) I have no clue how.
And imho a graphical dialog would enlarge the fpdb functionality perfectly.

Just a thought
This is a good idea and a worthy project. It should be fairly easy to do because Steffen was careful when he made up the tables, so cascading deletes should work nicely. Also I think that a graphical ui to the db might help with some of the install problems we have with people setting up the db.

One thing that is going on now is an overhaul of the HH import code--that is getting close to being complete. Some time after that is complete and stable, we will change the analysis and storing code so that we collect and store more stats/info from each hand. The time to do the project you suggest is when that is complete and stable. Otherwise, we are likely to do your suggestion more than once.

There is so much to do that I hate to see anybody working on something that is likely to be obsolete in a few weeks - couple of months.
Eratosthenes is offline   Reply With Quote
Old 03-07-2009, 07:33 PM   #1140
FileNotFound
newbie
 
Join Date: Jan 2009
Location: earth - europe - germany
Posts: 33
Re: New Free/open source poker tracking software: FPDB - (Alpha9 - updates) - 10-Nov-

I totally agree if you say that it doesn't make sense to work on something if you will throw away the work some weeks/months later.

Just as an information:
This week I'll tried to import a huge amount of HandHistories (HH).
About 400.000 hands.
I started on Monday and my system didn't finished until Friday....then I killed the process.
Two notes on that:

1]
In that situation I would have been so happy if I had an information graphic/whatever that would display:
1. How many hands are already imported (and how many will be imported at all).
2. How many hands are imported/second
3. If the import is still working...(progress bar etc.)

2]
Just as information to you that there seems to be a bottleneck importing HHs.
I have no idea if it is mysql (which I doubt because for a DB 400.000 data
elements shouldn't be a problem) or an interplay issue between fpdb-mysql, or
python and mysql or whatever.
So maybe you could have an eye on that if you are already developing in that direction, it would be really nice!


Interestingly only the mysql process did work all the time, the fpdb-python-process ended after roughly 160min.
It also worked at least partially.

For information.
System: 1.6Ghz AMD Athlon, 1GB RAM, (i think) 7200rpm HD, else 5400
FileNotFound is offline   Reply With Quote
Old 03-07-2009, 11:53 PM   #1141
Eleatic Stranger
journeyman
 
Join Date: Sep 2008
Location: Sydney
Posts: 292
Re: New Free/open source poker tracking software: FPDB - (Alpha9 - updates) - 10-Nov-

Quote:
Originally Posted by FileNotFound View Post
It seems that fpdb has reached some maturity and you can work really well with it.
What I am really looking forward to, and wan't to know your thoughts about it, would be an graphically-DB-interface.
I agree that this would be a good idea. I have also been thinking that I would like to do some basic hand analysis, e.g. to answer the quite simple question: which hands have been costing me money?

Eratosthenes has pointed out that the underlying code is a moving target; but perhaps in the interim someone could put together a simple checkbox-based interface, which would basically generate the right SQL code for your desired query, nothing else. If I find I have time I might do this myself (it could be a standalone application, quite simple, and to be discarded later).

I would think you would be given some simple checkboxes like (for Hold 'em): Pocket pair, Broadway cards, Suited, No-gap connectors, Specific hand (with a text-entry field); then: Pre-flop raise, Went to showdown, Won at showdown, Net profit, etc. And, of course -- what you are after -- the date at which the hand was played.

I assume you get something resembling this interface with Pokertracker (which I don't use), though more complex.
Eleatic Stranger is offline   Reply With Quote
Old 03-08-2009, 12:55 AM   #1142
sorrow
old hand
 
sorrow's Avatar
 
Join Date: Apr 2008
Location: Perth, Western Australia
Posts: 1,531
Re: New Free/open source poker tracking software: FPDB - (Alpha9 - updates) - 10-Nov-

Quote:
Originally Posted by Eleatic Stranger View Post
I have also been thinking that I would like to do some basic hand analysis, e.g. to answer the quite simple question: which hands have been costing me money?
Analysis tools are quite high in my list of things to implement, i've added a Stats by position which has made it into Eratosthenes repo.

Most of my effort is going into the import code at the moment though.
Quote:
Originally Posted by Eleatic Stranger View Post
Eratosthenes has pointed out that the underlying code is a moving target; but perhaps in the interim someone could put together a simple checkbox-based interface, which would basically generate the right SQL code for your desired query, nothing else. If I find I have time I might do this myself (it could be a standalone application, quite simple, and to be discarded later).
re: moving target - thats not really the case for the database itself. That hasn't changed format in some time.

What we are really missing is the sql to select hands based on anything but time. Select by holecards or all-ins would be useful contributions right now.

I have some session detection code at the moment floundering for this reason.
sorrow is offline   Reply With Quote
Old 03-08-2009, 04:11 AM   #1143
sorrow
old hand
 
sorrow's Avatar
 
Join Date: Apr 2008
Location: Perth, Western Australia
Posts: 1,531
Re: New Free/open source poker tracking software: FPDB - (Alpha9 - updates) - 10-Nov-

Quote:
Originally Posted by FileNotFound View Post
This week I'll tried to import a huge amount of HandHistories (HH).
About 400.000 hands.
I started on Monday and my system didn't finished until Friday....then I killed the process.
Two notes on that:

1]
In that situation I would have been so happy if I had an information graphic/whatever that would display:
1. How many hands are already imported (and how many will be imported at all).
2. How many hands are imported/second
3. If the import is still working...(progress bar etc.)

2]
Just as information to you that there seems to be a bottleneck importing HHs.
I have no idea if it is mysql (which I doubt because for a DB 400.000 data
elements shouldn't be a problem) or an interplay issue between fpdb-mysql, or
python and mysql or whatever.
So maybe you could have an eye on that if you are already developing in that direction, it would be really nice!
The bulk import is quite slow, but its usually a one-off thing. Its has had some work recently, and you should be able to fire off GuiBullkImport.py standalone, and it should be a touch faster. 400k hands is still going to take a few days in that hardware.

If you start it in a console, you will actually see output for every file that is imported, including all the information you are looking for in 1]
sorrow is offline   Reply With Quote
Old 03-08-2009, 07:18 AM   #1144
Eleatic Stranger
journeyman
 
Join Date: Sep 2008
Location: Sydney
Posts: 292
Re: New Free/open source poker tracking software: FPDB - (Alpha9 - updates) - 10-Nov-

Quote:
Originally Posted by sorrow View Post
What we are really missing is the sql to select hands based on anything but time. Select by holecards or all-ins would be useful contributions right now.
I've made a first attempt at this -- selection by hole cards -- the result of which is below. You may not find any use for my code; but I can at least report that the code appears to work (within its limitations).

With my changes you can indicate the desired hole cards (for Hold 'Em) along with your screen name, using the numbering system the database uses; thus for pocket aces: screen_name, 14, 14. This is just a hack for testing purposes.

I see that the problem will be the difficulty of calculating VPIP etc., normally just taken from the cache. I didn't attempt to calculate any of these; they're left blank. But one can see how much one has won or lost with specific holdings. (I've decided I'm probably over-playing QQ. No problem with JJ, strangely enough.)

Code:
diff --git a/pyfpdb/FpdbSQLQueries.py b/pyfpdb/FpdbSQLQueries.py
index fe170c8..c366bde 100644
--- a/pyfpdb/FpdbSQLQueries.py
+++ b/pyfpdb/FpdbSQLQueries.py
@@ -1054,6 +1054,135 @@ class FpdbSQLQueries:
         elif(self.dbname == 'SQLite'):
             self.query['playerStatsByPosition'] = """ """
 
+        if(self.dbname == 'MySQL InnoDB'):
+            self.query['playerStatsByPositionAndHoleCards'] = """
+                SELECT 
+                      concat(upper(stats.limitType), ' '
+                            ,concat(upper(substring(stats.category,1,1)),substring(stats.category,2) ), ' '
+                            ,stats.name, ' $'
+                            ,cast(trim(leading ' ' from
+                                  case when stats.bigBlind < 100 then format(stats.bigBlind/100.0,2)
+                                      else format(stats.bigBlind/100.0,0)
+                                  end ) as char)
+                            )                                                      AS Game
+                     ,case when stats.PlPosition = -2 then 'BB'
+                           when stats.PlPosition = -1 then 'SB'
+                           when stats.PlPosition =  0 then 'Btn'
+                           when stats.PlPosition =  1 then 'CO'
+                           when stats.PlPosition =  2 then 'MP'
+                           when stats.PlPosition =  5 then 'EP'
+                           else '??'
+                      end                                                          AS PlPosition
+                     /*,stats.n*/,hprof2.n
+                     /*,stats.vpip*/,0
+                     /*,stats.pfr*/,0
+                     /*,stats.saw_f*/,0
+                     /*,stats.sawsd*/,0
+                     /*,stats.wtsdwsf*/,0
+                     /*,stats.wmsd*/,0
+                     /*,stats.FlAFq*/,0
+                     /*,stats.TuAFq*/,0
+                     /*,stats.RvAFq*/,0
+                     /*,stats.PoFAFq*/,0
+                     /* if you have handsactions data the next 3 fields should give same answer as
+                        following 3 commented out fields */
+                     /*,stats.Net
+                     ,stats.BBper100
+                     ,stats.Profitperhand*/
+                     ,format(hprof2.sum_profit/100.0,2)                          AS Net
+                       /*,format((hprof2.sum_profit/(stats.bigBlind+0.0)) / (stats.n/100.0),2)*/,0
+                                                                                   AS BBlPer100
+                       ,hprof2.profitperhand                                       AS Profitperhand
+                     ,format(hprof2.variance,2)                                    AS Variance
+                FROM
+                    (select /* stats from hudcache */
+                            gt.base
+                           ,gt.category
+                           ,upper(gt.limitType) as limitType
+                           ,s.name
+                           ,gt.bigBlind
+                           ,hc.gametypeId
+                           ,case when hc.position = 'B' then -2
+                                 when hc.position = 'S' then -1
+                                 when hc.position = 'D' then  0
+                                 when hc.position = 'C' then  1
+                                 when hc.position = 'M' then  2
+                                 when hc.position = 'E' then  5
+                                 else 9
+                            end                                                             as PlPosition
+                           ,sum(HDs)                                                        AS n
+                           ,format(100.0*sum(street0VPI)/sum(HDs),1)                 AS vpip
+                           ,format(100.0*sum(street0Aggr)/sum(HDs),1)                AS pfr
+                           ,format(100.0*sum(street1Seen)/sum(HDs),1)                AS saw_f
+                           ,format(100.0*sum(sawShowdown)/sum(HDs),1)                AS sawsd
+                           ,case when sum(street1Seen) = 0 then 'oo'
+                                 else format(100.0*sum(sawShowdown)/sum(street1Seen),1)
+                            end                                                             AS wtsdwsf
+                           ,case when sum(sawShowdown) = 0 then 'oo'
+                                 else format(100.0*sum(wonAtSD)/sum(sawShowdown),1)
+                            end                                                             AS wmsd
+                           ,case when sum(street1Seen) = 0 then 'oo'
+                                 else format(100.0*sum(street1Aggr)/sum(street1Seen),1)
+                            end                                                             AS FlAFq
+                           ,case when sum(street2Seen) = 0 then 'oo'
+                                 else format(100.0*sum(street2Aggr)/sum(street2Seen),1)
+                            end                                                             AS TuAFq
+                           ,case when sum(street3Seen) = 0 then 'oo'
+                                else format(100.0*sum(street3Aggr)/sum(street3Seen),1)
+                            end                                                             AS RvAFq
+                           ,case when sum(street1Seen)+sum(street2Seen)+sum(street3Seen) = 0 then 'oo'
+                                else format(100.0*(sum(street1Aggr)+sum(street2Aggr)+sum(street3Aggr))
+                                         /(sum(street1Seen)+sum(street2Seen)+sum(street3Seen)),1)
+                            end                                                             AS PoFAFq
+                           ,format(sum(totalProfit)/100.0,2)                                AS Net
+                           ,format((sum(totalProfit)/(gt.bigBlind+0.0)) / (sum(HDs)/100.0),2)
+                                                                                            AS BBper100
+                           ,format( (sum(totalProfit)/100.0) / sum(HDs), 4)                 AS Profitperhand
+                     from Gametypes gt
+                          inner join Sites s on s.Id = gt.siteId
+                          inner join HudCache hc on hc.gameTypeId = gt.Id
+                     where hc.playerId in <player_test>
+                                                # use <gametype_test> here ?
+                     group by gt.base
+                          ,gt.category
+                          ,upper(gt.limitType)
+                          ,s.name
+                          ,gt.bigBlind
+                          ,hc.gametypeId
+                          ,PlPosition
+                    ) stats
+                inner join
+                    ( select # profit from handsplayers/handsactions
+                             hprof.gameTypeId, 
+                             case when hprof.position = 'B' then -2
+                                  when hprof.position = 'S' then -1
+                                  when hprof.position in ('3','4') then 2
+                                  when hprof.position in ('6','7') then 5
+                                  else hprof.position
+                             end                                      as PlPosition,
+                             sum(hprof.profit) as sum_profit,
+                             avg(hprof.profit/100.0) as profitperhand,
+                             variance(hprof.profit/100.0) as variance,
+                             count(*) as n
+                      from
+                          (select hp.handId, h.gameTypeId, hp.position, hp.winnings, SUM(ha.amount)
+                costs, hp.winnings - SUM(ha.amount) profit
+                          from HandsPlayers hp
+                          inner join Hands h        ON h.id            = hp.handId
+                          left join HandsActions ha ON ha.handPlayerId = hp.id
+                          where hp.playerId in <player_test>
+                                                     # use <gametype_test> here ?
+                          and   hp.tourneysPlayersId IS NULL
+                          and ((hp.card1Value = <first_card> and hp.card2Value = <second_card>) or (hp.card1Value = <second_card> and hp.card2Value = <first_card>))
+                          group by hp.handId, h.gameTypeId, hp.position, hp.winnings
+                         ) hprof
+                      group by hprof.gameTypeId, PlPosition
+                     ) hprof2
+                    on (    hprof2.gameTypeId = stats.gameTypeId
+                        and hprof2.PlPosition = stats.PlPosition)
+                order by stats.category, stats.limittype, stats.bigBlind, cast(stats.PlPosition as signed)
+                """
+
 if __name__== "__main__":
         from optparse import OptionParser
 
diff --git a/pyfpdb/GuiPositionalStats.py b/pyfpdb/GuiPositionalStats.py
index 2d40a13..8e04fe0 100644
--- a/pyfpdb/GuiPositionalStats.py
+++ b/pyfpdb/GuiPositionalStats.py
@@ -43,14 +43,27 @@ class GuiPositionalStats (threading.Thread):
     def fillStatsFrame(self, vbox):
         # Get currently active site and grab playerid
         print "DEBUG: attempting to fill stats frame"
-        tmp = self.sql.query['playerStatsByPosition']
 
-        result = self.cursor.execute(self.sql.query['getPlayerId'], (self.heroes[self.activesite],))
+        if self.heroes[self.activesite].find(",") >= 0:
+            print "DEBUG: filtering by hand"
+            tmp = self.sql.query['playerStatsByPositionAndHoleCards']
+            name_and_cards = self.heroes[self.activesite].split(",")
+            result = self.cursor.execute(self.sql.query['getPlayerId'], (name_and_cards[0],))
+
+        else:
+            tmp = self.sql.query['playerStatsByPosition']
+            result = self.cursor.execute(self.sql.query['getPlayerId'], (self.heroes[self.activesite],))
+
         result = self.cursor.fetchall()
         if not result == ():
                 pid = result[0][0]
                 pid = result[0][0]
                 tmp = tmp.replace("<player_test>", "(" + str(pid) + ")")
+
+                if self.heroes[self.activesite].find(",") >= 0:
+                    tmp = tmp.replace("<first_card>", name_and_cards[1])
+                    tmp = tmp.replace("<second_card>", name_and_cards[2])
+
                 self.cursor.execute(tmp)
                 result = self.cursor.fetchall()
                 cols = 16
Eleatic Stranger is offline   Reply With Quote
Old 03-08-2009, 05:52 PM   #1145
cliffkp
adept
 
cliffkp's Avatar
 
Join Date: Feb 2009
Location: I'm the BOSS
Posts: 1,105
Re: New Free/open source poker tracking software: FPDB - (Alpha9 - updates) - 10-Nov-

anyway of making a computer that has postgres installed work? i tried to run it and it comes up saying "_mysql_exceptions.OperationalError: (2003, "Can't connect to MySQL server on 'localhost' (10061)")" do i need to install mysql ? that the only way? also im running 64 bit vista
cliffkp is offline   Reply With Quote
Old 03-08-2009, 07:12 PM   #1146
Eratosthenes
old hand
 
Join Date: Oct 2004
Posts: 1,535
Re: New Free/open source poker tracking software: FPDB - (Alpha9 - updates) - 10-Nov-

Quote:
Originally Posted by cliffkp View Post
anyway of making a computer that has postgres installed work? i tried to run it and it comes up saying "_mysql_exceptions.OperationalError: (2003, "Can't connect to MySQL server on 'localhost' (10061)")" do i need to install mysql ? that the only way? also im running 64 bit vista
It should work with postgres. It looks like you have the config set up for mysql. You need to change the db in HUD_config.xml.

from something like this:
Code:
<database db_ip="192.168.1.100" db_name="fpdb" db_pass="blah" db_server="mysql" db_type="fpdb" db_user="mythtv">    </database>
to something like this:
Code:
<database db_ip="localhost" db_name="fpdb" db_pass="blah" db_server="postgresql" db_type="fpdb" db_user="blah">    </database>
Eratosthenes is offline   Reply With Quote
Old 03-08-2009, 08:15 PM   #1147
cliffkp
adept
 
cliffkp's Avatar
 
Join Date: Feb 2009
Location: I'm the BOSS
Posts: 1,105
Re: New Free/open source poker tracking software: FPDB - (Alpha9 - updates) - 10-Nov-

thanks for the tip and i got it to work so far! i've set up preferred seating for pokerstars now but have not tested that out yet.. i would like to just be able to look at stats with this too? you know... poker tracker.. import my hands and get some stats??? is this possible with this program? i haven't found an answer on their site how to do it.. could someone please explain? thanks i hope!
cliffkp is offline   Reply With Quote
Old 03-08-2009, 09:16 PM   #1148
Eratosthenes
old hand
 
Join Date: Oct 2004
Posts: 1,535
Re: New Free/open source poker tracking software: FPDB - (Alpha9 - updates) - 10-Nov-

Quote:
Originally Posted by cliffkp View Post
thanks for the tip and i got it to work so far! i've set up preferred seating for pokerstars now but have not tested that out yet.. i would like to just be able to look at stats with this too? you know... poker tracker.. import my hands and get some stats??? is this possible with this program? i haven't found an answer on their site how to do it.. could someone please explain? thanks i hope!
main menu->Import->Bulk Import
Eratosthenes is offline   Reply With Quote
Old 03-08-2009, 10:21 PM   #1149
cliffkp
adept
 
cliffkp's Avatar
 
Join Date: Feb 2009
Location: I'm the BOSS
Posts: 1,105
Re: New Free/open source poker tracking software: FPDB - (Alpha9 - updates) - 10-Nov-

ok got that all to work.. sweet... problem now is i can't get the HUD to work on pokerstars.. nothing will show up??? what to do now? i read the documentation...
cliffkp is offline   Reply With Quote
Old 03-08-2009, 11:25 PM   #1150
Eratosthenes
old hand
 
Join Date: Oct 2004
Posts: 1,535
Re: New Free/open source poker tracking software: FPDB - (Alpha9 - updates) - 10-Nov-

Quote:
Originally Posted by cliffkp View Post
ok got that all to work.. sweet... problem now is i can't get the HUD to work on pokerstars.. nothing will show up??? what to do now? i read the documentation...
The should be fpdb-error-log.txt and HUD-error.txt in the same folder where you started fpdb. There should be a clue in there.

When you say documentation, I hope you mean the wiki.

Lastly, if you run fpdb from a terminal window ("python fpdb" should do the trick), you should see output like this when the autoimporter is working:

Code:
Total stored: 1 duplicates: 0 partial: 0 errors: 0  time: 0.112876176834
Total stored: 1 duplicates: 0 partial: 0 errors: 0  time: 0.172836065292
Total stored: 1 duplicates: 0 partial: 0 errors: 0  time: 0.224519968033
..........
Eratosthenes is offline   Reply With Quote

Reply
      

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Forum Jump


All times are GMT -4. The time now is 04:08 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
Copyright © 2008-2017, Two Plus Two Interactive
 
 
Poker Players - Streaming Live Online