Skip to content

Instantly share code, notes, and snippets.

@protortyp
Created June 15, 2023 16:38
Show Gist options
  • Save protortyp/e52e679895989f700742186fc3c51397 to your computer and use it in GitHub Desktop.
Save protortyp/e52e679895989f700742186fc3c51397 to your computer and use it in GitHub Desktop.
Calculate the upload time in days, given upload speed in mbps, and terrabytes to upload
def upload_time_in_days(mbps, tb):
mbps_in_MBps = mbps / 8
tb_in_MB = tb * 1000000
total_seconds = tb_in_MB / mbps_in_MBps
total_days = total_seconds / (60 * 60 * 24)
return total_days
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment