Skip to content
This repository has been archived by the owner on Jul 2, 2022. It is now read-only.

Latest commit

 

History

History
25 lines (16 loc) · 507 Bytes

notes.md

File metadata and controls

25 lines (16 loc) · 507 Bytes

Notes

Misc notes and code snippets for things

import numpy as np

# Create a dummy matrix
img = np.ones((50, 50, 3), dtype=np.uint8) * 255
# Save the shape of original matrix.
img_shape = img.shape

message_image = np.ndarray.tobytes(img)

re_img = np.frombuffer(message_image, dtype=np.uint8)

# Convert back the data to original image shape.
re_img = np.reshape(re_img, img_shape)

log viewer

https://www.npmjs.com/package/frontail

frontail /var/log/system.log /var/log/wifi.log