Skip to content

Instantly share code, notes, and snippets.


Jose Ruivo jruivo-dev

View GitHub Profile
View my_id.txt
### Keybase proof
I hereby claim:
* I am jruivo-dev on github.
* I am jruivo ( on keybase.
* I have a public key ASAqIVaa_eWerEIvAqTi_00K_7qfToWRLMrynDeX10-7PQo
To claim this, I am signing this object:
jruivo-dev / gist:0decb79c832e267bb40521c8c15f6dfa
Last active Mar 10, 2018
Upload images on Colab, resize and predict classification
View gist:0decb79c832e267bb40521c8c15f6dfa
from google.colab import files
uploaded = files.upload()
for fn in uploaded.keys():
print('User uploaded file "{name}" with length {length} bytes'.format(
name=fn, length=len(uploaded[fn])))
dog = uploaded['dog.jpg']
img = cv2.imdecode(np.frombuffer(dog, np.uint8), cv2.IMREAD_COLOR)