After years of struggling with ratings, revenues and distribution, Viacom is showing signs of life again. The company beat Wall Street’s dire expectations on revenue and earnings for Q2, but the company is still suffering advertising revenue declines – as are most of the other networks. And while ratings dips continue to plague most pay TV networks, two of Viacom’s strongest channels, Nickelodeon and MTV, have both seen some ratings rebounds recently. The signs of new growth were enough to spur Barclays analyst Kannan Venkateshwar to give accolades to the company: “Turning around ratings in media companies in itself tends to take a long time, but doing so in the midst of secular shifts and in a demographic that is…