I submitted a proposal to PyCon India 2-3 months before the conference. They accepted my proposal, I think, mainly because of my contribution to CPython. I am not a core developer but I have many patches accepted to CPython code (https://hg.python.org/cpython/log?rev=vajrasky&revcount=200). So in my case, contribution to open source -> proposal -> giving talk in conference.