samestats.py 文件源码

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

项目:same-stats-different-graphs 作者: jmatejka 项目源码 文件源码
def main():
    # run <shape_start> <shape_end> [<iters>][<decimals>]
    arguments = docopt(__doc__, version='Same Stats 1.0')
    if arguments['run']:
        with plot_settings():
            it = 100000
            de = 2
            frames = 100
            if arguments['<iters>']:
                it = int(arguments['<iters>'])
            if arguments['<decimals>']:
                de = int(arguments['<decimals>'])
            if arguments['<decimals>']:
                frames = int(arguments['<frames>'])

            shape_start = arguments['<shape_start>']
            shape_end = arguments['<shape_end>']

            if shape_start in INITIAL_DATASETS and shape_end in ALL_TARGETS:
                do_single_run(shape_start, shape_end, iterations=it, decimals=de, num_frames=frames)
            else:
                print("************* One of those shapes isn't correct:")
                print("shape_start must be one of ", INITIAL_DATASETS)
                print("shape_end must be one of ", ALL_TARGETS)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号