Skip to content

Instantly share code, notes, and snippets.

View ajaysjournal's full-sized avatar

Ajay Ramesh ajaysjournal

View GitHub Profile
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.xssf.streaming.SXSSFSheet;
import org.apache.poi.xssf.streaming.SXSSFWorkbook;
import org.apache.poi.xssf.usermodel.XSSFRow;
import org.apache.poi.xssf.usermodel.XSSFSheet;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import java.io.BufferedReader;
import java.io.FileOutputStream;
import java.io.FileReader;
@ajaysjournal
ajaysjournal / asynchronous_caching_video_stream.py
Created July 31, 2020 17:07 — forked from CasiaFan/asynchronous_caching_video_stream.py
Asynchronous caching and analysis of video stream with opencv and multithreading
import cv2
from redis import ConnectionPool, Redis
import numpy as np
import json, time
from threading import Thread, Event
redis_config = {"server": "localhost",
"passwd": '',
"port": '6379',
"db": 0}
@ajaysjournal
ajaysjournal / bck.20190809172052.navigator.settings.json
Last active October 30, 2019 23:25
Visual Studio Code Settings Sync Gist
{
"window.zoomLevel": 3,
"terminal.integrated.shell.windows": "C:\\Program Files\\Git\\bin\\bash.exe"
}
@ajaysjournal
ajaysjournal / 10.java
Created January 26, 2019 15:48
solid-blog
interface Robot {
// very common features, every client must implement are below.
void run();
void walk();
}
interface ShootingRobot extends Robot { void shoot(); }
interface SwimmingRobot extends Robot { void swim(); }
interface FightingRobot extends Robot { void fight(); }
@ajaysjournal
ajaysjournal / 9.java
Created January 26, 2019 15:47
solid-blog
public interface Robot {
void run();
void shoot();
void swim();
void fight();
void walk();
}
// company A wants to extend the Robot to add Speaking feature
@ajaysjournal
ajaysjournal / 8.java
Created January 26, 2019 15:46
solid-blog
public interface Everything { run() }
// similar to Object class(root class, it has most generalized methods) in Java
public class HumanoidRobot extends Everything {
public void run() {
// code to run using batteries.
}
}
public class Human extends Everything {
public void run() {
public interface Human {
publi void eat();
}
public class HumanoidRobot extends Human {
// Humanoid Robot - A humanoid is something that has an appearance
// resembling a human without actually being one.
// can robot eat ? No
@override
publi void eat() {
// do nothing
@ajaysjournal
ajaysjournal / 6.java
Created January 26, 2019 15:44
solid-designs
public interface Human {
publi void eat();
}
public class HumanoidRobot extends Human {
// can robot eat ?
}
Human obj1 = new Human()
Human obj2 = new HumanoidRobot()
@ajaysjournal
ajaysjournal / 5.java
Last active January 26, 2019 16:25
solid-blog
class MSWord2030 {
void display() { ... }
void feature1() { ... }
void feature2() { ... }
void feature3() { ... }
}
@ajaysjournal
ajaysjournal / 4.java
Last active January 26, 2019 16:22
solid-blog
interface doc_feature2 { void feature2(String content); }
class MSWord2030 extends MSWord2020 implements doc_feature2 {
public void feature2(String content) { ... }
}