Skip to content

Instantly share code, notes, and snippets.

View gitshanks's full-sized avatar

Nishank Sharma gitshanks

View GitHub Profile
0 = [1,0,0,0,0,0,0,0,0,0]
1 = [0,1,0,0,0,0,0,0,0,0]
2 = [0,0,1,0,0,0,0,0,0,0]
.
.
.
9 = [0,0,0,0,0,0,0,0,0,1]
import tensorflow as tf
from tensorflow.examples.tutorials.mnist import input_data
mnist = input_data.read_data_sets("/tmp/data/", one_hot = True)
import tensorflow as tf
x = tf.constant([1,2,3,4,5])
y = tf.constant([6,7,8,9,10])
result = tf.multiply(x,y)
sess = tf.Session()
print(sess.run(result))
import tensorflow as tf
x = tf.constant([1,2,3,4])
import tensorflow as tf
edges = cv2.Canny(img,100,150)
cv2.imshow('edges',edges)
sobx = cv2.Sobel(img,cv2.CV_64F,1,0,ksize=5)
soby = cv2.Sobel(img,cv2.CV_64F,0,1,ksize=5)
cv2.imshow('sobx',sobx)
cv2.imshow('soby',soby)
lap = cv2.Laplacian(frame,cv2.CV_64F)
cv2.imshow('video',lap)
stream.release()
cv2.destroyAllWindows()
stream=cv2.VideoCapture(0)
while True:
ret, frame=stream.read()