Skip to content

Instantly share code, notes, and snippets.

Avatar

Aniruddha Adhikary (Ani) aniruddha-adhikary

View GitHub Profile
View unified-jwks.js
const axios = require("axios");
exports.handler = async (event) => {
const jwksUrls = [
'https://foo.au.auth0.com/.well-known/jwks.json',
'https://bar.au.auth0.com/.well-known/jwks.json',
'https://baz.au.auth0.com/.well-known/jwks.json',
];
const responses = await Promise.all(jwksUrls.map((url) => axios.get(url)));
@aniruddha-adhikary
aniruddha-adhikary / bd_election_2008.csv
Created Dec 29, 2018
Election Turnover in 2008 Bangladesh Parliament Elections
View bd_election_2008.csv
district voterTurnout
0 Bagerhat 78.7725
1 Bandarban 58.16
2 Barguna 64.92
3 Barisal 65.51714285714284
4 Bhola 56.775000000000006
5 Bogra 80.89857142857143
6 Brahmanbaria 71.33166666666666
7 Chandpur 65.06500000000001
8 Chittagong 70.97533333333334
@aniruddha-adhikary
aniruddha-adhikary / eid-mubarak.py
Last active Jun 25, 2017 — forked from hasinhayder/eid-mubarak.go
Say eid mubarak in different ways :D
View eid-mubarak.py
import random
letters = (("ই", "ঈ"), ("দ",), (" ",), ("মো", "মু"), ("বা",), ("র", "রা", "রো"), ("ক",))
greetings = "".join([letter_group[random.randrange(len(letter_group))] for letter_group in letters])
print(greetings)
View apk_download.py
import requests
from BeautifulSoup import BeautifulSoup as BS
import re
def get_dl_page(package_id):
get_request = requests.get('https://apkpure.com/search?q=' + package_id)
page = BS(get_request.text)
# it is assumed that the first search result is the thing we are looking for
link_ps = page.findAll('p', {'class': 'search-title'})
page_link = link_ps[0].a.get('href')
View base_n_to_decimal.py
def base_n_to_decimal(number, base, \
symbolarray = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F']):
if(base > len(symbolarray)):
raise ValueError
result = 0
number = str(number)
for i in range(0, len(number)):
View decimal_to_base_n.py
def decimal_to_base_n(number, base, \
symbolarray = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F']):
if(base > len(symbolarray)):
raise ValueError
result = ''
number = int(number)
i = 0
@aniruddha-adhikary
aniruddha-adhikary / my_cool_api.py
Created Jul 6, 2015
mini api server in python and bottle
View my_cool_api.py
from bottle import run, route
import json
list_of_movies = ['The King of Pythons', "The Lord of the Horns"]
@route('/movies')
def get_movies():
return json.dumps(list_of_movies)
run(host='localhost', port=8080)
@aniruddha-adhikary
aniruddha-adhikary / 0001-telephony-add-mediatek-mt65x2-support.patch
Created May 26, 2015
mediatek mt65x2 dual SIM RIL support patch for frameworks/opt/telephony
View 0001-telephony-add-mediatek-mt65x2-support.patch
From fcb7e94b6c0adf7427326aa50e7f8a9267b1e5f6 Mon Sep 17 00:00:00 2001
From: Aniruddha Adhikary <aniruddha@adhikary.net>
Date: Tue, 26 May 2015 09:36:42 +0600
Subject: [PATCH 1/1] telephony: add mediatek mt65x2 support
Change-Id: I8866ca89bb933bc1e57e5316c8579cf7b23294cb
---
src/java/com/android/internal/telephony/RIL.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
@aniruddha-adhikary
aniruddha-adhikary / fb_image_downloader.py
Created Apr 5, 2015
Download all images from Facebook Profiles / Pages
View fb_image_downloader.py
#!/usr/bin/env python
import urllib2
import json
import os
from datetime import datetime
import re
params = {
@aniruddha-adhikary
aniruddha-adhikary / gist:e58fedf6501de01f93f8
Created Jul 17, 2014
Proxying callback server in Bottle.py
View gist:e58fedf6501de01f93f8
#!/usr/bin/env python
from bottle import request, run, route, template, static_file
@route('/box/auth')
def authorize_box():
code = request.query.code;
if(code):
return template("""