Skip to content

Instantly share code, notes, and snippets.

View debanjum's full-sized avatar

Debanjum debanjum

View GitHub Profile
@debanjum
debanjum / Quote
Created March 5, 2014 06:23
Extracts Quotes from GoodReads. Stores text file in Variety compatible format
#!/bin/sh
# Initialising Variables [Enter You Use Name in place of USER]
quotesdir='/home/USER/.config/variety/pluginconfig/quotes/quotes.txt'
# New Quotes: Clean Earlier Quotes
[[ $# -eq 1 && $1 == 'New' ]] && ( `mv -f "$quotesdir" /tmp/quotes_old.txt` )
# Restore Earlier Quotes
[[ $# -eq 1 && $1 == 'Restore' ]] && ( `mv -f /tmp/quotes_old.txt "$quotesdir"` )
# Quote Help
@debanjum
debanjum / DialogSeek
Last active February 3, 2016 00:56
Opens movie at position at which searched dialog occurs
#!/bin/bash
#**************************************************************************#
# Dialog Seek.sh #
# by #
# Debanjum Singh Solanky #
# #
# Copyright (C) 2016 Debanjum Singh Solanky #
# #
# This program is free software: you can redistribute it and/or modify #
@debanjum
debanjum / Game of Life
Created March 20, 2014 04:37
Cellular Automata using OpenCV
// CA Game Of Life.cpp : Defines the entry point for the console application.
/*
Game Of Life
Conditions:
.Alive:3 Moore Neighbours OR 2 Moore Neighbours and Previously Alive
.Dead: If Not Alive
Kernel:
.3*3 Matrix
@debanjum
debanjum / Avalanche
Created March 20, 2014 04:47
Code for a Robotics + Computer Vision Competition using OpenCV and C++
/* FINAL CODE FORMAT
This code was written for a Computer Vision Competition using OpenCV and Visual Studio C++ about 4 years back.
The purpose was to catch specific coloured balls rolling down a slope at the bottom of which are bot lay.
Our thresholding functions didn't generalise to new environments very well.
*/
#include "stdafx.h"
#include <cv.h>
#include <highgui.h>
@debanjum
debanjum / Trackbar_ThreshMorph
Created March 20, 2014 04:55
Thresholding, Morphological Operations using Trackbars
// Trackbar Thresholding & Morphological Operations
// Set lower, upper H,S,V Threshold Values such that ROI in white in each of the 6 cases.
// Perform Mophological Operation on Thresholded Image(Removes Noise)
// Hence Final Image Obtained With Given HSV Values, for given environmental conditions.
#include "stdafx.h"
#include "cv.h"
#include "highgui.h"
@debanjum
debanjum / Pump.sh
Last active August 29, 2015 14:14 — forked from dirkk0/doit.sh
Install Pump.io on local or server ubuntu
#!/bin/bash
# Initialise system
sudo apt-get update
# Retrieving local or external IP, Hostname
# if single argument
[ $# -eq 1 ] && (
# and argument = server
[[ "$1" == "server" ]] && (
@debanjum
debanjum / SubReddit_Importer.py
Last active October 26, 2017 04:14
Import All Subreddit Posts into your Local Folder
#!/usr/bin/env python3
'''
#**************************************************************************#
# SubReddit_Importer.py #
# by #
# Debanjum Singh Solanky #
# #
# Copyright (C) 2016-2017 Debanjum Singh Solanky #
# #
# This program is free software: you can redistribute it and/or modify #