Skip to content

Instantly share code, notes, and snippets.

/* Hash Table Implementations */
public class HashMap implements IMap {
private ListNode[] htbl;
private int size;
public HashMap() {
htbl = new ListNode[11];
for (int i = 0; i < htbl.length; ++i)
htbl[i] = new ListNode();
size = 0;
@venkatavamsy
venkatavamsy / Python_OpenCV_video_read.py
Last active March 22, 2017 07:28
Python OpenCV video read
import numpy as np
import cv2
cap = cv2.VideoCapture(0)
while(True):
ret, frame = cap.read()
gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
cv2.imshow('frame',gray)
@venkatavamsy
venkatavamsy / Python_Image_OpenCV_line.py
Created March 22, 2017 07:46
Python Image OpenCV line
import cv2
import numpy as np
from matplotlib import pyplot as plt
img = cv2.imread('images.jpg',cv2.IMREAD_GRAYSCALE)
plt.imshow(img, cmap = 'gray', interpolation = 'bicubic')
plt.xticks([]), plt.yticks([]) # to hide tick values on X and Y axis
plt.plot([200,300,400],[100,200,300],'c', linewidth=5)
plt.show()
@venkatavamsy
venkatavamsy / dabblet.css
Last active December 27, 2017 04:20
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
background: #960;
min-height: 10%;
from pyelasticsearch import ElasticSearch
import pandas as pd
from time import time
root_path="<Root Path>"
raw_data_path=root_path+"data/"
csv_filename="predicted_data.csv"
t0=time()
Summary
Overall risk level:
High
Risk ratings:
High:
1
Medium:
2
Low:
2
@venkatavamsy
venkatavamsy / .gitignore
Created September 29, 2018 19:18 — forked from octocat/.gitignore
Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
#include <iostream>
#include <cstdio>
#include <string>
#include <vector>
#include <fstream>
#include <boost/lexical_cast.hpp>
using namespace std;
using namespace boost;
using namespace std;
using namespace boost;
enum class Color {red,green,blue};
enum class Size {large,medium, small};
struct Product{
import json
import requests
with open("saijson.json", "r") as file:
json_data = json.loads(file)
json_s_data = json_data['result']
output_json = []
tmp_json = []