Skip to content

Instantly share code, notes, and snippets.


Saikat Kumar Dey saikatkumardey

View GitHub Profile
# delete all Evicted pods
kubectl get pods | grep Evicted | awk '{print $1}' | xargs kubectl delete pod
saikatkumardey /
Last active Aug 29, 2015
public class CountOcc {
private static int search(int array[], int low, int high, int value) {
if (low <= high) {
int mid = low + (high - low) / 2;
if (array[mid] == value) {
return mid;
View double_cola
#!/usr/bin/env python
import math
n = input()
ans=["","Sheldon", "Leonard", "Penny", "Rajesh", "Howard"]
i= int(math.log(math.ceil(n*1.0/5),2))
saikatkumardey / bit-masking.cpp
Last active Aug 29, 2015
Generate all possible sub-set sum
View bit-masking.cpp
#include <iostream>
using namespace std;
//Given an array, generate all possible sum
int main(void)
int array[]= {1,2,3};
saikatkumardey / kmp.cpp
Created Dec 27, 2014
KMP- String search
View kmp.cpp
#include <iostream>
#include <vector>
#define print_vector(vec) for(int i=0;i<vec.size();i++) { cout<<vec[i]<<" ";} cout<<endl;
using namespace std;
pattern = abacab
View Respect Rollcall.html
<!-- Respect Rollcall -->
<li><a href="">A List Apart &#8212; for website builders</a></li>
<li><a href="">Abstruse Goose &#8212; my favorite comic</a></li>
<li><a href="">Alex Payne &#8212; technology rambling</a></li>
<li><a href="">Anil Dash &#8212; on culture, apple &amp; design</a></li>
<li><a href="">Asa Dotzler &#8212; on mozilla &amp; software</a></li>
<li><a href="">Aza Raskin &#8211; on design &amp; firefox</a></li>
<li><a href="">Christoph Zillgens &#8212; interface design</a></li>
<li><a href="">CSS Remix &#8212; gorgeous designs</a></li>
<li><a href="">CSS Tricks</a></li>
View BITMAP.cpp
#include <iostream>
#include <cstdio>
#include <vector>
#include <cmath>
#include <queue>
#include <vector>
#define INF 10000
using namespace std;
View pdf_spidey
import urllib2
import sys
import os
from subprocess import call
url = sys.argv[1]
k= urllib2.urlopen(url).readlines()
file_name= "random_file.txt"
op= open(file_name,'w')
saikatkumardey / numdigit
Created Sep 9, 2014
Find number of digits of 100!
View numdigit
import math
print len(str(math.factorial(100)))