def compute_ema(smoothing_factor, points):
ema = []<EOL>if(len(points) > <NUM_LIT:0>):<EOL><INDENT>ema.append(points[<NUM_LIT:0>])<EOL><DEDENT>for i in range(<NUM_LIT:1>, len(points)):<EOL><INDENT>ema.append(smoothing_factor * points[i] + (<NUM_LIT:1> - smoothing_factor) * ema[i - <NUM_LIT:1>])<EOL><DEDENT>return ema<EOL>
Compute exponential moving average of a list of points.
:param float smoothing_factor: the smoothing factor.
:param list points: the data points.
:return list: all ema in a list.