Q: Does "drift" have the same meaning in the following two sentences?

Don't drift from the set course.

The stock market drifted upward.

A: different meanings

Q: Does "pocket" have the same meaning in the following two sentences?

The trapped miners found a pocket of air.

The battle was won except for cleaning up pockets of resistance.

A: different meanings

Q: Does "end" have the same meaning in the following two sentences?

The end of the year.

The end was exciting.

A:
different meanings