<jupyter_start><jupyter_text>If the sundial exaple data was downloaded, one can load it and display it by uncommenting below.<jupyter_code>%%timeit

# plydata = load_example_full()
plydata = load_example()
%%timeit

vertex_df = ep.pandas_vertices_from_plyfile('data/ObjID126.ply')
import plyfile
import h5py
import pathlib
def vertex_dict_from_plyfile_cached(filename):
    """Load vertices from plyfile and return as dict."""
    path = pathlib.Path(filename)
    cache_path = path.with_suffix('.cache.ecto')
    if cache_path.is_file():
        with h5py.File(cache_path, "r") as hf:
            x = hf["x"]["arr"][:]
            y = hf["y"]["arr"][:]
            z = hf["z"]["arr"][:]
    else:
        plydata = plyfile.PlyData.read(filename)
        x = plydata['vertex']['x']
        y = plydata['vertex']['y']
        z = plydata['vertex']['z']
        with h5py.File(cache_path, "w") as hf:
            g_x = hf.create_group('x')
            g_x.create_dataset('arr', data=x)
            g_y = hf.create_group('y')
            g_y.create_dataset('arr', data=y)
            g_z = hf.create_group('z')
            g_z.create_dataset('arr', data=z)
    return dict(x=x, y=y, z=z)
%%time

vertex_dict = vertex_dict_from_plyfile_cached('data/ObjID126.ply')
%%timeit

vertex_dict = vertex_dict_from_plyfile_cached('data/ObjID126.ply')
vertex_dict = vertex_dict_from_plyfile_cached('data/ObjID126.ply')
import pandas as pd
import ipyvolume as ipv
ep.visualize.pptk_plot_df(pd.DataFrame(vertex_dict))
len(vertex_dict['x']), len(vertex_dict['y']), len(vertex_dict['z'])
%%time

vertex_dict = vertex_dict_from_plyfile_cached('data/ObjID126.full.ply')
%%timeit

vertex_dict = vertex_dict_from_plyfile_cached('data/ObjID126.full.ply')
!ls -lh data/ObjID126.*<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.14742152466367714, 'fraction_numerical': 0.013452914798206279, 'mean_word_length': 3.9445983379501386, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '633874', 'license': 'MIT', 'n_tokens_mistral': 672, 'n_tokens_neox': 657, 'n_words': 116, 'path': 'req1.4_import_efficiently.ipynb', 'repo_name': 'sundial-pointcloud-geometry/explore', 'size': '1784'}