{ "cells": [ { "cell_type": "markdown", "id": "62eb9a47-75c4-4c5c-8315-681a76874f7f", "metadata": {}, "source": [ "# File properties" ] }, { "cell_type": "code", "execution_count": 1, "id": "a370d604-b633-4fd0-9387-ddb60c64cd38", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Failed to import module h5tbx\n" ] } ], "source": [ "import h5rdmtoolbox as h5tbx" ] }, { "cell_type": "code", "execution_count": 2, "id": "7cd41e8d-555a-43d3-b821-9c398d3c1711", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "800 B\n" ] } ], "source": [ "with h5tbx.File() as h5:\n", " print(h5.filesize)" ] }, { "cell_type": "code", "execution_count": 4, "id": "172ce002-1f34-49cb-a356-b59f712f5486", "metadata": {}, "outputs": [ { "data": { "text/html": [ "800 B" ], "text/latex": [ "$\\begin{pmatrix}800\\end{pmatrix}\\ \\mathrm{B}$" ], "text/plain": [ "array(800) " ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "h5tbx.get_filesize(h5.hdf_filename)" ] }, { "cell_type": "code", "execution_count": 6, "id": "6a333b44-4a53-4977-a8ed-faa983294222", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "'6781e0baec8d65b9a95a3e879a5098d1'" ] }, "execution_count": 6, "metadata": {}, "output_type": "execute_result" } ], "source": [ "h5tbx.get_checksum(h5.hdf_filename)" ] }, { "cell_type": "code", "execution_count": null, "id": "7bbc008c-d95e-46b2-a0bb-f0f1ccd757df", "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.8.19" } }, "nbformat": 4, "nbformat_minor": 5 }