View getBio.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** Just simple code to get twitter Account Bio **/ | |
/** Rischan Mafrur **/ | |
/** April 28 2014 **/ | |
ini_set('display_errors', true); | |
// set display error | |
View subfigure_in_Latex.tex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% Sub Figure in Latex | |
% Rischan Mafrur | |
% May 10, 2014 | |
\begin{figure} | |
\begin{subfigure}{.25\textwidth} | |
\centering | |
\includegraphics[width=\textwidth]{tweet_tolak.png} | |
\caption{Caption Sub Figure A} | |
\label{fig:label_a} |
View unfollow_nonfollowers.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def unfollow(): | |
api = setup_api(consumer_key, consumer_secret, access_key, access_secret) | |
i = 0 | |
while True: | |
try: | |
for page in Cursor(api.friends).pages(): | |
print 'page:', i | |
f = open('out.txt','a') | |
f.write(str(datetime.now()) + ' Page ' + str(i) + '\n') | |
f.close() |
View usagepackage.tex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%Rischan Mafrur | |
%May 2014 | |
% Cite and Caption | |
\usepackage{cite} | |
\usepackage{caption} | |
\usepackage{refstyle} | |
% this is package for write algorithm | |
\usepackage{algorithm} |
View NaiveBayes.R
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#author : Rischan Mafrur | |
#email : rischanlab@gmail.com | |
#website : rischanlab.github.io, ourmasjid.me | |
#May 15, 2014 | |
#install requirement packages | |
install.packages("klaR") | |
install.packages("caret") | |
#loading library |
View Bot.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Dont forget to install this, if you use python to accessing your MySQL db | |
apt-get install libmysqlclient-dev python-dev | |
#If you wanna to use python MySQL and tweepy, you can install it | |
sudo pip install tweepy | |
sudo pip install MySQL-python | |
#Change root password | |
mysql => UPDATE mysql.user SET Password=PASSWORD('password') WHERE User='root'; FLUSH PRIVILEGES; |
View NaiveBayes_MyProject.R
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#author : Rischan Mafrur | |
#email : rischanlab@gmail.com | |
#website : rischanlab.github.io, ourmasjid.me | |
#May 15, 2014 | |
#install requirement packages | |
install.packages("klaR") | |
install.packages("caret") | |
install.packages("plotrix") |
View RandomForest.R
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
install.packages("randomForest",dependencies=TRUE) | |
library(randomForest) | |
fit <- randomForest(data$user ~ data$academic+data$email | |
+data$socnet+data$porn+data$comic+data$music | |
+data$shop+data$blog+data$video+data$search | |
+data$news, data=data) | |
print(fit) | |
importance(fit) |
View parallel.R
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#to make the final table, I changed manually the n size every trial by: 1e3, 1e4, 1e5, 1e6, 1e7. Then I also chnaged the benchmark object 'res' | |
n <- 1e7 | |
set.seed(51) | |
process <- data.frame(id=sample(100, n, rep=T), x=rnorm(n), y=runif(n), z=rpois(n, 1) pexp(2, rate=1/3) ) | |
all <- multicore:::detectCores(all.tests=TRUE) | |
if(!require(rbenchmark)){ | |
install.packages("rbenchmark") | |
} else{ |
View preprocessing_data.R
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Author Information ##### | |
### Coded by Rischan Mafrur ### | |
### 01/01/2015 ### | |
### For Thesis Purpose ### | |
### Language : R ### | |
### Dataset : Private Data ### | |
#Function for loading data | |
f_load_data <- function(path){ | |
library(shiny) |
OlderNewer