/
showmax.py
57 lines (50 loc) · 1.95 KB
/
showmax.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
import sqlite3
#for i in ["deck12.sqlite3","deck13.sqlite3","deck14.sqlite3","deck15.sqlite3"]:
for i in ["decks.sqlite3"]:
conn = sqlite3.connect(i)
c = conn.cursor()
print "Decks:",
c.execute('select count(*) from decks')
for j in c.fetchall():
print j[0]
print "Best 10 decks:"
print "Dredger, Faithless Looting, Lion's Eye Diamond, Discard Creature, Careful Study, Breakthrough, Cephalid Coliseum, Land, Other"
c.execute('select * from decks order by perc desc limit 10')
for j in c.fetchall():
print j
print
print "Best 12-chaff deck:",
c.execute('select * from decks where i = 12 order by perc desc limit 1')
for j in c.fetchall():
print j
print "Best 12-chaff, 4 LED deck:",
c.execute('select * from decks where i = 12 and c = 4 order by perc desc limit 1')
for j in c.fetchall():
print j
print "Best 13-chaff deck:",
c.execute('select * from decks where i = 13 order by perc desc limit 1')
for j in c.fetchall():
print j
print "Best 13-chaff, 4 LED deck:",
c.execute('select * from decks where i = 13 and c = 4 order by perc desc limit 1')
for j in c.fetchall():
print j
print "Best 14-chaff deck:",
c.execute('select * from decks where i = 14 order by perc desc limit 1')
for j in c.fetchall():
print j
print "Best 14-chaff, 4 LED deck:",
c.execute('select * from decks where i = 14 and c = 4 order by perc desc limit 1')
for j in c.fetchall():
print j
print "Best 15-chaff deck:",
c.execute('select * from decks where i = 15 order by perc desc limit 1')
for j in c.fetchall():
print j
print "Best 15-chaff, 4 LED deck:",
c.execute('select * from decks where i = 15 and c = 4 order by perc desc limit 1')
for j in c.fetchall():
print j
# c.execute('select * from decks where c=4 order by perc desc limit 1')
# for j in c.fetchall():
# print j