Skip to content

Instantly share code, notes, and snippets.

View pnedunuri's full-sized avatar

Pruthvi Nadunooru pnedunuri

View GitHub Profile

sudo yum update

##Install Redis https://gist.github.com/dstroot/2776679

wget https://raw.github.com/gist/2776679/04ca3bbb9f085b192f6aca945120fe12d59f15f9/install-redis.sh
chmod 777 install-redis.sh
./install-redis.sh

from collections import deque
class hashabledict(dict):
def __hash__(self):
return hash(tuple(sorted(self.items())))
def dictFromChar2D(c2d=[], filtr=lambda _:True):
return {
(x,y):c
for y,c1d in zip(range(len(c2d)),c2d)