0b92b4f5530fee68432f13075a1ddc866748f9d1,examples/showcase/firefox.py,,svg_parse,#Any#,19
Before Change
float_re = re.compile(r"(?:[\s,]*)([+-]?\d+(?:\.\d+)?)")
vertices = []
codes = []
last = (0, 0)
for cmd, values in path_re.findall(path):
points = [float(v) for v in float_re.findall(values)]
points = np.array(points).reshape((len(points) //2, 2))
if cmd.islower():
points += last
cmd = cmd.capitalize()
last = points[-1]
codes.extend(commands[cmd])
vertices.extend(points.tolist())
After Change
"Z": (Path.CLOSEPOLY,)}
vertices = []
codes = []
cmd_values = re.split("([A-Za-z])", path)[1:] // Split over commands.
for cmd, values in zip(cmd_values[::2], cmd_values[1::2]):
// Numbers are separated either by commas, or by +/- signs (but not at
// the beginning of the string).
points = ([*map(float, re.split(",|(?<!^)(?=[+-])", values))] if values
else [(0., 0.)]) // Only for "z/Z" (CLOSEPOLY).
points = np.reshape(points, (-1, 2))
if cmd.islower():
points += vertices[-1][-1]
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 11
Instances Project Name: matplotlib/matplotlib
Commit Name: 0b92b4f5530fee68432f13075a1ddc866748f9d1
Time: 2020-11-20
Author: anntzer.lee@gmail.com
File Name: examples/showcase/firefox.py
Class Name:
Method Name: svg_parse
Project Name: RaRe-Technologies/gensim
Commit Name: aaa0d4fcdff881ccbd69d4be0e370ac55b930f10
Time: 2010-04-02
Author: radimrehurek@seznam.cz
File Name: src/gensim/corpora/dmlcorpus.py
Class Name: DmlCorpus
Method Name: loadDictionary
Project Name: RaRe-Technologies/gensim
Commit Name: 6e5ac39b4247082efdf934e0e03cc234ddcef529
Time: 2010-04-02
Author: piskvorky@92d0401f-a546-4972-9173-107b360ed7e5
File Name: src/gensim/corpora/dmlcorpus.py
Class Name: DmlCorpus
Method Name: loadDictionary