4a84d524fc0fd8d8c372a34d8a435732b09bbd8b,deeppavlov/models/evolution/check_binary_mask.py,,check_and_correct_binary_mask,#Any#Any#,49

Before Change


        candidates = []
        cycles = list(nx.simple_cycles(directed_graph))
        n_cycles = len(cycles)
        print("Cycles: {}".format(cycles))
        // number of candidates to be the best new graph
        cycles_len = np.array([len(cycle) for cycle in cycles])
        n_candidates = np.prod(cycles_len)

After Change




def check_and_correct_binary_mask(nodes, binary_mask_):
    binary_mask = deepcopy(binary_mask_)
    binary_mask = np.array(binary_mask)
    directed_graph = get_digraph_from_binary_mask(nodes, binary_mask)
    sources, sinks = find_sources_and_sinks(directed_graph)

    while not nx.is_directed_acyclic_graph(directed_graph):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 4

Instances


Project Name: deepmipt/DeepPavlov
Commit Name: 4a84d524fc0fd8d8c372a34d8a435732b09bbd8b
Time: 2018-04-17
Author: dilyara.rimovna@gmail.com
File Name: deeppavlov/models/evolution/check_binary_mask.py
Class Name:
Method Name: check_and_correct_binary_mask


Project Name: deepmipt/DeepPavlov
Commit Name: 5399f83f4d0e5490ec4faf51469327857e129d61
Time: 2018-06-26
Author: dilyara.rimovna@gmail.com
File Name: deeppavlov/models/evolution/check_binary_mask.py
Class Name:
Method Name: check_and_correct_binary_mask


Project Name: qq547276542/Agriculture_KnowledgeGraph
Commit Name: 2d8e34bbd07213d0c2dda07c9926e9aaa2793e38
Time: 2018-03-19
Author: kjmd2d@sina.cn
File Name: wikidataSpider/wikidataRelation/wikidataRelation/pipelines.py
Class Name: WikidatarelationPipeline
Method Name: process_item


Project Name: acl-org/acl-anthology
Commit Name: 4ee031fcac2acd306d2d713e2b2bf7e42d58dd53
Time: 2019-07-03
Author: kanmy@comp.nus.edu.sg
File Name: bin/add_dois.py
Class Name:
Method Name: main