Yushima Tenman-gū is a small Shinto shrine in northern Tokyo I found after getting off at the wrong train station on the way to Ueno Park. The building pictured above is actually not the main shrine itself, but one of the other buildings in the complex.
Yushima Tenman-gū Shrine (湯島天満宮) is a Shinto shrine in Tokyo, Japan devoted to Tenjin, the Kami of Learning. It is located in the Bunkyo ward of Tokyo, not far from the University of Tokyo, and is a frequent site of prospective students hoping to pass the entrance exams there in April. At this time, the temple receives many offerings of ema votives to petition the kami for success at exams.
I also ran into this content-looking little guy at the shrine: