Skip to content

Instantly share code, notes, and snippets.

@p-geon
Last active May 14, 2021 09:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save p-geon/4786457364549baaa214068e68bb586c to your computer and use it in GitHub Desktop.
Save p-geon/4786457364549baaa214068e68bb586c to your computer and use it in GitHub Desktop.
python useful snippets
# for docker inside, "ls ./ && ls ../"
import os; print(os.listdir('./'), os.listdir('../'))
# =====
# images
# =====
'''read tif'''
!pip install tifffile==2020.9.3
import tifffile
tifffile.imread('filename.tif')
'''read other image formats'''
from skimage import io
io.imread('filename.png')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment