8387bb2c5f0a0c5e14eb5e2304dd0309dc198ff3,run.py,,main,#,28

Before Change


    if isinstance(value, int) or isinstance(value, float) or \
       isinstance(value, string_types):
      parser_unk.add_argument("--" + pm, default=value, type=type(value))
    elif isinstance(value, bool):
      parser_unk.add_argument("--" + pm, default=value, type=ast.literal_eval)
  config_update = parser_unk.parse_args(unknown)
  nested_update(base_config, nest_dict(vars(config_update)))

After Change


  // with command line arguments that were passed to the script
  parser_unk = argparse.ArgumentParser()
  for pm, value in flatten_dict(base_config).items():
    if type(value) == int or type(value) == float or \
       isinstance(value, string_types):
      parser_unk.add_argument("--" + pm, default=value, type=type(value))
    elif type(value) == bool:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: NVIDIA/OpenSeq2Seq
Commit Name: 8387bb2c5f0a0c5e14eb5e2304dd0309dc198ff3
Time: 2018-06-29
Author: igor.a.gitman@gmail.com
File Name: run.py
Class Name:
Method Name: main


Project Name: NVIDIA/OpenSeq2Seq
Commit Name: ff105d68dad4231df90daafa8aa0b690ae82e06c
Time: 2018-06-29
Author: jasoli@nvidia.com
File Name: run.py
Class Name:
Method Name: main


Project Name: streamlit/streamlit
Commit Name: 9849b0e60f529b39764325f64c965cc206bd6547
Time: 2018-11-22
Author: thiagot@gmail.com
File Name: lib/streamlit/generic_binary_proto.py
Class Name:
Method Name: marshall