Skip to content

Instantly share code, notes, and snippets.

View shashankgroovy's full-sized avatar
🏁
Godspeed

Shashank Srivastav shashankgroovy

🏁
Godspeed
View GitHub Profile
@shashankgroovy
shashankgroovy / analytics-models.md
Created August 27, 2019 10:17
Case study for analytics models

Case study

Let’s say you have been tasked to create a new feature, and you have to create a new schema, since the current ones don’t suffice the needs. In that case, below we list down the steps to achieve the same and also talk a bit about data modelling.

Creating a schema:

Creating a new schema is all about data modelling. So, make sure you study

@shashankgroovy
shashankgroovy / trees.py
Created July 29, 2016 05:46 — forked from prakhar1989/trees.py
Fun with binary trees
#!/usr/bin/python
import unittest
## binary tree problems
### A NODE OBJECT
class Node(object):
def __init__(self, data):
self.data = data
self.left = None
@shashankgroovy
shashankgroovy / graphs.py
Created July 29, 2016 05:46 — forked from prakhar1989/graphs.py
Simple Graph Algos
from collections import deque
from sys import maxint as MAXINT
# Breadth first search
def bfs(graph, start):
explored, queue = set([start]), deque([start])
while len(queue):
vertex = queue.popleft()
yield vertex
for neighbor in graph[vertex]:
@shashankgroovy
shashankgroovy / gist:a8f8394b890753a0e678971eeb9282a6
Created July 27, 2016 09:30 — forked from debasishg/gist:8172796
A collection of links for streaming algorithms and data structures
  1. General Background and Overview
#!/bin/bash
# Description:
# EC2 setup.
# Based on Ubuntu, debian based systems
# Execution:
# First a lot the correct file permissions for the setup file:
# $ chmod 755 setup.sh
@shashankgroovy
shashankgroovy / nginx-setup.sh
Last active February 12, 2016 12:50
Script to automatically create all nginx configurations
#!/bin/bash
# Description:
# Nginx configurations
# Execution:
# First a lot the correct file permissions for the setup file:
# $ chmod 755 setup.sh
# And then simply run

Programming Achievements: How to Level Up as a Developer

  1. Select a particular experience to pursue.
  2. Pursue that experience to completion. (Achievement unlocked!)
  3. Reflect on that experience. Really soak it in. Maybe a blog post would be in order?
  4. Return to Step 1, this time selecting a new experience.

This gist is a fork of the gist from this blog post.

<a href="" class="button_holder">
<span class="f1">
<span class="f2">
<span class="f3">
<img src="http://picbox.im/image/7f1b604490-off.png">
</span>
</span>
</span>
</a>
@shashankgroovy
shashankgroovy / gist:1461906
Created December 11, 2011 18:18 — forked from jamescasbon/template.py
Pure python templates using with statement
"""
A really stupid python template language inspired by coffeekup, markaby.
Do not use this code, it will ruin your day. A byproduct of insomnia.
TL;DR
-----
This module defines a template language that allows us to do:
d = Doc()