Depends on the adversity. If it's slogging through the work week (which is my main adversity these days):

My toxic tendency to remain completely independent is about all that motivates me to work. I don't have any real motivation anymore since I have built so many safety nets (financial or otherwise) for myself to handle that vast majority of professional failures.

But how do you get yourself to do all the cognitively heavy work for your job, day in day out?

Intrinsic motivation. For a career programming, coding should work like a stimulant to a degree. Some people also are motivated by fear/pain. Some by money or status. Most by a mix of traditional motivators.

Well I suppose in my current position there isn't much that is cognitively heavy, it's just...a slog. In previous jobs I had a bit more financial motivation when I worked on difficult things, but I made a change last year to migrate to an easier workload.

Independent in what sense?

In terms of depending on anybody (I don't have an entrepreneurial bone in my body).