Download next.js/test/e2e/app-dir/actions/account-for-overhead.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 353 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/test/e2e/app-dir/actions/account-for-overhead.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/next.js/test/e2e/app-dir/actions/account-for-overhead.js
-
curl -L -o account-for-overhead.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/test/e2e/app-dir/actions/account-for-overhead.js
353 Bytes
| /** | |
| * This function accounts for the overhead of encoding the data to be sent | |
| * over the network via a multipart request. | |
| * | |
| * @param {number} megaBytes | |
| * @returns {number} | |
| */ | |
| export function accountForOverhead(megaBytes) { | |
| // We are sending {megaBytes} - 5% to account for encoding overhead | |
| return Math.floor(1024 * 1024 * megaBytes * 0.95) | |
| } | |