Skip to content

Instantly share code, notes, and snippets.

View varundey's full-sized avatar
🧼
Keep bugs and virus away

Varun Dey varundey

🧼
Keep bugs and virus away
View GitHub Profile
@varundey
varundey / goodreads-review-collector.py
Created April 6, 2020 13:00
Get reviews from goodreads and export as an excel file
import json
import os
import pandas
import requests
from string import Template
GOODREADS_API_KEY = ""
EBOOKS_DIRECTORY = "/Users/varun.dey/Documents/Kindle"
RATINGS_JSON_FILE = "ratings.json"
RATINGS_EXCEL_FILE = "ratings.xlsx"
#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
void solve()
{
string s;
@varundey
varundey / .gitignore
Last active March 13, 2017 17:14 — forked from octocat/.gitignore
Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
@varundey
varundey / fibonacci.py
Created March 10, 2017 07:37
Python program to print the nth fibonacci number
def memoize(f):
memo = {}
def helper(x):
if x not in memo:
memo[x] = f(x)
return memo[x]
return helper
@memoize
def fib(n):
@varundey
varundey / about.md
Last active November 29, 2016 19:55
About me for PyCon Pune talk
  • Winter intern 2017 at Symantec Chennai
  • Backend Software Developer with significant Python experience as main stack
  • Loves automating things for the lazy developers humans
  • Built Google PageSpeed Insights Extension which gets humble thousand downloads per month
  • Built Semantic Search Engine on Wikipedia from the open source dumps provided by DBPedia
  • Developed a better implementation of DuckDuckGo's Zero Click Info Goodies cheatsheet which is much more extensible and doesn't break on simple queries
  • You can find all my online footprints and portfolio at my website
  • Find my open source projects on Github or find me on Linkedin

Keybase proof

I hereby claim:

  • I am varundey on github.
  • I am varundey (https://keybase.io/varundey) on keybase.
  • I have a public key ASCiQHGqH8_r9Qp8Om48zYLFjVeCYyhQRcO3i4o5WDj7ogo

To claim this, I am signing this object:

@varundey
varundey / squdrun.py
Created November 5, 2016 16:23
Arranges list in negatives and positives and creates alternate of those numbers
a = map(int, raw_input().split())
def rearrange(li):
val = len(li)-1
for i in range(len(li)):
if li[i]>0 and i<mid:
while True:
if li[val]<0:
li[i], li[val] = li[val], li[i]
break
n=input()
arr=[]
while n!=0:
n-=1
arr.append(input())
m=input()
while m!=0:
m-=1
arr.append(input())
for i in sorted(arr):
@varundey
varundey / app.py
Created July 8, 2016 21:03 — forked from rosner/app.py
Simple flask app with user login, registration based on twitters bootstrap
from flask import Flask, render_template
from flask.ext.security import SQLAlchemyUserDatastore, Security
from flask.ext.sqlalchemy import SQLAlchemy
from flask.ext.bootstrap import Bootstrap
from flask_mail import Mail
from flask.ext.security import UserMixin, RoleMixin
app = Flask(__name__)
#include <stdio.h>
#include <math.h>
void val(long long int k, long long int coeff[], long long int deg){
long long int ans=0,p;
for(int i=0;i<=deg;i++){
double ow = pow(k,i);
p = (int)ow;
ans+=coeff[i]*p;
printf("%lld",ans);