Skip to content

Instantly share code, notes, and snippets.

@nikhilweee
nikhilweee / statement-to-excel.py
Last active Oct 19, 2021
Convert HDFC Bank Credit Card statements from PDF to Excel
View statement-to-excel.py
# This script is designed to convert bank statements from pdf to excel.
#
# It has been tweaked on HDFC Bank Credit Card statements,
# but in theory you can use it on any PDF document.
#
# The script depends on camelot-py,
# which can be installed using pip
#
# pip install "camelot-py[cv]"
@nikhilweee
nikhilweee / module-batch.py
Last active Jul 2, 2019
Getting started with LSTMs in PyTorch
View module-batch.py
import random
import torch
num_examples = 128
message_length = 32
def dataset(num_examples):
"""Returns a list of 'num_examples' pairs of the form (encrypted, original).
@nikhilweee
nikhilweee / wtc.sh
Last active Nov 16, 2016
random-commit-messages
View wtc.sh
#! /bin/bash
# You can run this script directly from the terminal
# curl -s https://gist.githubusercontent.com/nikhilweee/75ea15afabdfbb18cda625364a9bf9f9/raw/ > /tmp/wtc.sh ; source /tmp/wtc.sh
# Just use `gitcommit` instead of `git commit -m` to get random commit messages from whatthecommit.com
# start
# checking for conflicts
unalias gitcommit
unalias commitmessage
@nikhilweee
nikhilweee / README.md
Last active Nov 20, 2021
Get vehicle info from an Indian registration number
View README.md

Programmatically extract owner info from Indian registration numbers

Usage

$ python owner.py MH02CL 0555
Registration No:
MH02CL0555
Registration Date:
View Backend-Winters.md

Winter Mania : Mastering Django during winters

To make you able to handle the immense power you are about to hold, you are expected to complete these tasks during the winters

1. The Django Polls tutorial

The Polls Tutorial gives an excellent overview of what Django is, and how stuff works. Complete these parts of the Polls Tutorial from DjangoProject.com

  • Part 1 : Requests and Responses - The basic workflow of a request in Django
  • Part 2 : Models and the admin site - Design and relationships of database tables