Skip to content

Instantly share code, notes, and snippets.

View melvincabatuan's full-sized avatar
💭
deep learning

Melvin Cabatuan melvincabatuan

💭
deep learning
View GitHub Profile
@melvincabatuan
melvincabatuan / opencv4_2install.txt
Last active March 4, 2020 23:25
conda install -c conda-forge opencv
(latest) C:\WINDOWS\system32>conda install -c conda-forge opencv
Collecting package metadata (current_repodata.json): done
Solving environment: done
## Package Plan ##
environment location: C:\Program Files\Anaconda3\envs\latest
added / updated specs:
- opencv
#include <iostream>
const int MAX = 12;
void swap(int arr[], int i, int j){
int temp = arr[i];
arr[i] = arr[j];
arr[j] = temp;
}
#include <stdio.h>
#include <math.h>
int find(int data[], int length, int key) {
int location = -1; // initialize to not found
int begin = 0; // beginning of the index
int end = length - 1; // end of the index
int mid = 0;
int count = 0;
@melvincabatuan
melvincabatuan / MergesortDemo.cpp
Last active November 7, 2019 04:04
Mergesort Demo
#include <iostream>
const int SIZE = 8;
void display(int arr[]){
std::cout << std::endl;
for (int i = 0; i < SIZE; ++i)
std::cout << arr[i] << " ";
}
@melvincabatuan
melvincabatuan / BasicQuicksortDemo.cpp
Last active November 7, 2019 02:15
Basic Quicksort Demo
#include <iostream>
const int SIZE = 8;
void display(int arr[]){
std::cout << std::endl;
for (int i = 0; i < SIZE; ++i)
std::cout << arr[i] << " ";
}
@melvincabatuan
melvincabatuan / Main.java
Last active November 3, 2019 20:47
simple infix2postfix conversion
import java.io.*;
import java.util.*;
public class Main
{
static String infix2postfix(String input)
{
$ python mnist_mlp.py
60000 train samples
10000 test samples
2019-10-30 15:59:27.542886: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcuda.so.1
2019-10-30 15:59:27.870733: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1618] Found device 0 with properties:
name: Tesla K80 major: 3 minor: 7 memoryClockRate(GHz): 0.8235
pciBusID: 0000:06:00.0
2019-10-30 15:59:27.873027: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1618] Found device 1 with properties:
name: Tesla K80 major: 3 minor: 7 memoryClockRate(GHz): 0.8235
pciBusID: 0000:07:00.0
#include <iostream>
#include <limits>
using namespace std;
void display(int arr[], int length, int pass);
void selectionSort(int arr[], int length){
int i, j, min, minat;
for(i = 0; i < (length-1); i++)
#include <iostream>
#include <limits>
using namespace std;
void display(int arr[], int length, int pass);
void selectionSort(int arr[], int length){
int i, j, min, minat;
for(i = 0; i < (length-1); i++)
#include <iostream>
using namespace std;
//============================================//
// Tree Structure
//============================================//
struct node
{
int data; // data