London and Berlin have a lot of people in general, from different fields (finance and government as much as tech). Is the number of programmers/capita higher in those two cities than average? I think Silicon Valley is the highest you can get (that's my guess at least).
EDIT: IMHO, the closest thing Europe has to these is actually Zurich: it has top universities, money and big companies all in a small geographical area.
Zurich is a tenth the size of silicon valley by population though, and it is a big financial centre too. There are other comparable tech-specific places, like Sophia Antipolis, Toulouse.
By github usage, which seems a decent proxy [1], London is second after San Francisco, followed by Paris, and Berlin is only 7 (much smaller city though, so density could be higher).
Unfortunately, London and Berlin are national capitals. Silicon Vally (even if you extend it to San Francisco) isn't even a state capital.
National capitals have defence contracts and government IT, which so lucrative it sucks a lot of talent away from industry. London is also a financial centre, so that's even more competition.
London does not have defence contracts, thats largely out west, Reading way. It does have a fair amount of government IT, but that is more dispersed too (uk.gov is a new exception, but historically things like tax collection were moved out of London back in the 1970s).
1) Stanford (a top research university, with world-class students and professors)
2) Money (investment money, from a lot of people who got rich from tech)
3) A high concentration of geeks/techies/developers/whatever you want to call them
No place I know of in Europe has all three of these (in fact, I don't think any place in Europe has 3) alone).