Skip to content

Instantly share code, notes, and snippets.

munching code

Jatin K Malik jatinkrmalik

munching code
Block or report user

Report or block jatinkrmalik

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
jatinkrmalik /
Created Aug 13, 2018
Redshift and Mysql from a single DB class in python
import psycopg2
import pymysql
class Database(object):
def __init__(self, host_name, user_name, database_name, password, port):
self.host_name = host_name
self.user_name = user_name
self.database_name = database_name
self.password = password
jatinkrmalik /
Created Nov 8, 2017 — forked from PurpleBooth/
A template to make good

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.


jatinkrmalik /
Last active Oct 17, 2017
Pretty print python3 dictionary
import json
def prettyPrint(dct):
print(json.dumps(dct, indent=4, sort_keys=True))
if __name__ == "__main__":
sample = {'name':'Jatin K Malik', 'age':25, 'id':1299, 'address':'Delhi, India', 'phone':9999999999, 'hobbies':'Code'}
jatinkrmalik /
Last active Oct 10, 2017
Implementing RazorPay client in Python3
# Razorpay docs:
import razorpay # pip3 install razorpay
api_key = '<enter your api key here>'
api_secret = '<enter your api secret here>'
class RazorPay:
jatinkrmalik /
Last active Oct 6, 2017
Face detection using DLIB and OpenCV3
# !/usr/bin/python
import time
from modules.faceOnboarding import service
from flask import Response
from modules.faceOnboarding import app
import tempfile'/video_feed')
# Testing python-omxplayer-wrapper from
from omxplayer import OMXPlayer as op
from time import sleep
file_path = '../audio/Baby.mkv'
player = op(file_path)
jatinkrmalik /
Last active Jun 2, 2017
Stone | Paper | Scissors
# Stone Paper Scissors
import random
import os
def cls(): # to clear the screen
os.system('cls' if == 'nt' else 'clear')
jatinkrmalik /
Created Mar 22, 2017
Download all XKCD comics with their original names
#!/usr/bin/env python3
import requests,sys,re
from bs4 import BeautifulSoup
import time
from datetime import datetime
from urllib.request import urlopen
now = time.time()
import string
jatinkrmalik / identifyCreditCardType.js
Created Mar 22, 2017
Code snippet to identify the credit card type from it's number
View identifyCreditCardType.js
function GetCardType(number)
// visa
var re = new RegExp("^4");
if (number.match(re) != null)
return "Visa";
// Mastercard
re = new RegExp("^5[1-5]");
if (number.match(re) != null)
jatinkrmalik / hackEVMs.cpp
Last active Mar 16, 2017
How EVMs were hacking in recent Legislative Assembly Elections 2017 in India! :P
View hackEVMs.cpp
Program: Hacking all EVMs enabling BJP to win.
Description: Well, Dev Jha asked for it. ¯\_(ツ)_/¯
Author: Jatin K Malik
Date: 16-03-2017 06:11:17 PM
#include < iostream >
using namespace std;
You can’t perform that action at this time.