This algorithm detects the programming language of source code with high accuracy (about 99.4% top-1 accuracy for a Github dataset).
It currently supports these languages:
Also see my article on the machine learning techniques used.
The text of a document with source code.
List of pairs: [language name, probability]