Reading through many lines of code in Golang and Java makes for an interesting observation from the codebase which I was taking a look. There were different styles of coding and it was obvious from reading code that is written by experienced gophers. People on team who do both Java and Golang use the same Java style in Golang as well. While most Java programmers come from Clean code school of…
Service Think of it as SQS A durable queue between producers and consumers SNS A fan-out notification system Kinesis A high-throughput event stream SQS: Is ideal when Producers and consumers run at different speeds You want retry, durability, and backpressure Each message should be processed at least once SNS SNS is about fan-out, not durability for processing. Push-based One message → many…
Concurrency primitives can be implemented on top of channel abstraction of CSP style. Here is an example of implementing mutex using channels. Go code to implement mutex using channels. package main import "fmt" type Lock struct { locked chan bool } func NewLock () Lock { lock := Lock { locked : make ( chan bool , 1 )} lock . locked <- true return lock } func ( l * Lock ) Lock () { <- l . locked…
I wanted to share some tips on quickly preparing for the TOEFL iBT test I had to take TOEFL on a short notice, I had two weeks to take the exam and had prepared using materials that I will share in this post It helped me get a decent score (106/120) and I wanted to share those incredible materials that helped me with everyone who are looking to ace the exam in a short span of time.
This is the analysis part where we do a small analysis to find Which are the most important/popular tweets Whether older materials covered important concepts than recent tweets Load the necessary libs % load_ext autoreload % autoreload 2 % matplotlib inline import pandas as pd pd . set_option ( "display.width" , 150 ) import requests import re import matplotlib.pyplot as plt import…
I was searching the net for mlflashcards, I found this incredible machine learning flashcard tweet series from Chris Albon . It looks pretty and covers a lot of ground, Got a thought – why not download them for later use? I thought it would be a fun exercise to start the weekend and jumped into action. Step 1 – Collect/Scrape data from twitter I evaluated using twitter api using…
I am taking the wonderful fast.ai course thought by Jermey Howard and Rachel. We use jupyter notebooks in classes and it is always nice to see how Jermey’s notebook looks. It has few tweaks like collapsible headings better tables and fonts Learnt that he uses a themes for the visual customizations and an extensions to allow collapsing of headers from his reply in forums The theme script can…
We don’t have an implementation for skipgrams in sklearn. This post covers how to use the skipgram function in nltk with sklearn’s CountVectorizer and TfidfVectorizer We are going to create a skipgram tokenizer that can be passed to the tokenizer parameter of the vectorizer. Create a basic tokenizer that can split the original strings to tokesn. Tokenizer can be just .split() or a…
I have setup automatic compiling and deploying of my blog using Travis.CI Recently I encountered a strange issue, the blog compiles and runs fine in my system but the site doesn’t come up after a Travis build. On investigation found this in the logs from Travis CI. Deploying updates to GitHub... Started building sites ... ERROR 2017/03/25 02:31:30 .Page's Use RSSlink is deprecated and will…
Spacemacs uses Ctlr+o to move backward to the last edited location and Ctrl+i to move foward after going back using Ctrl+o similar to Vim. I found that Ctrl+o works but Ctrl+i doesn’t moves forward through the edit locations. I had the same issue in OSX/emacs 25.1 and in ubuntu/emacs25.1. Searched the net and found this helpful issue page –…
I was writing my blog and added a link to google plus in the sidebar. I wanted to make a human readable/rememberable Id to use for my google plus page. I guess, planning to {use|add link} to google plus is a bad idea. I googled to find the steps to create a custom profile Id and landed in the documentation page – Get a custom URL for your Google+ profile I tried following the steps and…
Here are the steps I took to build and deploy my blog automatically using hugo and travis-ci to github pages I assume a hugo blog is already created and exist Create .travis.yml file in the project directory with the following contents language : go sudo : required git : submodules : true install : - go get -v github.com/spf13/hugo script : bash ./deploy.sh notifications : email : on_failure :…
Spacemacs recommends using source code pro as the default font, infact this is the font set in .spacemacs file. If the font is not availale it is substituted for some other alternative. To find the font in use do C-u C-x = on my mac it was using Menlo font. DejavuSansMono looks better than Source code Pro on ubuntu and I switched to it in my ubuntu system. A list of top programming fonts can be…
I started following the Django tutorials by arun . I wanted to know about the related classes and quickly look into docs for the things that I code, I wanted an environment that is nice to newbies, helping with code completion and easy documentation lookup. I searched and found a huge list of options . Since I was begining with Django I wanted an environment that is much easier to setup, my first…
I very much like the presentation of hackernews when it comes to understanding and making sense of the discussions quickly. It is a lot easier than reading pages of forums to get the main ideas of the discussions since the top comments and active discussions bubble to the top. I wanted to run a site for discussing and sharing information that are useful for people working in techparks and the…
These are the things I did to setup new VPS instances on Digital Ocean and ChicagoVPS Update the machine sudo apt-get update sudo apt-get upgrade Set locales sudo locale-gen sudo dpkg-reconfigure locales add user sudo adduser tutysra # give sudo previliges sudo visudo tutysra ALL =( ALL ) ALL Install Git sudo apt-get install git Install sun java sudo add-apt-repository ppa:webupd8team/java sudo…
Correlation between INR values of different currencies 2012-09-05 11:31 data clojure This is an interesting take away example from the class which Anand is teaching at NIAS. Here we are trying to correlate between the INR values of various currencies like AUD, CNY (Chinese Yen), EUR, GBP (Great Britain Pound), JPY, SGD, USD and find the positive or negative correlations. The focus is on data…
I have been thinking about having a professional looking blog/space for some time. I noticed many people I follow on github maintaining a neat blog, I see that many of them use jekyll / octopress and use github pages for hosting. I like the concept of static blogging and wanted to give it a try. I gone through the process and it looks neat and clean, create a github repo with your username and…
I am Saravana, a programmer doing entreprise software by day and hacking on interesting stuff by night. I Love to try new things and experiment with various technologies/things that interests me. I usually find that my interest keeps changing and centered mostly around making things easy for me.