db8c78987fa2dbd7fabbb8f57775a2f500fe7612,lingpy/algorithm/distance.py,,hamming,#Any#Any#,16
Before Change
assert len(str1) == len(str2)
ne = operator.ne
return sum(map(ne, str1, str2))
def jaccard(set1, set2):
After Change
the hamming distance
return sum(operator.ne(*pair) for pair in zip_longest(str1, str2, fillvalue=None))
def jaccard(set1, set2):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances
Project Name: lingpy/lingpy
Commit Name: db8c78987fa2dbd7fabbb8f57775a2f500fe7612
Time: 2014-12-16
Author: xrotwang@googlemail.com
File Name: lingpy/algorithm/distance.py
Class Name:
Method Name: hamming
Project Name: pantsbuild/pants
Commit Name: 6370c6c70ff603b722c4ccc15d0a49129e8efb17
Time: 2018-07-19
Author: ericarellano@me.com
File Name: src/python/pants/reporting/html_reporter.py
Class Name: HtmlReporter
Method Name: _render_message
Project Name: tensorflow/minigo
Commit Name: d4e0601ea9e5ec3d7995ccc76c057c1a2d1e9ed8
Time: 2017-12-13
Author: brian.kihoon.lee@gmail.com
File Name: sgf_wrapper.py
Class Name:
Method Name: make_sgf