Skip to content

Instantly share code, notes, and snippets.

@powerlim2
powerlim2 / MapReduceSentimentScore.java
Created May 19, 2013 21:47
Class for Sentimental Analysis: It receives sentences and gives you an integer value. 1 - positive, 2 - neutral, 3 - negative, null - error or empty.
import java.io.*;
import java.util.Hashtable;
/**
* Created with IntelliJ IDEA.
* User: joonhyunglim
* Date: 5/18/13
* Time: 8:31 PM
* To change this template use File | Settings | File Templates.
*/
@powerlim2
powerlim2 / MapReduceSentimentScore.java
Created May 20, 2013 20:37
Sentimental Analysis Class — read text files within the jar file.
import java.io.*;
import java.util.Hashtable;
/**
* Created with IntelliJ IDEA.
* User: joonhyunglim
* Date: 5/18/13
* Time: 8:31 PM
* To change this template use File | Settings | File Templates.
*/
@powerlim2
powerlim2 / JSON_Handling.py
Created May 21, 2013 19:32
This code shows the procedure of how to work with .json files using Python.
## 05. 05. 2013
## Author: Joon Lim
## JSON file handling
import json
jsfile = open('/Users/joonhyunglim/Desktop/Python/json_handling/glyph_json_data.txt')
data = json.load(jsfile)
jsfile.close()
@powerlim2
powerlim2 / SKhelper.py
Last active January 11, 2021 18:35
This module is to ease your analysis with Scikit_Learn in Python. It gives a few functionalities that the current Scikit_Learn library does not offer. Please free to download and use it.
# coding=UTF8
#########################################################################
# This class is to help sklearn to handle statistical process #
# Author: Joon Lim from Master of Science in Analytics at Northwestern #
# Date: 04.23.2013 #
#########################################################################
''' this Module is built on top of numpy and sklearn. '''
@powerlim2
powerlim2 / CSVcombiner.java
Created May 25, 2013 22:56
CSV file combiner — this simple program takes all textfiles in a folder and add all the text files into one giant textfile.
import java.io.*;
/**
* Created with IntelliJ IDEA.
* User: joonhyunglim
* Date: 5/25/13
* Time: 5:42 PM
* To change this template use File | Settings | File Templates.
*/
public class CSVcombiner {
@powerlim2
powerlim2 / SimpleMovingAverage.java
Created May 28, 2013 00:20
Simple Moving Average - version2 : this program is now able to deal with duplicate dates ( it will give you total stock value for each date and calculate Moving Average). Enjoy.
import java.io.*;
import java.util.*;
/**
* Created with IntelliJ IDEA.
* User: joonhyunglim
* Date: 5/25/13
* Time: 6:34 PM
* To change this template use File | Settings | File Templates.
*/
@powerlim2
powerlim2 / SimpleMovingAverage.java
Created May 30, 2013 15:55
Simple Moving Average for a portfolio
import java.io.*;
import java.util.*;
/**
* Created with IntelliJ IDEA.
* User: joonhyunglim
* Date: 5/25/13
* Time: 6:34 PM
* To change this template use File | Settings | File Templates.
*/
@powerlim2
powerlim2 / SMAbyStock.java
Created May 30, 2013 15:56
Simple Moving Average by each stock
import java.io.*;
import java.util.*;
/**
* Created with IntelliJ IDEA.
* User: joonhyunglim
* Date: 5/25/13
* Time: 6:34 PM
* To change this template use File | Settings | File Templates.
*/
@powerlim2
powerlim2 / AddPrefixToFiles.java
Last active January 2, 2016 11:09
'Java code' to add prefix to all files in a specified directory. All you need is to modify two variables. That's it!
import java.io.File;
/**
* Created with IntelliJ IDEA.
* User: Joonhyung
* Date: 1/6/14
* Time: 10:20 PM
* To change this template use File | Settings | File Templates.
*/
public class AddPrefixToFiles {