Skip to content

Instantly share code, notes, and snippets.

View Ajnus's full-sized avatar
💭
Praise the Sun! ☀️

Jam Ajna Soares Ajnus

💭
Praise the Sun! ☀️
View GitHub Profile
@Ajnus
Ajnus / testCasesDownloader.py
Last active February 23, 2024 14:16
Download and save large test cases to text files locally with Hackerrank's folder structure.
# original by https://gist.github.com/ankurchaudhary627/9bb4dd65f96b10d9e7999a6f73ecb0fd
import requests
PROBLEM = "Birthday Cake Candles" # custom
TESTCASESFOLDER = f"Prepare/Algorithms/Warmup/{PROBLEM}/test cases" # insert yours
# INPUT AND OUTPUT URL'S OF GIVEN TESTCASE
URL_ARRAY=["https://hr-testcases-us-east-1.s3.amazonaws.com/23074/input01.txt?response-content-type=text%2Fplain&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAR6O7GJNX5DNFO3PV%2F20240223%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240223T140116Z&X-Amz-Expires=7200&X-Amz-SignedHeaders=host&X-Amz-Signature=7b4b0012e946f213270af147191aabf43ecccd1acbabd216385b51f986553173",
"https://hr-testcases-us-east-1.s3.amazonaws.com/23074/output01.txt?response-content-type=text%2Fplain&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAR6O7GJNX5DNFO3PV%2F20240223%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240223T140148Z&X-Amz-Expires=7200&X-Amz-SignedHeaders=host&X-Amz-Signature=a5d8ba5