voteCounter.py 文件源码

python
阅读 31 收藏 0 点赞 0 评论 0

项目:MiniTWOW-Tools 作者: hanss314 项目源码 文件源码
def main():
    global should_draw
    start = time.time()
    print('Gathering Data')
    path, prompt, scores, votes, twowers, twower_count, top_number, elim_number = parse_args()

    print('Processing Scores')
    scores = process_votes(votes, scores, path)

    if should_draw:
        print('Drawing Image')
        base = Image.new('RGBA',(1368,1368),color=(255,255,255))
        drawer = ImageDraw.Draw(base)
        prompt, base, drawer, header_height = draw_header(prompt, base, drawer,scores)
        scores = draw_rankings(scores,top_number,elim_number,twower_count,base,drawer,header_height,twowers)
        base.save('./twows/{}/results.png'.format(path))

    print('Recording Data')
    write_csv(scores,path)
    write_history(path)
    end = time.time()

    print('Time taken {} seconds'.format(end-start))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号