Skip to content

Instantly share code, notes, and snippets.

View azmfaridee's full-sized avatar
🎯
Focusing

Abu-Zaher Faridee azmfaridee

🎯
Focusing
View GitHub Profile
#include <stdio.h>
#include <vector>
using namespace std;
int num_vertices;
// this vector is for the adjacency matrix
vector <vector <int> > adj_matrix;
#!/usr/bin/python
f = open('uniq.design')
design = {}
for x in f:
row = x.strip().split()
if len(row) < 2: continue
design[row[0]] = row[1]
f.close()
# print design
#include<stdio.h>
int cycle(int i){
int length = 1;
int n;
for(n = i ; n >= 1;){
if(n == 1){ break; }
if(n % 2 == 0){
def reverse(a):
b = 0
while a > 0:
b = b * 10 + (a % 10)
a /= 10
return b
def check(a, b):
while (a > 0) and (b > 0):
c = a % 10
// this implementation has an error in the calculation, find the error
class Point {
public float x, y;
public Point(float x, float y) {
this.x = x;
this.y = y;
}
#!/usr/bin/python
# f = open('uniq.design')
f = open('HumanCRC.design')
design = {}
for x in f:
row = x.strip().split()
if len(row) < 2: continue
design[row[0]] = row[1]
f.close()
@azmfaridee
azmfaridee / git-interactive-merge.sh
Created September 24, 2012 06:26 — forked from vgrichina/git-interactive-merge.sh
Interactive merge utility for Git, as described here http://www.angrylibertarian.com/node/53
#!/bin/bash
# git-interactive-merge
# Taken from: http://www.angrylibertarian.com/node/53
from=$1
to=$2
if [[ ( -z $from ) || ( -z $to ) ]]; then
echo "Usage:"
echo " git-interactive-merge <from-branch> <to-branch>"
exit 1
@azmfaridee
azmfaridee / edge-detect-demo.cpp
Created May 5, 2013 08:30
Proof of concept of detecting edge in a 2 bit bitmap image
#include <cstdlib>
#include <iostream>
using namespace std;
/*
*
*/
int main(int argc, char** argv) {
#include <cstdlib>
#include <iostream>
#include <vector>
#define NUM_TREES 5
using namespace std;
// base tree
class AbstractDecisionTree {
Starting main program
Forest CTor
RandomForest CTor
Creating 0(th) decision tree
AbstractDecisionTree CTor
DecisionTree CTor
Creating 1(th) decision tree
AbstractDecisionTree CTor
DecisionTree CTor
Creating 2(th) decision tree