Rating changes for last rounds are temporarily rolled back. They will be returned soon. ×

WillTheBill's blog

By WillTheBill, history, 2 years ago, In English

Hey everyone!

With inspiration from

I proudly present cfscripts. cfscripts is a collection of scripts for Codeforces that uses the cf-API to do different things.

For instance, cfscripts includes a script named What If? (yes, very fancy), which allows you to simulate Codeforces contest rating changes over time, but including virtual and unofficial contests. You can choose to include only positive rating changes (this feature is dedicated to galen_colin).
   You may ask: Why would I want to simulate Codeforces virtual ra....
   And to that I answer: It's good fun and possibly motivating. But.. if you want high cf rating, I've heard it's much better to solve a LOT of difficult problems rather than gazing upon your rating.

I should mention that even though the web-requests to the cf-API gets cached (yes, I spend the time caching requests...), it's a pretty heavy tool in terms of API usage. So.. think about the cf API before simulating your entire contest history (It should be fine ;)).

As many other cf users, I have made several scripts using the wonderful API, and I finally thought my own collection was worthy of being shared here on Codeforces. cfscripts currently includes the following scripts:

  • Comulative AC count
    • Count how many problems were solved since a specific date.
  • Daily ACs
    • Finds problems solved on each day along with their rating.
  • Range rank
    • In an official contest, where did you rank among the contestants within a given rating range around your rating (the rating at the time of participating).
  • Unsolved Contest Problems
    • Find unsolved problems from contests, where you have made at least one submission in the contest. Why? Because you don't want to spoil nice unsolved virtuals, when you just solve problems from the problemset. It handles div1/div2 contests where a problem occurs in both.
  • Virtual Performance
    • Calculate rank/delta/performance of virtual/unofficial/official contests.
  • What if?
    • What If Codeforces virtual contests / unofficial participations were official? Calculates new ratings using deltas and simulates the past $$$n$$$ contests.

Additionally, there is also a (currently) small "library" for interfacing with the cf API.

I will update this post, when more scripts are added.

cfscripts is available on github: https://github.com/willthbill/cfscripts
On the releases page you can find executables for linux/macos and windows, which should be run in a terminal.
Check out the repository for more details (ex. running with pipenv).

I will try to implement bug-fixes and other wishes you may have (to a certain extend), especially if you create an issue about it or comment on this post :D
Feel free to contribute a script (preferably in python3) or bug-fixes, by submitting a pull request (don't forget to give yourself credit).

I hope some of you may find cfscripts entertaining / useful.

Best
William

Full text and comments »

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