I've been involved in a number of start-ups. No major dope use among the engineering staff. Some pot smoking by a few, sure, but nothing heavy. No coke. I can't speak for management, I try to avoid them as much as possible.
I wouldn't trust anything put out by HBO - even in humor - as an indicator as to any level of reality. Day-in-day-out Silicon Valley is a very unglamorous, high-stress place.
Ok funny series though - a Mike Judge of “King of the Hill” & “Idiocracy” ,etc satirical fame production.