Skip to content

Instantly share code, notes, and snippets.

@abishekk92
abishekk92 / .vimrc
Created January 19, 2023 13:02
Neovim Config
let mapleader=","
syntax enable
set nobackup
set nowritebackup
set background=dark
colorscheme desert

Keybase proof

I hereby claim:

To claim this, I am signing this object:

@abishekk92
abishekk92 / jp_name.py
Last active October 3, 2016 16:03
Your name in Japanese or so said the WhatsApp forward.
# English to Japanese Dicitionary
jp_eng_str = "A= ka, B= tu, C= mi, D= te, E= ku, F= lu, G= ji, H= ri, I= ki, J= zu, K= me, L= ta, M= rin, N= to, O= mo, P= no, Q= ke, R= shi, S= ari, T= chi, U= do, V= ru, W= mei, X= na, Y= fu, Z= zi"
jp_eng_dict = dict(map(lambda a : a.strip().split("="), jp_eng_str.lower().split(",")))
#Convert an English word to a Japanese word.
to_jp = lambda word : "".join(map(lambda a : jp_eng_dict.get(a, '').strip(), word.lower())).title()
#Convert an English word to a Japanese name.
to_jp_name = lambda name : " ".join(map(to_jp, name.split(" ")))
@abishekk92
abishekk92 / learn_fizzbuzz.txt
Last active August 31, 2016 13:38
2 Layer GRU Encoder Decoder for Fizzbuzz.
So I tried training a 2 Layer GRU Encoder - Decoder Recurrent Neural Network to solve the well known fizzbuzz problem.
For a max sequence length of 5 and 5K toy samples, the network was able to reach 98% validation accuracy in 30 epochs.
Model Summary
============
____________________________________________________________________________________________________
Layer (type) Output Shape Param # Connected to
====================================================================================================
gru_1 (GRU) (None, 5, 128) 63744 gru_input_1[0][0]
Verifying that +abishekk92 is my blockchain ID. https://onename.com/abishekk92
@abishekk92
abishekk92 / keybase.md
Created February 6, 2016 04:56
Keybase Identity

Keybase proof

I hereby claim:

  • I am abishekk92 on github.
  • I am abishekk92 (https://keybase.io/abishekk92) on keybase.
  • I have a public key whose fingerprint is 4D62 B23D C3B6 27C3 6223 AA80 270F A21D 45D6 8542

To claim this, I am signing this object:

@abishekk92
abishekk92 / transducer_imperative.py
Created January 11, 2015 11:53
Imperative Transducer
final = Appendable()
for foo in bar:
final.append(apply_map(apply_filter(foo)))
@abishekk92
abishekk92 / sort.scala
Created July 4, 2014 12:04
Standard Sorting Algorithms implemented in Scala
import util.Random.shuffle
object Sort{
val toSort = List(1234, 23, 45, 56, 1)
def insert(list : List[Int], t : Int) : List[Int] = list match {
case Nil => List[Int](t)
case x :: xs if x > t => t :: x :: xs
case x :: xs => x :: insert(xs, t)
}
@abishekk92
abishekk92 / monoid.md
Last active July 29, 2019 18:53
Abstract Algebra and Map Reduce

I recently came across how one can parallelize an algorithm in terms of Map Reduce by nailing down the operations on the data as a well defined Algebraic Structure (A monoid). The idea has strong mathematical grounding and explains why Twitter is so much invested in Algebird, Summingbird. I will try to briefly explain what it is and why I am particularly fascinated by it.

Map Reduce

In today's world of ever growing data, the computation we need to run keeps getting complex and complex, these computations need to be run as efficiently(cost and resource) as possible. Most of these computations are run as Map Reduce jobs on a cluster of commodity grade hardware.

The idea behind Map Reduce is to move the computation to the data than to aggregate data to perform computation.

Each of the computation happen locally on the data(Mapping) on all the nodes at the same time, hence the notion of parallelism, these mapped data can be aggregated together and reduced into a representative value.

@abishekk92
abishekk92 / DemoFrameworkExecutor.scala
Last active August 29, 2015 13:58
Mesos Demo Framework Executor
package abishekk92.executor
import abishekk92.Logging
import org.apache.mesos.{ Executor, ExecutorDriver }
import org.apache.mesos.Protos._
class Demo_frameworkExecutor extends Executor with Logging {