Skip to content

Instantly share code, notes, and snippets.

View madhawav's full-sized avatar
🎯
Focusing

Madhawa Vidanapathirana madhawav

🎯
Focusing
View GitHub Profile
@madhawav
madhawav / CashJoin.sol
Created January 21, 2019 02:10
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.4.16+commit.d7661dd9.js&optimize=false&gist=
pragma solidity ^0.4.16;
contract CashJoin{
address master = msg.sender;
address opponent = 0;
bool _init = false;
uint reward;
bool _completed = false;
@madhawav
madhawav / CashJoin.sol
Created January 20, 2019 16:29
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.4.16+commit.d7661dd9.js&optimize=false&gist=
pragma solidity ^0.4.16;
contract CashJoin{
address master = msg.sender;
address opponent = 0;
bool _init = false;
uint reward;
bool _completed = false;
@madhawav
madhawav / Hello_World.sol
Created January 20, 2019 13:04
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.4.16+commit.d7661dd9.js&optimize=false&gist=
pragma solidity ^0.4.16;
contract HelloWorld {
uint256 counter = 5;
address owner = msg.sender; //set owner as msg.sender
function add() public {
counter++;
}
# Code adapted from Tensorflow Object Detection Framework
# https://github.com/tensorflow/models/blob/master/research/object_detection/object_detection_tutorial.ipynb
# Tensorflow Object Detection Detector
import numpy as np
import tensorflow as tf
import cv2
import time
import cv2
import time
hog = cv2.HOGDescriptor()
hog.setSVMDetector(cv2.HOGDescriptor_getDefaultPeopleDetector())
cap = cv2.VideoCapture("/path/to/test/video")
while True:
r, frame = cap.read()
if r:
start_time = time.time()
import cv2
import time
person_cascade = cv2.CascadeClassifier(
os.path.join('/path/to/haarcascade_fullbody.xml'))
cap = cv2.VideoCapture("/path/to/test/video")
while True:
r, frame = cap.read()
if r:
start_time = time.time()
@madhawav
madhawav / PySiddhi.GSOC.md
Last active August 24, 2017 07:02
Python API for Siddhi CEP