Public repository of code samples for Sphere Engine services.
The list of programming languages supported by Sphere Engine is available here. This repository contains samples presenting input/output operations for each of supported programming languages.
Navigate to the compilers/languages directory and browse for a desired sample. The naming convention is
ID Name (compiler) where:
IDis the programming language identifier in Sphere Engine,Nameis the programming language name,- (optional)
compileris the name of the programming language compiler.
A typical directory with code sample (e.g., compilers/languages/116 Python 3) contains a file with the source code
(e.g., source.py) and a file with input data (i.e., input.txt).
You can use both the user interface and the API to run any of these samples:
- user interface is available in the Sphere Engine panel by
Compilers -> Consolein the main menu (link), - API calls can be executed with
curllike this:
cd "compilers/languages/116 Python 3";
curl -X POST \
-F "compilerId=116" \
-F "[email protected]" \
-F "input=1 2 10 42 11" \
"https://<endpoint>.compilers.sphere-engine.com/api/v4/submissions?access_token=<access_token>"Navigate to the problems/languages directory and browse for a desired sample. The naming convention is
ID Name (compiler) where:
IDis the programming language identifier in Sphere Engine,Nameis the programming language name,- (optional)
compileris the name of the programming language compiler.
A typical directory with code sample (e.g., problems/languages/116 Python 3) contains a file with the source code
(e.g., source.py).
These samples are designed to be used with a GETFAMILIAR programming problem available in the Sphere Engine Problems Editor.
You can use both the user interface and the API to run any of these samples:
- user interface is available in the Sphere Engine panel by
Problems -> Editorin the main menu (link); navigate toShared problemstab and look for theGet familiar with online judge systemproblem (link); use theTestsection (link) and run the sample by selecting a desired programming language. - API calls can be executed with
curllike this:
cd "problems/languages/116 Python 3";
curl -X POST \
-F "problemId=20536" \
-F "compilerId=116" \
-F "[email protected]" \
"https://<endpoint>.problems.sphere-engine.com/api/v4/submissions?access_token=<access_token>"