As the U.S. Congress passed a new set of sanctions on North Korea this week, South Korea shut down the last symbol of inter-Korean economic cooperation and the United Nations Security Council discussed its own measures to punish the North for what it claimed was its first H-bomb test and subsequent rocket launch, people in Pyongyang were literally dancing in the streets.

Few countries have endured sanctions as deep and longstanding as the Democratic People's Republic of Korea. But somehow life goes on.

"Sanctions and pressure will never work on the DPRK, which has been exposed to all kinds of sanctions and blockade for decades," its state-run Korean Central News Agency wrote in an editorial last week. "Despite the enemies' ever-increasing threats and sanctions, the foundation of the Juche self-supporting economy of the DPRK has been further consolidated and its nuclear deterrence for defending the sovereignty has also been bolstered on a daily basis." Juche is the North's policy of self-reliance.

Despite the bluster, previous sanctions against the North over its nuclear program have taken a toll.

Power outages, partly due to the impact of sanctions and partly because of the way the North allocates its scarce resources, are taken for granted. Hospitals, schools and homes are often almost as cold inside as the winter is outside.

To most international investors, banks and even aid organizations, North Korea is like kryptonite. It's illegal in many cases for them to get involved, and even if they're willing to accept the risks of dealing with an unpredictable autocracy, their images could be damaged by being associated with the North.

And yet, North Koreans seem almost blase about sanctions, even as more appear to be headed their way. That may be because at least some of them still manage to get what they want.

Sanctions intended to deprive North Korea of luxury goods, for example, have been around for years. Even so, for anyone with the money — and there's good reason to believe their numbers are growing — it's easy to find a bottle of $600 Remy Martin cognac in Pyongyang, to buy an ornately wrapped gift bag filled with the best brand-name cosmetics from Japan, or to stock up on Pampers diapers and Heinz ketchup.

It's not uncommon to see a young couple in a cafe in Pyongyang who would not look out of fashion in Seoul. Children dressed in brightly colored knitted hats and jackets are evidence that many parents have at least enough wherewithal to fulfill their desire to dote.

While far less upscale, the shelves at the handful of department stores in Pyongyang are well-stocked these days, though the selection of goods available at any given moment can vary widely. Many have grocery floors with fruit and vegetable corners, baked goods and fresh meat. Street stalls selling everything from apples to shrimp chips and cookies from Vietnam are commonplace.

Life is tougher in the countryside, and even in the capital the gap between the haves and the have-nots is hard to ignore. Just a few blocks from those upscale shops with the cognac and the Miss Dior perfume, throngs of city residents stand in long lines to catch the cross-town trolleys or take advantage of the holiday discounts on fish and other foods. Public baths are popular because, when they are open, they are a sure-fire place to find hot water.

And while there has been dancing in the streets, it wasn't exactly spontaneous.

It was part of the mass mobilizations for one of the country's biggest annual events, the birthday of leader Kim Jong Un's late father, Kim Jong Il. The Day of the Shining Star, it is called, and it's been virtually the only thing that the state-run media has been broadcasting for days.

How does North Korea keep running even as much of the world tries to punish it?

Jonathan Pollack, a senior fellow at the Washington-based Brookings Institution think tank, stressed in a recent op-ed that North Korea retains access to the international economy through its links to China, which has allowed it to get the funds it needs to develop its nuclear, missile and space programs and to sustain the "core elites that underpin the Kim family's claims to absolute power."

He added that while the Beijing connection is not enough to transform North Korea's economy, "it helps Pyongyang to survive and enables its ruling elites to prosper."

"China thus holds the key to any appreciable change in North Korean behavior," he said. "Unless and until it is prepared to cooperate in exacting costs on Pyongyang, North Korea will see no reason to alter its strategy. As long as China rejects more onerous sanctions, the prospect for meaningful diplomatic progress also plummets to near zero."

China is angry over North Korea's nuclear and rocket tests but remains reluctant to severely punish the North. Still, it's not just Chinese economic support that is keeping the country afloat. It's increasingly apparent that North Korea is changing, and much of the energy has been from the bottom up, despite the country's efforts to control from the top down.

Technically at war with Washington for more than 60 years and living in a constant state of what is essentially martial law, North Koreans continue to have little to no freedom of expression, thought or assembly in any remotely political way. That hasn't changed much over the years and isn't likely to go away easily — at least not as long as its current regime remains in power and the United States and its allies continue to squeeze it in hopes it will eventually collapse.

Yet at the same time, has been an upsurge in entrepreneurial activity and quasi-market-style capitalism that has spawned a growing number of citizens, particularly in Pyongyang, who are able to afford to buy more goods and services. These are people who were forced to learn to fend for themselves during the famine years of the 1990s, and learned from the experience.

That has thoroughly, though not officially, transformed the country's real economy and fueled a demand-and-supply cycle that is being met by business-minded individuals operating either with the government turning a blind eye or providing some sort of support, often in return for a cut of the profits.

For the North's leaders, this is a real conundrum — perhaps a bigger one than any outside pressure might create.

While the rise of a middle class and an ersatz free market economy would pose a threat to North Korea's status quo, its leaders know they must get out in front of their economic problems. They need to maintain control and to retain credibility among a populace increasingly aware of the gap between their living conditions and those not only in capitalist rival South Korea, but also in post-economic reform China.

And it appears they are genuinely considering at least some kind of economic reform.

Kim Jong Un has decided to convene a major party congress in May, the first of its kind in decades, and some analysts believe that could be an opportunity for the North to announce significant new economic policies.

If it does, that might be real cause for dancing in the streets.