PetiteProgrammer

PetiteProgrammer / ProgrammingLanguageIdentification / 0.1.3

Programming Language Identification

20 Credit Royalty
Detect the programming language of source code
Language
Python 3.x
Metrics
API Calls - 227,448 Avg call duration - 1.01sec
Permissions
The Algorithm Platform License is the set of terms that are stated in the Software License section of the Algorithmia Application Developer and API License Agreement. It is intended to allow users to reserve as many rights as possible without limiting Algorithmia's ability to run it as a service. Learn More
This is necessary for algorithms that rely on external services, however it also implies that this algorithm is able to send your input data outside of the Algorithmia platform.

Run an Example

Input
Output
[
  [
    "javascript",
    0.9898891716577287
  ],
  [
    "markdown",
    0.003837364611352916
  ],
  [
    "java",
    0.0018736157456299308
  ],
  [
    "php",
    0.0017531876463711639
  ],
  [
    "c",
    0.0009585207454160043
  ],
  [
    "lua",
    0.0007419186073970404
  ],
  [
    "html",
    0.0003518026874305513
  ],
  [
    "objective-c",
    0.0002779842516112652
  ],
  [
    "sql",
    0.00017283418084344316
  ],
  [
    "css",
    0.000038611774005519745
  ],
  [
    "c++",
    0.0000343903914437696
  ],
  [
    "swift",
    0.00003122888156291078
  ],
  [
    "bash",
    0.000013677125153852474
  ],
  [
    "ruby",
    0.00001224731478181401
  ],
  [
    "perl",
    0.000005581660035943508
  ],
  [
    "c#",
    0.0000038442524620865925
  ],
  [
    "scala",
    0.000003723956933340254
  ],
  [
    "python",
    1.572113560595084e-7
  ],
  [
    "r",
    6.431838326426007e-8
  ],
  [
    "haskell",
    4.036764786336715e-8
  ],
  [
    "vb",
    3.261245241114874e-8
  ]
]

Install and Use

Install

Install the Algorithmia CLI client by running:

curl -sSLf https://algorithmia.com/install.sh | sh

Then authenticate by running:

$ algo auth
# When prompted for api endpoint, hit enter
# When prompted for API key, enter your key: YOUR_API_KEY
CLI Install Docs

Use



    algo run PetiteProgrammer/ProgrammingLanguageIdentification/0.1.3 -d '"/* Simple JavaScript example */\n\n// add two numbers\nfunction add(n, m) {\n  return n + m;\n}"' --timeout 300
  
CLI Docs