Skip to content

Instantly share code, notes, and snippets.

View sunilnandihalli's full-sized avatar

Sunil S Nandihalli sunilnandihalli

  • Sunnyvale
View GitHub Profile
carnd-term1) sunilsn-macbookair:CarND-Behavioral-Cloning-P3 sunilsn$ python drive.py model_2017_10_14_17_57_54.hd5
Using TensorFlow backend.
Traceback (most recent call last):
File "drive.py", line 122, in <module>
model = load_model(args.model)
File "/Users/sunilsn/miniconda3/envs/carnd-term1/lib/python3.5/site-packages/keras/models.py", line 239, in load_model
model = model_from_config(model_config, custom_objects=custom_objects)
File "/Users/sunilsn/miniconda3/envs/carnd-term1/lib/python3.5/site-packages/keras/models.py", line 313, in model_from_config
return layer_module.deserialize(config, custom_objects=custom_objects)
File "/Users/sunilsn/miniconda3/envs/carnd-term1/lib/python3.5/site-packages/keras/layers/__init__.py", line 54, in deserialize
class logger:
def __init__(self,fname=None,copy_to_stdout=True):
self.copy_to_stdout=copy_to_stdout
if fname:
x=datetime.datetime.now()
self.fd = open('%s-%04d%02d%02d%02d%02d.log'%(fname,x.year,x.month,x.day,x.hour,x.minute),'w')
else:
self.copy_to_stdout = False
self.fd = sys.stdout
def log(self,*s):
(defn h [x] (map-indexed #(into [%1] %2) (partition 1 (shuffle x))))
(def win-ids (h [0 1 1 2 3 4]))
(def impression-ids (h [0 0 0 1 1 1 3 3 5 6 6]))
(def click-ids (h [0 1 2 5 2 2]))
(defaggregatefn safe-sum
([] 0)
([total val] (+ total (or val 0)))
([total] [total]))
(defn tt1 []
(let [wins-q (<- [?bid-id ?wins] (win-ids _ ?bid-id) (c/count :> ?wins))
This is a sample document to test for named entity recognition. Dr. Bharath Kumar Mohan is an authority in information retrieval. It has been a pleasure to work with Bharath. Chirayu Patel has added immense value to us with his wisdom. Abhay Garani has persevered to keep the latencies down. Aditya has worn multiple\
hats. Elvis De Souza who was a machine learning guru in his life prior to Insieve, he has undergone a major transformation while at Insieve. Elvis has tirelessly worked on our social layer to create one of most robust user-facing servers I have known. Venkatesh, an emacs geek, has lately been instrumental in our ma\
rketing drive take shape. He is probably one of the very few marketing people in the world to manage his campaign in emacs-org-mode. Ishneet Grover trained both in computer science and human computer interaction, brings a unique combination of skills to the table. Ishneet along with Bharath and Elvis has managed to \
make the user experience of Pugmarks one of the best. The descripti
(defprotocol polynomial
(eval-poly [this t])
(derivative [this])
(derivative [this n])
(coeffs [this]))
(deftype poly [coeffs]
polynomial
template <class T>
struct classname {
enum {nameId}
};
template <>
classname<bf::basic<> > {
enum {nameId=0}
};
1320000000092:802435dd-37d1-4782-a1a9-a4ff9e4f7908^Abaseline-info__enabled^Ctrue^Bbaseline-info__offer^Cfalse^Bbaseline-info__percentage^C20.0^Bbaseline-info__starts-on^C2011-10-19 20:23^Bconsumer__ip-address^C76.228.231.2^Bconsumer__runa-cid^C34bf3bdc-b4ae-4e0d-8c3f-d4
6de6c82412^Bconsumer__site-cid^Csid-22b0b099-fabe-11e0-aeff-7152a6a08315^Bevent-timestamp__^C1320000000092:802435dd-37d1-4782-a1a9-a4ff9e4f7908^Bevent-type__^C:path^Bmerchant__id^C0c5b4afa-7bf2-150a-aa15-750d1ad05aa5^Bmerchant__platform^Cshoes^Bmerchant__vertical^Cretai
ler^Bpage-elapsed-time__^C67080^Bpage-type__^C:prod^Bsession-elapsed-time__^C81825^Bsession__uber-session-id^C802435dd-37d1-4782-a1a9-a4ff9e4f7908^Burl__^Chttp://www.shoes.com/en-US/Product/EC1276064-5158321/adidas/Cardina_White/Kids'+Samoa+Toddler.aspx
1320000000093:802435dd-37d1-4782-a1a9-a4ff9e4f7908^Abaseline-info__enabled^Ctrue^Bbaseline-info__offer^Cfalse^Bbaseline-info__percentage^C20.0^Bbaseline-info__starts-on^C2011-10-19 20:23^Bclient-time__^C1320025188442^Bconsumer__
@sunilnandihalli
sunilnandihalli / join.clj
Created February 28, 2012 04:11
problem with lazy join of two large sorted csv files...
(ns pythia.soj.join
(:require [clojure.data.csv :as csv]
[clojure.java.io :as io]
[clojure.java.shell :as sh]))
(defn write-csv-record [wrtr record]
(binding [*out* wrtr]
(println (apply str (interpose \, record)))))
(defn map-seq-to-csv-with-out-using-write-csv [seq-of-maps output-file]
(let [[all-keys] (with-open [wrtr (io/writer (str output-file ".tmp"))]
@sunilnandihalli
sunilnandihalli / binary-zipper.clj
Created August 26, 2011 07:16
learning to use zippers..
(def s {:l {:l {:val 4}
:r {:val 6}
:val 10}
:r {:val 20
:l {:val 11
:l {:val 3}
:r {:val 8}}
:r {:val 9
:l {:val 2}
:r {:val 7}}}
BitVector Genealogy
The BitVectors are an ancient and immortal race of 10,000, each with a 10,000 bit genome. The race evolved from a single individual by the following process: 9,999 times a BitVector chosen at random from amongst the population was cloned using an error-prone process that considers each bit independently, and flips it with 20% probability.
Write a program to guess the reproductive history of BitVectors from their genetic material. The randomly-ordered file bitvectors-genes.data.gz contains a 10,000 bit line for each individual. Your program's output should be, for each input line, the 0-based line number of that individual's parent, or -1 if it is the progenitor. Balance performance against probability of mistakes as you see fit.
To help you test your program, here is a much smaller 500 x 500 input dataset:bitvectors-genes.data.small.gz, along with its solution file: bitvectors-parents.data.small.