Skip to content

Instantly share code, notes, and snippets.

View suriyadeepan's full-sized avatar
❤️
Rediscovering the joy of solving problems and building applications

Suriyadeepan Ramamoorthy suriyadeepan

❤️
Rediscovering the joy of solving problems and building applications
View GitHub Profile
@suriyadeepan
suriyadeepan / chatbot_1024_3layer_seq2seq.py
Created December 30, 2016 00:06
resutls of twitter chatbot
'''
########
# holy crap i'm excited about the results..
# i've been stuggling with this for a long time! :)
########
q : [they let me in the club im bouta pho it up]; a : [you dont even know what to do]
q : [manhattan ny congrats to unk and fellow jason leads unk seed in]; a : [thanks for the retweet ]
q : [making eye contact with may or may not be alive pls send help]; a : [is there on the field]
@suriyadeepan
suriyadeepan / cornell_corpus_results.py
Created December 31, 2016 01:13
Results of training seq2seq (1024x3_h - 8000 vocabulary) on Cornell Movie Dialog Corpus
'''
[1]
q : [will you unk your father and your queen]; a : [what about you]
q : [no doctor]; a : [but i dont know what it is]
q : [never heard from him again]; a : [not yet i dont know what he was talking about]
q : [you said something unk laying him to rest]; a : [we dont know what he was talking about]
q : [youre youre not doing what i think youre doing]; a : [im going to see you]
q : [well why didnt you list that among our assets in the first place what i wouldnt give for a unk cloak]; a : [but i dont think so]
@suriyadeepan
suriyadeepan / ga_naive.py
Last active January 4, 2017 03:32
Happy New Year with a simple Genetic Algorithm
import numpy as np
import random
import sys
goal = 'All work and no play makes Jack a dull boy.'
idx2c = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,. '
c2idx = { c : i for i,c in enumerate(idx2c) }
def encode(seq):
return np.array([c2idx[c] for c in seq ])
@suriyadeepan
suriyadeepan / sms_char_modeling_results.txt
Created January 5, 2017 04:17
Text generated by Character RNN trained on my personal sms data (mostly ads)
ஆ- 08/Moarter FLAT 30.330+20.
BUYB Talkse the Special TVCK & 24. in 110MB 35038.Fuald date incoming,
(Tollfree). Buy lowes.
Hi Call smy Limited so exttazi Gl Tin Coin- without fares starta kain of our 1
" Extra 25% atu.Get Lenses !!
Fly Sm, Preper muth the peditial Offer! Ge- 700+30% off, Vhop: Dede 77
@suriyadeepan
suriyadeepan / class_demo.py
Created January 6, 2017 08:32
Demonstration of class in python
# all classes are sub-classes/children of the ultimate parent class -> object (i think)
class Rectangle(object):
# the constructor
def __init__(self, length, breadth):
# class's properties
self.length = length
self.breadth = breadth
def area(self):
@suriyadeepan
suriyadeepan / rnn_hallucinations.c
Last active January 6, 2017 15:19
Language Modeling - RNN trianed on 3M lines of C code from the linux kernel source code
ixeof(mtd->pm, thdata->dst->hys_otg_dpage);
}
return ret;
}
void __u64 rv,
.str = 64;
}
list_mask |= ABLT_ATDR_PHY_SP5R,
[USB504X_MAAT1_B5,
\
def my_func(n):
for i in range(n):
print(i)
if __name__ == '__main__':
# call function here
my_func(10)
import numpy as np
import tensorflow as tf
from matplotlib import pyplot as plt
'''
N training examples (X,Y)
Y = f(X)
Y = f(X; theta)
import tensorflow as tf
import numpy as np
'''
Classification
X - [ 0.2, 0.1, 0.6 ]
Y - 2 (argmax X)
'''
@suriyadeepan
suriyadeepan / circle-packing.html
Created January 10, 2017 08:11
Circle Packing - All Work and no Play makes Jack a Dull BOY
<script src="//cdnjs.cloudflare.com/ajax/libs/p5.js/0.5.6/p5.js"></script>
<script src="sketch.js"></script>
<script src="circle.js"></script>