[~] Refactor
This commit is contained in:
parent
cfb8196046
commit
da0d96b9f6
@ -1787,3 +1787,34 @@ def kernel_28():
|
|||||||
finally:
|
finally:
|
||||||
if not cap is None:
|
if not cap is None:
|
||||||
cap.release()
|
cap.release()
|
||||||
|
|
||||||
|
def kernel_29():
|
||||||
|
t4 = '/kaggle/working/kernel_29-poses.nc'
|
||||||
|
|
||||||
|
if not os.path.exists(t4):
|
||||||
|
import json
|
||||||
|
import io
|
||||||
|
import glob
|
||||||
|
|
||||||
|
t1 = sum(
|
||||||
|
[
|
||||||
|
json.load(
|
||||||
|
io.open(
|
||||||
|
o,
|
||||||
|
'r'
|
||||||
|
)
|
||||||
|
) for o in glob.glob(
|
||||||
|
'/kaggle/working/kernel_28-output.dir/slice-*/*.json'
|
||||||
|
)
|
||||||
|
],
|
||||||
|
[]
|
||||||
|
)
|
||||||
|
t2 = pandas.DataFrame(t1)
|
||||||
|
|
||||||
|
t3 = t2.to_xarray()
|
||||||
|
t3.to_netcdf(t4)
|
||||||
|
|
||||||
|
t5 = xarray.load_dataset(t4)
|
||||||
|
return dict(
|
||||||
|
t5=t5,
|
||||||
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user