Skip to content

Instantly share code, notes, and snippets.

View PyPatel's full-sized avatar
😎
Self taught programmer.

Harsh Patel PyPatel

😎
Self taught programmer.
View GitHub Profile
######################################
# INSTALL OPENCV ON UBUNTU OR DEBIAN #
######################################
# | THIS SCRIPT IS TESTED CORRECTLY ON |
# |------------------------------------------------------|
# | OS | OpenCV | Test | Last test |
# |------------------|--------------|------|-------------|
# | Ubuntu 18.04 LTS | OpenCV 3.4.2 | OK | 18 Jul 2018 |
# | Debian 9.5 | OpenCV 3.4.2 | OK | 18 Jul 2018 |
@PyPatel
PyPatel / simple_mlp_tensorflow.py
Created August 6, 2018 20:20 — forked from vinhkhuc/simple_mlp_tensorflow.py
Simple Feedforward Neural Network using TensorFlow
# Implementation of a simple MLP network with one hidden layer. Tested on the iris data set.
# Requires: numpy, sklearn>=0.18.1, tensorflow>=1.0
# NOTE: In order to make the code simple, we rewrite x * W_1 + b_1 = x' * W_1'
# where x' = [x | 1] and W_1' is the matrix W_1 appended with a new row with elements b_1's.
# Similarly, for h * W_2 + b_2
import tensorflow as tf
import numpy as np
from sklearn import datasets
from sklearn.model_selection import train_test_split
@PyPatel
PyPatel / Docker_for_Ubuntu14.sh
Last active August 6, 2018 08:12
docker installation on Ubuntu 14.04 LS
#!/bin/bash
#Installation Instructions for Ubuntu
#The simplest way to get docker, other than using the pre-built application image, is to go with a 64-bit Ubuntu 14.04 VPS
#Update your droplet:
sudo apt-get update
sudo apt-get -y upgrade
#Make sure aufs support is available:
import os
import numpy as np
from scipy.misc import imread, imresize
import hickle as hkl
import numpy as np
from kitti_settings import *
#Optput image size
desired_im_sz = (128, 160)
@PyPatel
PyPatel / whatsapp_phone_enumerator_floated_div.js
Created May 13, 2017 18:40
PoC WhatsApp enumeration of phonenumbers, profile pics, about texts and online statuses (floated div)
/*
PoC WhatsApp enumeration of phonenumbers, profile pics, about texts and online statuses
Floated div edition
01-05-2017
(c) 2017 - Loran Kloeze - loran@ralon.nl
This script creates a UI on top of the WhatsApp Web interface. It enumerates certain kinds
of information from a range of phonenumbers. It doesn't matter if these numbers are part
of your contact list. At the end a table is displayed containing phonenumbers, profile pics,
about texts and online statuses. The online statuses are being updated every
@PyPatel
PyPatel / merkle_tree_hashing_algo.py
Created May 5, 2017 14:34
Merkle Tree Hashing Algorithm in Python
"""
This is implementation of Markle Tree Hashing Algorithm
"""
import hashlib
class MerkelTreeHash(object):
def __init__(self):
pass