I flagged this question as off topic several days ago. I did, and still do, think that it is not a good fit for this site. As of today, five days after being posted, it has yet to receive an answer. The question is essentially asking for someone to provide a tutorial on how to do a calculation. How is this question not off topic on this site?
Someone flagged/voted a second time, and it's now been closed.
Frankly, "gimme code" is even closable for the programming sites on SE, let alone here, which doesn't provide code help.
An instance in the past is not indicative of what is on-topic, there's a lock reason for this particular issue. And not every question goes.
SE is focused, for a good reason, and the questions need to be on-topic and focused.