Both France and the UK have seen temperature records this week that drove up electricity prices and strained the grid.