Skip to content

Instantly share code, notes, and snippets.

View karimkhanp's full-sized avatar

Karimkhan karimkhanp

View GitHub Profile
@karimkhanp
karimkhanp / abc
Created November 13, 2012 09:28
package main
import "fmt"
func add(x int, y int) int {
return x + y
}
func main() {
@karimkhanp
karimkhanp / onloadevent
Created January 3, 2014 09:39
jquery onload
<?php
// A $( document ).ready() block.
$( document ).ready(function() {
console.log( "ready!" );
});
// ---------------
// Shorthand for $( document ).ready()
$(function() {
@karimkhanp
karimkhanp / mysql_queries
Last active August 29, 2015 13:57
mysql queries for insert, update, check record existence with sql prevention
<?php
//INSERT
function store_feedback($message,$name,$email)
{
$con = mysqli_connect('127.0.0.1', 'root', '', 'mysql');
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
@karimkhanp
karimkhanp / Amazon_README.md
Last active August 29, 2015 14:00 — forked from aronwoost/README.md
lamp on amazon ec2

Launch the instance and connect with ssh.

##Update the server

sudo yum update

##Install php and MySQL packages

*damn
*dyke
*fuck*
*shit*
4r5e
5h1t
5hit
@$$
a55
ahole
@karimkhanp
karimkhanp / resource
Last active August 29, 2015 14:01 — forked from anonymous/resource
linguistic resources
Link to large linguistic resource : http://www-01.sil.org/linguistics/etext.html
English word list : http://www.umich.edu/~archive/linguistics/texts/lexica/
Moby Thesaurus (they claims Moby Thesaurus is the largest and most comprehensive thesaurus data source in English) : http://icon.shef.ac.uk/Moby/mthes.html
English word list : http://www-01.sil.org/linguistics/wordlists/english/wordlist/wordsEn.txt
Words list in five languages : http://www.dcs.shef.ac.uk/research/ilash/Moby/mlang.tar.Z
Mobi resources : http://icon.shef.ac.uk/Moby/
@karimkhanp
karimkhanp / sentiment analysis
Last active June 22, 2017 04:34
Opensource sentiment analysis resources
1) Python NLTK can do Sentiment Analysis based on Classification Algos or NLP tools in it.
2) R has tm.sentiment package which comes with sentiment words and ML based tecniques.
3) Rapidminner, KNIME etc gives classification based on algorithms available in the tool.
3) GATE you can have ML bases (SVM) and rule based or rule + lexion based sentiment analysis
4) OpenNLP provides facility to develop maxent based sentiment analysis
5) Lingpipe provides facility to develop classification based sentiment analysis algos implemented in it
6) Apache Mahout has Naive Bayes and CBayes for classification based Sentiment Analysis
7) Weka has Naive Bayes, SVM, KNN etc.. to develop Sentiment Analysis
8) Python Pattern has Classification algos
@karimkhanp
karimkhanp / ar2en
Created July 3, 2014 02:54
arabic to english convertion
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Arabic-English Transliteration</title>
@karimkhanp
karimkhanp / terminologies
Last active January 11, 2019 11:11
Dumping all terminologies, tool and technology required for BigData
-------------------------------------------------------- Edit to Enlarge ----------------------------------------------
Apache spark - Apache Spark is an open-source data analytics cluster computing framework originally developed in the AMPLab at UC Berkeley.[1] Spark fits into the Hadoop open-source community, building on top of the Hadoop Distributed File System (HDFS).[2] However, Spark is not tied to the two-stage MapReduce paradigm, and promises performance up to 100 times faster than Hadoop MapReduce for certain applications.
Database pipelining - http://www.tuplejump.com/img/ff08.theplatform.png
As you will notice it's just not about processing the data, but involves a lot of other components. Collection, storage, exploration, ML and visualization are critical to the proect's success.
SOLR - Solr to build a highly scalable data analytics engine to enable customers to engage in lightning fast, real-time knowledge discovery.
@karimkhanp
karimkhanp / ann
Created August 19, 2014 09:02
neural network concept and example
An artificial neural network is an interconnected group of nodes, akin to the vast network of neurons in a brain. Here, each circular node represents an artificial neuron and an arrow represents a connection from the output of one neuron to the input of another.
Example: character recornization
Make the system learn by 10 sample of 1-10 digits
While learning we will collect pixel positions for each digits.
Like if are learning digit '1'. So for each of 10 test, we will collect pixel position. We can store normalized mean value for digit 1 now.
Suppose now new digit comes and we want to identify it. So we will calculate the euclidian distance for input digit to all database learned digits. For which every euclidian distance is least, that is predicted digit.