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 - <[email protected]>' | |
__date__ = '3/4/16' | |
import os | |
import sys | |
import glob | |
from cmath import log | |
from datetime import datetime | |
from xml.dom.minidom import parse | |
import traceback |
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
#!/usr/bin/env python | |
# encoding: utf-8 | |
import tweepy #https://github.com/tweepy/tweepy | |
import csv | |
#Twitter API credentials | |
consumer_key = "" | |
consumer_secret = "" | |
access_key = "" |
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
# -*- coding: utf-8 -*- | |
""" | |
This script is forked originally from Dave Jeffery. The original implementation | |
was very slow and deleted around 2 tweets per second. Making it multithreaded I | |
am able to delete 30-50 tweets per second. | |
@author: vik-y | |
---------------------------------------------------------------------------- | |
This script will delete all of the tweets in the specified account. |
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' | |
from django.core.exceptions import ObjectDoesNotExist | |
from django.core.management.base import BaseCommand | |
from agri_mapper.utilities.script import CallWMS, CallWFS, UpdateModel | |
import logging | |
logger = logging.getLogger(__name__) |
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) |
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) |
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{ |
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) |
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
\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} |
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 : [email protected] | |
#website : rischanlab.github.io, ourmasjid.me | |
#May 15, 2014 | |
#install requirement packages | |
install.packages("klaR") | |
install.packages("caret") | |
install.packages("plotrix") |
NewerOlder