Skip to content

Instantly share code, notes, and snippets.

Bodong Chen meefen

View GitHub Profile
meefen / server.R
Created Jun 22, 2014
A (to-be-fixed) demo of integrating rCharts' timeline within Shiny.
View server.R
shinyServer(function(input, output) {
output$timelineDemo <- renderChart({
### Copied from
View fsm.Rmd
Frequent Sequence Mining
```{r knitr-options}
options(width=200, digits=2)
opts_chunk$set(comment = "", warning = FALSE, message = FALSE, echo = TRUE, tidy = FALSE, size="small")
## Data preparation
meefen /
Last active Dec 30, 2015
This gist contains Java code for archiving tweets in MongoDB, and R code for retrieving tweets for analysis. Please note that there're a couple of dependencies: (1) You should setup your MongoDB (I used the free plan at; (2) You should have setup your Twitter api (check; (3) Java code: include twi…
package twitter_loop;
import com.mongodb.BasicDBObject;
import com.mongodb.DB;
import com.mongodb.DBCollection;
import com.mongodb.DBCursor;
import com.mongodb.Mongo;
import com.mongodb.MongoException;
import java.util.List;
meefen / Makefile
Created Nov 13, 2013
Makefile and LaTeX templates for compiling Markdown documents for job application. Applicable to other situations where you need to compile a bunch of Markdown files to PDF or Word/ODT formats.
View Makefile
# Makefile used to compile job application documents from MarkDown to PDF or ODT
# Bodong Chen
## Files
SRC = $(wildcard *.md)
PDFS = $(
ODTS = $(
## Targets
all: $(PDFS)
meefen / lsa_mds.R
Last active Sep 30, 2019
Analyze Text Similarity in R: Latent Semantic Analysis and Multidimentional Scaling
View lsa_mds.R
# load required libraries
# 1. Prepare mock data
text <- c("transporting food by cars will cause global warming. so we should go local.",
"we should try to convince our parents to stop using cars because it will cause global warming.",
"some food, such as mongo, requires a warm weather to grow. so they have to be transported to canada.",
"a typical electronic circuit can be built with a battery, a bulb, and a switch.",
@author Michael J Bommarito II
@date Feb 26, 2011
@license Simplified BSD, (C) 2011.
This script demonstrates how to use Python to archive historical tweets.
import codecs
import csv
View archiveHashtag.r
#@author Michael J Bommarito
#@date Feb 20, 2011
#@ip Simplified BSD, (C) 2011.
# This is a simple example of an R script that will retrieve
# public tweets from a given hashtag.
# This function loads stored tag data to determine the current max_id.
View TAGS_Stats.R
# Load libraries
# Read and return Google Spreadsheet as csv
You can’t perform that action at this time.