Skip to content

Instantly share code, notes, and snippets.

View azmfaridee's full-sized avatar
🎯
Focusing

Abu-Zaher Faridee azmfaridee

🎯
Focusing
View GitHub Profile
@azmfaridee
azmfaridee / iscii2unicode.py
Created June 3, 2013 07:44
ISCII to Unicode Converter Script
#!/usr/bin/env python
# released under BSD License
# mary <[email protected]> aka meyarivan <[email protected]>
# inspired by ICU [ http://oss.software.ibm.com/icu/ ]
# code still in alpha stage.. lots of redundant code.. and probably incorrect
# if ya find errors, pls submit bug reports at indlinux
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
#include <cstdlib>
#include <iostream>
#include <vector>
#define NUM_TREES 5
using namespace std;
// base tree
class AbstractDecisionTree {
@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) {
@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
#!/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()
// 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;
}
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
#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){
#!/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