Skip to content

Instantly share code, notes, and snippets.

View yenchenlin's full-sized avatar
👋
Hi!

Yen-Chen Lin yenchenlin

👋
Hi!
View GitHub Profile

#Assignment 1

Final Output

3780008173
3780008179
3780008201
3780008213
3780008233
3780008251
  public static class TokenizerMapper
       extends Mapper<Object, Text, NullWritable, LongWritable>{
 
    private TreeMap<Long, String> numbers = new TreeMap<Long, String>();
@yenchenlin
yenchenlin / ensemble_selection_demo.py
Last active November 8, 2018 14:13
Code demonstrate how to use ensemble selection
import numpy as np
from sklearn.ensemble import EnsembleSelectionClassifier
from sklearn import datasets
from sklearn.tree import DecisionTreeClassifier
from sklearn.ensemble import AdaBoostClassifier
from sklearn.linear_model import LogisticRegression
from sklearn.svm import SVC
from sklearn import cross_validation
from sklearn.metrics import accuracy_score
import sklearn.preprocessing as preprocessing

Schedule

2016

March-May

Read papers and determine research direction

NOTE: I have to take GRE test on 4/8

@yenchenlin
yenchenlin / gist:0c6fc9a185161d469f6b
Last active March 3, 2016 05:48
CloudDB Assignment-1 Report

Assignment 1 Report

How you implement the transaction using JDBC and stored procedures briefly

JDBC [Aus]

Remote Stored Procedures [Yen]

Experiements

@yenchenlin
yenchenlin / tmux-cheatsheet.markdown
Last active September 14, 2015 11:40 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname

What is @property ?

@property 是 Obj-C 2.0 版開始提供的一種功能,目的是要簡化一個 instance variable 的設定過程。

為什麼需要 @property ?

instance variable (以下簡稱 ivar ) 在 Obj-C 裡預設為 protected , 代表只有這個 class or 它的 subclass 可以 access 值。 如果這個 ivar 要給外部使用的話,那就必須必須加上 public 的 method setter/getter。 然而,每宣告一個要給外部使用的 ivar 就要宣告一組 setter/getter 太麻煩,因此 Obj-C 加入了 @property 的語法 。

舉例來說,原本想讓外部的人使用 weight 要這樣寫: