Skip to content

Instantly share code, notes, and snippets.

View BinRoot's full-sized avatar

Nishant Shukla BinRoot

View GitHub Profile
@BinRoot
BinRoot / ch02_1.py
Last active November 3, 2016 14:34
revenue = 0
for price, amount in zip(prices, amounts):
revenue += price * amount
A breakthrough in artificial intelligence will tell us a lot about ourselves--
what it means to be human, and what it means to think or whether thought is observable,
and if so, can it be traced it to an inspiration.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@BinRoot
BinRoot / imdb.md
Created December 18, 2015 01:08 — forked from titipata/imdb.md

#Dowload IMDB data for LSTM example

Here is a snippet to download python code and imdb.pkl

wget http://deeplearning.net/tutorial/code/imdb.py
wget http://deeplearning.net/tutorial/code/lstm.py
wget http://www.iro.umontreal.ca/~lisa/deep/data/imdb.pkl
@BinRoot
BinRoot / tensorflowTutorialOne.py
Created December 18, 2015 01:06 — forked from b38tn1k/tensorflowTutorialOne.py
Google tensorflow tutorial 1 in a file with comments and stuff
import input_data
import tensorflow as tf
# http://www.tensorflow.org/tutorials/mnist/beginners/index.html
print '\033[93m' + 'Tutorial1 from:\nhttp://www.tensorflow.org/tutorials/mnist/beginners/index.html' + '\033[0m'
print 'MNIST INPUT DATA'
mnist = input_data.read_data_sets("MNIST_data/", one_hot=True)
'PLACE HOLDERS'
# Make a placeholder / value to input on run

Keybase proof

I hereby claim:

  • I am BinRoot on github.
  • I am nishant (https://keybase.io/nishant) on keybase.
  • I have a public key whose fingerprint is D1D5 712D 68FF 9F79 0080 980E B351 8F17 06E1 77D1

To claim this, I am signing this object:

# .PCD v0.7 - Point Cloud Data file format
VERSION 0.7
FIELDS x y z rgba
SIZE 4 4 4 4
TYPE F F F U
COUNT 1 1 1 1
WIDTH 6698
HEIGHT 1
VIEWPOINT 0 0 0 1 0 0 0
POINTS 6698
// Declare your template and image
Mat* templ = ...;
Mat* img = new Mat(iplImg, true);
/// Source image to display
Mat img_display;
img -> copyTo( img_display );
/// Create the result matrix
int result_cols = img -> cols - templ -> cols + 1;
boolean doAction = false;
if (condition) {
doAction = true;
} else {
doAction = false;
}
if (doAction) {
// ...
@BinRoot
BinRoot / rpi.py
Created September 23, 2014 15:51
Interacting with Raspberry Pi and Thinpot potentiometer
#!/usr/bin/env python
import time
import os
import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BCM)
DEBUG = 1
# read SPI data from MCP3008 chip, 8 possible adc's (0 thru 7)
def readadc(adcnum, clockpin, mosipin, misopin, cspin):