Skip to content

Instantly share code, notes, and snippets.

View abhamra's full-sized avatar

Arjun Bhamra abhamra

View GitHub Profile
import cv2
import math
video_capture = cv2.VideoCapture(0)
ret, frame = video_capture.read()
prev_frame = frame
# Accessing BGR pixel values
count = 0
threshold = 60
import processing.video.*;
Capture video;
int x, y;
color cc;
color trackedColor;
int size = 1;
int threshold_val = 30;
boolean drawing = false;
import gab.opencv.*;
import processing.video.*;
import java.awt.*;
Capture video;
OpenCV opencv;
PImage drake;
void setup() {
size(640, 480);
import processing.video.*;
Capture video;
int x, y;
color cc;
color trackedColor;
int size = 1;
int threshold_val = 40;
//int[] colors[][];
#!/usr/bin/env python3
import os
import base64
import requests
import json
#
# Common module for calling Mathpix OCR service from Python.
#
#test.py (drawing)
from PIL import ImageTk, Image, ImageDraw
import PIL
from tkinter import *
#simple.py (parsing)
import mathpix
import json
#sympytest.py (plot)
import sympy as sp
import java.util.ArrayList;
public class Graphs {
int numArrays;
static ArrayList[] arr;
String bestPath = "";
int lengthPath = 0;
static int min = Integer.MAX_VALUE;
static ArrayList<ArrayList<Integer>> paths = new ArrayList<ArrayList<Integer>>();
static ArrayList<Integer> tempFirst = new ArrayList<Integer>();
public static void findShortest(ArrayList<Integer> arr, int source, int destination, int size, int count) {
ArrayList<Integer> temp = arr;
for(int i = 0;i<temp.size();i++) {
if(temp.get(i)==source) {
return;
} else {//end if
temp.add(source);
}
}//end for
import java.util.ArrayList;
public class Graphs {
int numArrays;
static ArrayList[] arr;
//constructor
public Graphs(int numArrays) {
this.numArrays = numArrays;
arr = new ArrayList[numArrays];
import java.util.ArrayList;
import java.util.*;
import java.util.HashMap;
import java.util.Map.*;
import java.util.LinkedList;
import java.util.PriorityQueue;
import java.util.Queue;
public class HuffmanAlgorithm {
static String q = "aaaaabbbbbbbbbccccccccccccdddddddddddddeeeeeeeeeeeeeeeeffffffffffffffffffffffffffffffffffffffffffffff";