From 0cd213b6023c72a7d1adbdc19e9c4ec87a3e6d6f Mon Sep 17 00:00:00 2001 From: steffen123 Date: Mon, 21 Jun 2010 13:42:23 +0200 Subject: [PATCH] removed two obselete files from utils --- utils/dump_db_basedata.py | 38 ------------------ utils/get_db_stats.py | 83 --------------------------------------- 2 files changed, 121 deletions(-) delete mode 100755 utils/dump_db_basedata.py delete mode 100755 utils/get_db_stats.py diff --git a/utils/dump_db_basedata.py b/utils/dump_db_basedata.py deleted file mode 100755 index f796c8ea..00000000 --- a/utils/dump_db_basedata.py +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/python - -#Copyright 2008 Steffen Jobbagy-Felso -#This program is free software: you can redistribute it and/or modify -#it under the terms of the GNU Affero General Public License as published by -#the Free Software Foundation, version 3 of the License. -# -#This program is distributed in the hope that it will be useful, -#but WITHOUT ANY WARRANTY; without even the implied warranty of -#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -#GNU General Public License for more details. -# -#You should have received a copy of the GNU Affero General Public License -#along with this program. If not, see . -#In the "official" distribution you can find the license in -#agpl-3.0.txt in the docs folder of the package. - -import sys -import MySQLdb - -db = MySQLdb.connect("localhost", "fpdb", sys.argv[1], "fpdb") -cursor = db.cursor() -print "Connected to MySQL on localhost. Printing dev-supplied base data:" - -cursor.execute("SELECT * FROM sites") -print "Sites" -print "=====" -print cursor.fetchall() - -cursor.execute("SELECT * FROM gametypes") -print "Gametypes" -print "=========" -result=cursor.fetchall() -for i in range (len(result)): - print result[i] - -cursor.close() -db.close() diff --git a/utils/get_db_stats.py b/utils/get_db_stats.py deleted file mode 100755 index 182baa38..00000000 --- a/utils/get_db_stats.py +++ /dev/null @@ -1,83 +0,0 @@ -#!/usr/bin/python - -#Copyright 2008 Steffen Jobbagy-Felso -#This program is free software: you can redistribute it and/or modify -#it under the terms of the GNU Affero General Public License as published by -#the Free Software Foundation, version 3 of the License. -# -#This program is distributed in the hope that it will be useful, -#but WITHOUT ANY WARRANTY; without even the implied warranty of -#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -#GNU General Public License for more details. -# -#You should have received a copy of the GNU Affero General Public License -#along with this program. If not, see . -#In the "official" distribution you can find the license in -#agpl-3.0.txt in the docs folder of the package. - -import sys -import MySQLdb - -db = MySQLdb.connect("localhost", "fpdb", sys.argv[1], "fpdb") -cursor = db.cursor() -print "Connected to MySQL on localhost. Printing summary stats:" - -cursor.execute("SELECT id FROM Players") -print "Players:",cursor.rowcount -cursor.execute("SELECT id FROM Autorates") -print "Autorates:",cursor.rowcount - -cursor.execute("SELECT id FROM Sites") -print "Sites:",cursor.rowcount -cursor.execute("SELECT id FROM Gametypes") -print "Gametypes:",cursor.rowcount - -cursor.execute("SELECT id FROM Hands") -print "Total Hands:",cursor.rowcount -cursor.execute("SELECT Hands.id FROM Hands INNER JOIN Gametypes ON Hands.gametypeId = Gametypes.id WHERE Gametypes.type='ring'") -print "Hands, Ring:",cursor.rowcount -cursor.execute("SELECT Hands.id FROM Hands INNER JOIN Gametypes ON Hands.gametypeId = Gametypes.id WHERE Gametypes.type='stt'") -print "Hands, STT:",cursor.rowcount -cursor.execute("SELECT Hands.id FROM Hands INNER JOIN Gametypes ON Hands.gametypeId = Gametypes.id WHERE Gametypes.type='mtt'") -print "Hands, MTT:",cursor.rowcount - -print "" -print "Hands per category and type" -cursor.execute("SELECT Hands.id FROM Hands INNER JOIN Gametypes ON Hands.gametypeId = Gametypes.id WHERE Gametypes.limitType='cn'") -print "Hands, Cap No Limit:",cursor.rowcount -cursor.execute("SELECT Hands.id FROM Hands INNER JOIN Gametypes ON Hands.gametypeId = Gametypes.id WHERE Gametypes.limitType='cp'") -print "Hands, Cap Pot Limit:",cursor.rowcount -cursor.execute("SELECT Hands.id FROM Hands INNER JOIN Gametypes ON Hands.gametypeId = Gametypes.id WHERE Gametypes.category='holdem' AND Gametypes.limitType='nl'") -print "Hands, Holdem No Limit:",cursor.rowcount -cursor.execute("SELECT Hands.id FROM Hands INNER JOIN Gametypes ON Hands.gametypeId = Gametypes.id WHERE Gametypes.category='holdem' AND Gametypes.limitType='pl'") -print "Hands, Holdem Pot Limit:",cursor.rowcount -cursor.execute("SELECT Hands.id FROM Hands INNER JOIN Gametypes ON Hands.gametypeId = Gametypes.id WHERE Gametypes.category='holdem' AND Gametypes.limitType='fl'") -print "Hands, Holdem Fixed Limit:",cursor.rowcount -cursor.execute("SELECT Hands.id FROM Hands INNER JOIN Gametypes ON Hands.gametypeId = Gametypes.id WHERE Gametypes.category='omahahi' AND Gametypes.limitType='nl'") -print "Hands, Omaha Hi No Limit:",cursor.rowcount -cursor.execute("SELECT Hands.id FROM Hands INNER JOIN Gametypes ON Hands.gametypeId = Gametypes.id WHERE Gametypes.category='omahahi' AND Gametypes.limitType='pl'") -print "Hands, Omaha Hi Pot Limit:",cursor.rowcount -cursor.execute("SELECT Hands.id FROM Hands INNER JOIN Gametypes ON Hands.gametypeId = Gametypes.id WHERE Gametypes.category='omahahi' AND Gametypes.limitType='fl'") -print "Hands, Omaha Hi Fixed Limit:",cursor.rowcount -cursor.execute("SELECT Hands.id FROM Hands INNER JOIN Gametypes ON Hands.gametypeId = Gametypes.id WHERE Gametypes.category='omahahilo' AND Gametypes.limitType='nl'") -print "Hands, Omaha Hi/Lo No Limit:",cursor.rowcount -cursor.execute("SELECT Hands.id FROM Hands INNER JOIN Gametypes ON Hands.gametypeId = Gametypes.id WHERE Gametypes.category='omahahilo' AND Gametypes.limitType='pl'") -print "Hands, Omaha Hi/Lo Pot Limit:",cursor.rowcount -cursor.execute("SELECT Hands.id FROM Hands INNER JOIN Gametypes ON Hands.gametypeId = Gametypes.id WHERE Gametypes.category='omahahilo' AND Gametypes.limitType='fl'") -print "Hands, Omaha Hi/Lo Fixed Limit:",cursor.rowcount -cursor.execute("SELECT Hands.id FROM Hands INNER JOIN Gametypes ON Hands.gametypeId = Gametypes.id WHERE Gametypes.category='razz'") -print "Hands, Razz:",cursor.rowcount -cursor.execute("SELECT Hands.id FROM Hands INNER JOIN Gametypes ON Hands.gametypeId = Gametypes.id WHERE Gametypes.category='studhi'") -print "Hands, Stud Hi:",cursor.rowcount -cursor.execute("SELECT Hands.id FROM Hands INNER JOIN Gametypes ON Hands.gametypeId = Gametypes.id WHERE Gametypes.category='studhilo'") -print "Hands, Stud Hi/Lo:",cursor.rowcount -print "" -cursor.execute("SELECT id FROM BoardCards") -print "Board_cards:",cursor.rowcount -cursor.execute("SELECT id FROM HandsPlayers") -print "Hands_players:",cursor.rowcount -cursor.execute("SELECT id FROM HandsActions") -print "Hands_actions:",cursor.rowcount - -cursor.close() -db.close()