This Python script automates the process of solving problems from Szkopuł
git clone https://github.com/Kamix-08/szkopul-solver
cd szkopul-solver
- Task scraping: automatically extracts task details from Szkopuł
- AI integration: utilizes Groq to process and solve tasks
- Code submission: formats the solutions into a
.cpp
file and submits them back to Szkopuł
Before executing the script, install the dependencies, by running
pip install -r requirements.txt
The dependencies include:
groq>=0.9.0
bs4>=0.0.2
requests>=2.31.0
PyPDF2>=3.0.1
Modify the config.json
file to include your credentials and configuration:
{
"GROQ_API_KEY": "foo",
"SZKOPUL_API_KEY": "bar",
"AI_MODEL": "baz"
}
All of the necessary API Tokens are free.
Groq:
https://console.groq.com/keys
Szkopul:
https://szkopul.edu.pl/api/token
You can find aviable AI models here:
https://console.groq.com/docs/models
In the config.json
file, set the value of AI_MODEL
to the Model ID
of AI of you choosing.
Example:
"AI_MODEL": "llama3-8b-8192"
Szkopul uses images to render some of the text, such as 2^n
in this example:
The script cannot process those images, so the user will be prompted to input the text from those images manually:
[?] Input the text seen on the LaTeX image #1:
On top of that, the script can only process problems from public contest, such as zLO155, while not being able to process private contests (contest, that require authorization to access), such as PIWO 2019/20.
Contributions are welcome! If you'd like to contribute, please fork the repository and use a feature branch. Pull requests are warmly welcome.
This project is licensed under the MIT License - see the LICENSE
file for details.