Piotr Redlinski for The New York Times

As the temperature neared 100, a fire hydrant in Williamsburg, Brooklyn, was one of the places people sought relief.