What do you want to save?
Add Code snippet
New code examples
-
Python 2022-02-15 06:30:11
find most used colors in image python
from __future__ import print_function import binascii import struct from PIL import Image import numpy as np import scipy import scipy.misc import scipy.cluster NUM_CLUSTERS = 5 print('reading image') im = Image.open('image.jpg') im = im.resize((150, 15... Add solution -
Other 2022-01-24 03:35:38
converting float to binary 16
import struct #################### bin32 ################################ # import bitstring # f1 = bitstring.BitArray(float=0.456789, length=32) # # f1 = bitstring.BitArray(float=0.456789, length=16) # print(f1.bin) # print("0011011101001111")... Add solution