This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import argparse | |
import json | |
import operator | |
from collections import defaultdict | |
from dataclasses import dataclass | |
from functools import partial, reduce | |
import os | |
from typing import Any, Union | |
from configparser import ConfigParser | |
from pathlib import Path |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import argparse | |
from warnings import warn | |
import h5py | |
WARN_UBLOCK_SIZE = 10 * 1024 * 1024 | |
COPY_BLOCK_SIZE = 10 * 1024 * 1024 | |
parser = argparse.ArgumentParser( | |
description='Add empty user block to an HDF5 file.', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@startmindmap HDF5 Ecosystem | |
<style> | |
node { | |
RoundCorner 40 | |
MaximumWidth 300 | |
FontName Helvetica | |
FontSize 18 | |
} | |
rootNode { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import h5py | |
def comp_ratio(name, obj): | |
if isinstance(obj, h5py.Dataset) and obj.chunks is not None: | |
if obj.id.get_create_plist().get_nfilters(): | |
stor_size = obj.id.get_storage_size() | |
if stor_size != 0: | |
ratio = float(obj.nbytes) / float(stor_size) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@startuml HDF5 Universe | |
title HDF5 Universe | |
together { | |
folder "Abstract\nData Model" as ADM | |
folder "Programming\nModel" as PM | |
folder Library as L | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Requirements: | |
# HDF5 library version 1.10.5 or later | |
# h5py version 3.0 or later | |
# pip install git+https://github.com/HDFGroup/zarr-python.git@hdf5 | |
import logging | |
from urllib.parse import urlparse, urlunparse | |
import numpy as np | |
import h5py | |
import zarr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"metadata": { | |
".zattrs": { | |
"Conventions": "UGRID-0.9.0", | |
"_FillValue": -99999.0, | |
"_NCProperties": "version=1|h5netcdfversion=0.6.1|hdf5libversion=1.10.2", | |
"a00": 0.35, | |
"agrid": "grid", | |
"b00": 0.3, | |
"c00": 0.35, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
""" | |
Print storage information for every HDF5 dataset in a file. | |
Run "store_info.py --help" for information. | |
""" | |
from os import SEEK_SET | |
import argparse | |
import json | |
from functools import partial |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.