I don't do any ML and don't know much about it, but the Elixir / Phoenix people around José Valim now build ML software (nx, livebook) and I'm excited for this.
So whatever headstart Python might have in machine learning, it is only a matter of time until all major languages support the same C, C++ and Fortran libraries.
The only things holding it, are having anyone that cares enough to write those bindings, and the culture of which languages are accepted when submiting papers.
Once Python got the edge in certain areas - particularly data processing - it was an upward spiral. The same can be said of JavaScript for webdev over Ruby and Python, with its special place at the heart of every browser.
I'm not entirely sure why Python got its initial edge for data processing. I think Google probably played a big role by sponsoring Guido and making it one of the key languages used internally and on App Engine. Ruby also had its share of drama and not everyone appreciates its "More than one way" (TMTOWTDI) philosophy.
I grew to love Ruby, though I admit I always approached it with half a mind pretending I was writing Perl.
These days I've sometimes fallen back into Ruby, but then had issues sharing it with colleagues - so I've largely switched to Go. While most people don't have a dev-environment setup I can give them binaries built via github/gitlab/jenkins, and so sharing tools & utilities is just that little bit less painful than with Ruby (and even Python).
Obviously Perl came far earlier than Ruby and Ruby was heavily inspired by Perl (There's even a quick comparison on the official Ruby site here https://www.ruby-lang.org/en/documentation/ruby-from-other-l...) but it always felt like Ruby is such a nicer language to read and write and obviously due to age was just a more modern overall. You could define a class as a... class!
Whenever I wanted to make a quick script for myself for personal usage I'd always write it in Ruby.
I'm now in a C#/.NET role and love typed languages now but I'd never go back to Perl, but I still have a special spot for Ruby.
The thing is that is an issue of community, because Ruby does have an FFI and there is really nothing stopping people from building libraries similar to how they're done in Python, calling out to C. They just didn't.
It's hard to remember more examples. I remember having problems even with FastCGI on Ruby, but I ended up not writing the code at all so that won't count. Also something related to parsing emails.
The older and more boring I got, the more I liked Python. Young me and old me both knew what they were doing.
Also, sometimes I start writing scripts for simple things, then they grow and at some point it's interesting to share them to my teammates, and they all immediately dismiss it since it's in Ruby. For that reason, I started doing all my work-related scripting in Python. But oh boy, it's always with that sad feeling of "I wish I was doing this in Ruby". Sometimes I think I should just not have learned Ruby and jumped straight to Python.