s3 object as a fileobj for reading tar without full download
Copied from SO question How to list files inside tar in AWS S3 without downloading it?
Check my answer there for more details: link
s3 object as a fileobj for reading tar without full download
Copied from SO question How to list files inside tar in AWS S3 without downloading it?
Check my answer there for more details: link
# Recursively get size of objects | |
# https://stackoverflow.com/a/59228005/4126114 | |
# https://stackoverflow.com/a/38515297/4126114 | |
# Published at https://gist.github.com/shadiakiki1986/6d2b641264b054bc63b224a726a1ead8 | |
def nested_apply(x, func, max_depth, depth_current=0): | |
s1 = func(x) | |
if depth_current >= max_depth: return s1 | |
wrap_napply = lambda v: nested_apply(v, func, max_depth, depth_current+1) |