9b8d5f3516b68250c0e43d348e7ec88abfb3fa13,docs/source/generate_zoo_list.py,,,#,11

Before Change


    fout.write("\n\n")

    fout.write("Example invocation:\n\n")
    fout.write(
        ".. code-block:: shell\n\n"
        "  python -m parlai.scripts.eval_model --model {} --task {} -mf {}\n\n"
        .format(
            model["agent"],
            model["task"],
            model["path"],
        )
    )
    fout.write("\n")

fout.close()

After Change


        )
    result = model["result"].strip().split("\n")
    // strip leading whitespace from results
    result = [r.strip() for r in result]
    // make sure we indent for markdown though
    result = ["   " + r for r in result]
    result = "\n".join(result)
    fout.write(
        ".. code-block:: shell\n\n   {}\n   ...\n{}\n\n"
        .format(example, result)
    )
    fout.write("\n")

fout.close()
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 8

Instances


Project Name: facebookresearch/ParlAI
Commit Name: 9b8d5f3516b68250c0e43d348e7ec88abfb3fa13
Time: 2018-10-30
Author: roller@fb.com
File Name: docs/source/generate_zoo_list.py
Class Name:
Method Name:


Project Name: rusty1s/pytorch_geometric
Commit Name: c981834790d4167f1b01a00b795dfc1023f647c2
Time: 2020-05-22
Author: matthias.fey@tu-dortmund.de
File Name: torch_geometric/io/off.py
Class Name:
Method Name: write_off


Project Name: pytorch/fairseq
Commit Name: 8bafae2ee7044529543768eec63d8460d894f5c6
Time: 2017-10-19
Author: myleott@fb.com
File Name: train.py
Class Name:
Method Name: validate