import pyodbc import logging import gf_procs logging.basicConfig(filename='gf.log',level=logging.INFO, format='%(asctime)s %(message)s') cnx = pyodbc.connect("DSN=geek") cursor = cnx.cursor() htmlFormat = """ <center> </center> """ gf_procs.set_header(2) run_date = '2018-01-07' tier = ['GenX','GenY','GenZ'] color = ['rgb(225, 180, 90)','rgb(204, 204, 204)','rgb(170, 136, 68)'] bgcolor = ['background-color: rgba(217, 173, 43, 0.37)','rgba(204, 204, 204, 0.37)','rgba(171, 136, 34, 0.37)'] genimg = ['/genx.gif','/geny.gif','/genz.gif'] genlogo = ['/bk_genxguy.jpg','/bk_genyguy.jpg','/bk_genzguy.jpg'] print('<center><br><table style="width: 80%; font-family: Arial,Helvetica,sans-serif; font-size: large; text-transform: capitalize;"><tbody><tr>') for x in range(1,4): print('<td height = "332" width = "217" style="vertical-align: top; background-image: url('+genlogo[x-1]+'); background-align: center; background-size: contain; background-repeat: no-repeat;"> ') #print('<td style="vertical-align: top; width: 33%;"> ') print('<table style="width: 100%; text-align: left; margin-left: auto; margin-right: auto; border-color: gray;"') print('<tr>') print('<tr style="font-weight: bold;">')
color: #444547 font-family: sans-serif, Arial, Helvetica; } </style> """ htmlFormat = """ <center> </center> """ q_geeks = "select * from hlstatsx.geeks order by handle" geeks = list(cursor.execute(q_geeks)) gf_procs.set_header(5) print(style) for row in geeks: print('<DIV class="tile"><div class="indent"><font size="4"><b>' + row.handle.upper() + '</b></font>') print('<BR><i>' + row.firstname + ' </i>') print('<BR>Location: ' + row.location + ' ') print('<BR>Member Since: ' + "{:%Y}".format(row.memberSince)) print('<BR><font size = "2"><B>GF2K18:' + row.attendingGF2018 + '</b></font></DIV></div>') print( '<BR><BR>GF2K12 Stats: <a href="https://docs.google.com/spreadsheets/d/1jHva53qfLlvwaQDcpyAWKumWTDGL5xaIY4Xi0Cd7iuA/edit#gid=0">GF2K12</a>' ) print( '<BR><BR>GF2K11 Stats: <a href="https://docs.google.com/spreadsheets/d/1VaEhj9Old1RC4vjqHZr2abv-R2iswEw3w4OlOentnfQ">GF2K11</a>'
'pyro': '/hlstatsimg/games/csgo/ribbons/2_firebomb.png', 'hmg': '/hlstatsimg/games/csgo/ribbons/2_negev.png', 'tazer': '/hlstatsimg/games/csgo/ribbons/2_taser.png', 'arms': '/hlstatsimg/games/csgo/ribbons/4_arms_dealer.png', 'target': '/hlstatsimg/games/csgo/ribbons/6_target.png', 'wesley': '/hlstatsimg/games/csgo/ribbons/1_teamkilled.png', 'n00b': '/hlstatsimg/games/csgo/ribbons/6_suicide.png', 'bombs': '/hlstatsimg/games/csgo/ribbons/3_planted_the_bomb.png', 'hero': '/hlstatsimg/games/csgo/ribbons/3_rescued_a_hostage.png', 'defuse': '/hlstatsimg/games/csgo/ribbons/3_defused_the_bomb.png', 'nohero': '/hlstatsimg/games/csgo/ribbons/3_rescued_a_hostage.png', 'nodeliver': '/hlstatsimg/games/csgo/ribbons/6_planted_the_bomb.png', 'noscout': '/hlstatsimg/games/csgo/ribbons/3_defused_the_bomb.png', 'head_shot': '/hlstatsimg/games/csgo/ribbons/4_headshot.png' } gf_procs.set_header(4) x_win = gf_procs.get_data('playerGroup', 1, run_date) y_win = gf_procs.get_data('playerGroup', 2, run_date) z_win = gf_procs.get_data('playerGroup', 3, run_date) print(pageStyle) color = ['rgb(225, 180, 90)', 'rgb(204, 204, 204)', 'rgb(170, 136, 68)'] print('<center>') print( '<BR><div class="awesome" style="text-align: center; font-size: x-large; font-weight: bold;">GEEKFEST CHAMPIONS</DIV>' ) print( '<br><table style="width: 90%; font-family: Arial,Helvetica,sans-serif; margin-left:5%; margin-right:5%; font-size: large; text-transform: capitalize;"><tbody><tr>' ) print( '<td width="100px"><img src="/genxguy.jpg" height="100" width="100"></TD>')
#!e:/Python36/python.exe import sys import datetime import time import gf_procs timeStr = time.strftime("%c") # obtains current time gf_procs.set_header(6) htmlHeader = """ """ style = """ <style> p { text-align: center; font-size: 150%; font-weight: bold; color: red; margin-top:0px; } </style> """ htmlFormat = """ <center> <img src="/generations.jpg" height="80%" align="middle"> <p id="clock"></p> <a href="/hlstats.php?mode=players&game=csgo">See Test Run Player Stats</a> </center>
cnx = pyodbc.connect("DSN=geek") cursor = cnx.cursor() def get_data(field, tier): player_table = cursor.execute(query.format(field, tier)) tier_stats = list(player_table) return (tier_stats) htmlFormat = """ <center> </center> """ gf_procs.set_header(3) tier = ['GenX', 'GenY', 'GenZ'] color = ['rgb(225, 180, 90)', 'rgb(204, 204, 204)', 'rgb(170, 136, 68)'] bgcolor = [ 'background-color: rgba(217, 173, 43, 0.37)', 'rgba(204, 204, 204, 0.37)', 'rgba(171, 136, 34, 0.37)' ] genimg = ['/genx.gif', '/geny.gif', '/genz.gif'] run_date = '2018-02-16' c_count = 1 ##run_date = datetime.datetime.combine(datetime.date.today(), datetime.time(0,0)) - datetime.timedelta(days = 7) maps = list(gf_procs.maps_list(run_date)) print( '<center><br><table style="width: 80%; font-family: Arial,Helvetica,sans-serif; font-size: large; text-transform: capitalize;"><tbody><tr>'
import logging import gf_procs logging.basicConfig(filename='gf.log', level=logging.INFO, format='%(asctime)s %(message)s') cnx = pyodbc.connect("DSN=geek") cursor = cnx.cursor() htmlFormat = """ <center></br> </center> """ gf_procs.set_header(1) run_date = '2018-02-07' tier = ['GOLD', 'SILVER', 'BRONZE'] color = ['rgb(225, 180, 90)', 'rgb(204, 204, 204)', 'rgb(170, 136, 68)'] print( '<br><center><table style="width: 80%; font-family: Arial,Helvetica,sans-serif; font-size: large; text-transform: capitalize;"><tbody><tr>' ) for x in range(1, 4): print('<td style="vertical-align: top; width: 33%;">') print( '<table style="width: 100%; text-align: left; margin-left: auto; margin-right: auto; border="3" cellpadding="1">' ) print('<tr style="font-weight: bold;">') print('<td colspan="2" style="text-align: center; background-color: ' + color[x - 1] + ';">' + tier[x - 1] + '</td>') print('</tr>')