crap_the_coder's blog

By crap_the_coder, history, 12 months ago, In English

Hello everyone! Hope you're all doing well.

Guess what? The next edition of D'Code by IIT Gandhinagar is here!

We have 6 algorithmic problems prepared for you to put your mind to test your problem solving skills.
The contest starts today at 9 PM IST and has a duration of 2 hours. Link of the contest: https://www.codechef.com/DCDE2023

Need an incentive? We've got you covered. There are exciting prizes worth ₹26,000 for the top performers!
NOTE: You need to register here, to be eligible for prizes.

Setters/Testers: mshandilya, crap_the_coder, nishuz, Karan-Gandhi, dewansh461.

Good luck for the contest and we hope you all have fun! :D

Full text and comments »

  • Vote: I like it
  • +17
  • Vote: I do not like it

By crap_the_coder, 2 years ago, In English

Do you have many accepted solutions in CodeForces/CodeChef/Atcoder, but you can't share a convenient link to your GitHub to flex your submissions? Maybe it would take too long to upload all the files because you 1000+ accepted submissions?

Introducing UpCode, the program that uploads all your accepted solutions to your GitHub. Just enter your username and a GitHub API key and it will automatically upload all your accepted submissions from CodeForces/CodeChef/Atcoder to a GitHub repository.

For example, here's my repository that was generated by UpCode: https://github.com/crapthecoder/Competitive-Programming

Disclaimer

To use UpCode, perform the following steps:

  • Make sure python is installed, the project will not work otherwise.
  • Generate a GitHub API key from here. Make sure the repo section is checked.

  • Download the project from GitHub and extract it.
  • Navigate to the UpCode-master folder, replace the path with cmd, and press enter.

  • Run pip install -r requirements.txt
  • Run python3 main.py. If it doesn't work, try python main.py
  • Enter credentials as prompted

If all goes well, then you should see some lines like CodeForces/GNU C++20 (64)/1234E | Hello World/123456789.cpp CREATED. After that, you should be able to see the updates in your GitHub repository.


NOTE:

  • If you are running the CodeForces scraper, a Chrome browser will open. DO NOT close it or interact with it. You can safely ignore it and do something else.

  • DO NOT run multiple instances of the program for the same repository. Also, do not turn off or sleep the PC when the code is executing.

  • It is recommended to not run the code during a CodeForces contest, as a popup notification could possibly stop the code from scraping properly. Please wait until the contest is over.

  • If there are some errors, please ignore them as long as the entire program doesn't stop. The code will go through the failed submissions again to make sure they get added.

  • If the code stops executing, please try downloading the latest update again, as there have been many major updates/bug fixes thanks to the community. If there are still any issues, let me know in the comments and I will make sure to help you out!

  • CodeForces API is sometimes inconsistent and might not always be available, in which case you will be notified by the program. In that case, please wait for a while and try again.

  • Due to the Atcoder API only updating every week, there won't be any changes to the Atcoder folder in the repository if you run UpCode multiple times before it updates.


Special thanks to:

  • advik123 for being my mentor in this project.
  • ghosty for agreeing to test if he was mentioned in the blog. So here you go nerd. (Also for helping me make this blog)
  • aryan12 for existing and sharing his wisdom to the world.
  • parth_kabra for finding like 20 bugs and testing my project.
  • evenvalue for not bullying me (he bullied me into saying this)

Thank you to everyone for pointing out bugs, or suggesting some new feature. The CodeForces scraper was very hard to create, and still not as efficient as I would like it to be. But it should work, though it might take some time. If there are any bugs, please do let me know, as I want to make sure this project works for everyone :D


TL;DR:

Go to this link, follow the instructions, and bam. Your accepted submissions from CodeForces/CodeChef/Atcoder will get uploaded to GitHub.

Full text and comments »

  • Vote: I like it
  • +107
  • Vote: I do not like it