Skip to content

Instantly share code, notes, and snippets.

Manish Gill mgill25

Block or report user

Report or block mgill25

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
#!/usr/bin/env python
def bin(x):
return "{0:b}".format(x)
def rs_one(x):
""" Right Shift by 1 """
return x >> 1
def ls_one(x):
mgill25 /
Last active May 7, 2019 — forked from dusual/
Distributed Systems meetup group Delhi


We intend to bring a distributed systems meetup group to Delhi. We are inspired by @nishantmodak and @ShripadAgashe who have been running the meetups and conferences in Pune. Please, go through their previous meetups at @dist_sys. We want to be the space where people can talk about the various problems they have been solving around distributed systems and hopefully try and bring more academicians and engineers from industry to talk about the theoretical principles and practical experience building reliable and consistent systems on top the entropy that usually comes with distributed systems.

Looking for

We are looking for all kinds of people who can help us get going with the group. Speakers, potential attendees, sponsors, volunteers etc .. So if you are interested in the idea, please shout out to us:

mgill25 / Advanced Bash Usage
Created May 7, 2017 — forked from projectivemotion/Advanced Bash Usage
Cheatsheet of advanced bash commands presented in Introduction to Advanced Bash Usage - James Pannacciulli. Youtube:
View Advanced Bash Usage
View types.markdown


A type is a collection of possible values. An integer can have values 0, 1, 2, 3, etc.; a boolean can have values true and false. We can imagine any type we like: for example, a HighFive type that allows the values "hi" or 5, but nothing else. It's not a string and it's not an integer; it's its own, separate type.

Statically typed languages constrain variables' types: the programming language might know, for example, that x is an Integer. In that case, the programmer isn't allowed to say x = true; that would be an invalid program. The compiler will refuse to compile it, so we can't even run it.

mgill25 / latency.txt
Created Jan 15, 2016 — forked from jboner/latency.txt
Latency Numbers Every Programmer Should Know
View latency.txt
Latency Comparison Numbers
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
mgill25 / The Technical Interview Cheat
Last active Sep 4, 2015 — forked from TSiege/The Technical Interview Cheat
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.
View The Technical Interview Cheat

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

###Array ####Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.
mgill25 / markov.rb
Created Nov 19, 2014
Markov generator finished
View markov.rb
# Text Analysis for the Markov chain
# class Object
# def method_missing( name, *args )
# puts "There is no method '##{name}' defined on #{self.class}, you dummy!"
# end
# end
def get_ngrams(n, corpus)
output_list = []
mgill25 / markov.rb
Created Nov 6, 2014
Playing around with Markov chains
View markov.rb
# Markov chain implementation in Ruby
# We take some text as input, apply the Markov chain algorithm to it,
# and produce some other text as output. Lets see how it is done!
# Markov chain means running an FSM with the states having unequal probability
# of transition.
# References:
# A Mathematical theory of Communication, by C.E. Shannon
#!/usr/bin/env python
# -*- coding: utf-8 -*-
StaQueue! A Queue created by using 2 stacks!
# the builtin `list` type in python has all the capabilities
# of a stack, so we use that instead of trying to re-created
# the stack itself as well.
You can’t perform that action at this time.