Last active
August 21, 2020 14:23
-
-
Save ronsims2/04a95ee60cb695796a4e61efb43a0e40 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# image to base 64 | |
from PIL import Image | |
import numpy as np | |
image = Image.open('~/some.image.png') | |
image_array = np.array(image) | |
image_data = base64.binascii.b2a_base64(image_array).decode('ascii') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# MySQL X DevAPI Python statements for retail_test shcema | |
# Sum records by date | |
dec = db.get_collection('sales_2018_12') | |
dec.find("`date` >= '2018-12-01' and `date` <= '2018-12-02'").fields('sum(amount_1) as total') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment