The problem with the DMCA is that if the claimant disagrees with your counter notice, the content stays offline for at least enough time for a lawsuit be be filed over the contents of the post, if the claimant is actually willing to take the matter to court.
I don't think anyone will actually go through the expenses to go to court over a code snippet on Github, unless they're particularly principled, wealthy, and retired and I think Hackerrank will definitely try to send their in their legal team.
By just filing a counter notice, you're also doxing yourself to people who clearly have no interest in following the law.
Github seems to have processed the DMCA counter notice but the content is still offline. From that I gather that Hackerrank filed a lawsuit or the counter notice was retracted somehow, or Github is violating the DMCA by keeping the content offline.