Skip to content

Instantly share code, notes, and snippets.

View dhavalpotdar's full-sized avatar

Dhaval Potdar dhavalpotdar

  • Duke University
  • Durham, NC, USA
View GitHub Profile
@dhavalpotdar
dhavalpotdar / sine_plot.py
Last active March 17, 2021 10:30
Draw as sine plot in Python.
import numpy as np
import matplotlib.pyplot as plt
x = np.arange(0, 2*np.pi, 2*np.pi/100)
sinx = np.sin(x)
plt.plot(x, sinx);
@dhavalpotdar
dhavalpotdar / sine_plot.R
Last active March 17, 2021 10:30
Draw a sine plot in R.
x <- seq(0, 2 * pi, length = 100)
sinx <- sin(x)
plot(x, sinx, type = "l")
@dhavalpotdar
dhavalpotdar / object_map_generation.py
Last active August 23, 2021 12:19
Code to use Google Vision API to create a text object map from Structured Documents
import os
import cv2
from itertools import chain
import base64
import pandas as pd
import requests
import json
def ocr_using_google_api(image_path, request_url):
'''