Skip to content

Instantly share code, notes, and snippets.

View rischanlab's full-sized avatar
💭
I may be slow to respond.

Rischan Mafrur rischanlab

💭
I may be slow to respond.
View GitHub Profile
@rischanlab
rischanlab / getBio.php
Last active August 29, 2015 14:01
Get twitter Bio using Twitter API Exchange [PHP]
<?php
/** Just simple code to get twitter Account Bio **/
/** Rischan Mafrur **/
/** April 28 2014 **/
ini_set('display_errors', true);
// set display error
@rischanlab
rischanlab / subfigure_in_Latex.tex
Last active August 29, 2015 14:01
Latex Subfigure
% 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}
@rischanlab
rischanlab / unfollow_nonfollowers.py
Last active August 29, 2015 14:01
Unfollow Twitter NonFollowers bulk [python]
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()
@rischanlab
rischanlab / latexSubtable.tex
Last active November 24, 2021 08:35
Sub Table in Latex
%Rischan Mafrur
%Sub Table in Latex
% May 20, 2014
\begin{table}[h]
\begin{subtable}[h]{0.16\textwidth}
\centering
\begin{tabular}{|l|l|}
XXX & YYY\\
@rischanlab
rischanlab / usagepackage.tex
Last active August 29, 2015 14:01
Standard Requirement Package in Latex
%Rischan Mafrur
%May 2014
% Cite and Caption
\usepackage{cite}
\usepackage{caption}
\usepackage{refstyle}
% this is package for write algorithm
\usepackage{algorithm}
@rischanlab
rischanlab / NaiveBayes.R
Created May 20, 2014 02:54
NaiveBayes in R
#author : Rischan Mafrur
#email : [email protected]
#website : rischanlab.github.io, ourmasjid.me
#May 15, 2014
#install requirement packages
install.packages("klaR")
install.packages("caret")
#loading library
@rischanlab
rischanlab / matlab.desktop
Created May 20, 2014 06:27
Create Shortcut application in Desktop Ubuntu
#in this case I use matlab application in Ubuntu
sudo wget http://upload.wikimedia.org/wikipedia/commons/2/21/Matlab_Logo.png -O /usr/share/icons/matlab.png
#download image for matlab
#go to this path
/usr/share/applications/matlab.desktop
#Insert this content to the matlab.desktop
[Desktop Entry]
@rischanlab
rischanlab / Bot.sh
Last active August 29, 2015 14:01
Simple MySQL User and DB management
#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;
@rischanlab
rischanlab / NaiveBayes_MyProject.R
Created May 20, 2014 06:43
Twitter accounts classification using Naive Bayes in R
#author : Rischan Mafrur
#email : [email protected]
#website : rischanlab.github.io, ourmasjid.me
#May 15, 2014
#install requirement packages
install.packages("klaR")
install.packages("caret")
install.packages("plotrix")
@rischanlab
rischanlab / subfigure_span.tex
Created May 23, 2014 19:04
Subfigure span the two columns in IEEEtrans style
\begin{figure*}%
\centering
\begin{subfigure}{.95\columnwidth}
\includegraphics[width=\columnwidth]{tolakpartaipoligami_pie3D.png}%
\caption{\#TolakPartaiPoligami hashtag}
\label{fig:sub1}
\end{subfigure}\hfill%
\begin{subfigure}{.95\columnwidth}
\includegraphics[width=\columnwidth]{sayapilihpks_pie3D.png}%
\caption{\#SayaPilihPKS hashtag}