Skip to content

Instantly share code, notes, and snippets.

View sengupta's full-sized avatar

Aditya Sengupta sengupta

View GitHub Profile
@sengupta
sengupta / eligible_vaccine_slots.py
Last active May 1, 2021 08:32
Vaccine slots available for people below 45
import sys
import json
import requests
from datetime import datetime
current_date = datetime.today().strftime("%d-%m-%y")
district_id = 294 # This is Bangalore / BBMP
if len(sys.argv) > 1:
district_id = int(sys.argv[1])
@sengupta
sengupta / service-checklist.md
Created February 12, 2018 19:38 — forked from acolyer/service-checklist.md
Internet Scale Services Checklist

Internet Scale Services Checklist

A checklist for designing and developing internet scale services, inspired by James Hamilton's 2007 paper "On Desgining and Deploying Internet-Scale Services."

Basic tenets

  • Does the design expect failures to happen regularly and handle them gracefully?
  • Have we kept things as simple as possible?
@sengupta
sengupta / gateway_routing_logic_samples
Created March 31, 2016 07:47 — forked from ramanathanrv/gateway_routing_logic_samples
Routing Logic for choosing the best gateway to handle your transaction
// WARNING: This code is a sample to test your logic of gateway priority. This is NOT to be used as such.
def order = [order_id: "ord_id", amount: 1000.00, udf1:"web", udf2: "desktop", gateway_id: 2]
def txn = [txn_id: "txn_id", express_checkout: true, add_to_locker: false ]
def payment = [card_isin: "524368", card_issuer: "HDFC Bank", card_type: "CREDIT"]
def setGatewayPriority = { gateways ->
println "priority: " + gateways;
}
<html>
<head>
<title>FaS Reader</title>
<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
<script src="http://code.jquery.com/jquery-migrate-1.2.1.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
// Fast as Sanic Reader
var left = $('<span />').attr('id', 'left'),
@sengupta
sengupta / LICENSE.txt
Last active December 17, 2022 03:34
Sample Webhook Receiver to test Instamojo's (or any web service's) webhook feature.
Copyright (c) 2014, Instamojo, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
@sengupta
sengupta / whois.txt
Created April 15, 2013 11:06
WHOIS flipkartpayments.com
Whois Server Version 2.0
Domain names in the .com and .net domains can now be registered
with many different competing registrars. Go to http://www.internic.net
for detailed information.
Domain Name: FLIPKARTPAYMENTS.COM
Registrar: GODADDY.COM, LLC
Whois Server: whois.godaddy.com
Referral URL: http://registrar.godaddy.com
@sengupta
sengupta / instamojo.txt
Created May 16, 2012 05:26
Free Outdoor Portrait Photo Session
I'm offering free portrait photo sessions to early users of Instamojo.
**Location and date: Any Instamojo meetup.**
You can check my previous work here:
* [Priyanka and Hemant's Wedding](http://www.behance.net/gallery/Priyanka-and-Hemant/1042103)
* [Baljot Singh Ranu's Portraits](http://www.flickr.com/photos/harshadsharma/4163418112/lightbox/)
![Ashwin Sid's Outdoor Portrait](https://m.ak.fbcdn.net/a6.sphotos.ak/hphotos-ak-ash4/s720x720/403734_286812261379910_100001534150918_792136_1219416599_n.jpg)
@sengupta
sengupta / lighting_talk.rst
Created April 5, 2012 19:45 — forked from GaelVaroquaux/lighting_talk.rst
Bootstrapping a SciPy-related community project

Bootstrapping a SciPy-related community project

This document is a lightning talk: it only gives pointers, you need to Google and read references

Goal

@sengupta
sengupta / README.md
Created March 9, 2012 14:50
Reliance Netconnect Plus Prepaid Balance Checker

Reliance Netconnect Plus Prepaid Balance Checker

This is a small shell script that checks your Reliance Netconnect Prepaid account balance and emails it to a designated email address.

The Netconnect number and email address are to be saved in a file called .netconnectrc in your home directory with the following variables:

netconnect_number="1234567890"
email_addresses="comma separated list of email addresses"
@sengupta
sengupta / LICENSE.txt
Created January 16, 2012 18:46
Email Scraper
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. You just DO WHAT THE FUCK YOU WANT TO.