Skip to content

Instantly share code, notes, and snippets.

View JorgePablol's full-sized avatar
🤑

Jorge Pablo JorgePablol

🤑
View GitHub Profile
@zenthangplus
zenthangplus / fix-permission-docker-kill.sh
Created January 15, 2019 04:21
Fix permission denied when execute stop or kill docker containers on Ubuntu
#!/usr/bin/env bash
# Error example:
# ERROR: for redis cannot stop container: 16028f9:
# Cannot kill container 16028f9: unknown error after kill: docker-runc did not terminate sucessfully:
# container_linux.go:393: signaling init process caused "permission denied"
#
# This error was caused by AppArmor service in Ubuntu
# It was not working normally due to some unknown issues.
# Run following commands to fix it.
@bitchwhocodes
bitchwhocodes / customvis.py
Created January 22, 2018 06:51
Custom Vision API Prediction - PYthon
import requests
import json
url="YOUR_PREDICTION_ENDPOINT _ AVAIL customvision.ai"
headers={'content-type':'application/octet-stream','Prediction-Key':'YOUR_PREDICTION_KEY'}
r =requests.post(url,data=open("YOUR_LOCAL_IMAGE.jpg","rb"),headers=headers)
print(r.content)