Skip to content

Instantly share code, notes, and snippets.

View haven-jeon's full-sized avatar
๐Ÿšฟ
Focusing

Heewon Jeon(gogamza) haven-jeon

๐Ÿšฟ
Focusing
View GitHub Profile
@haven-jeon
haven-jeon / server.R
Created November 9, 2012 05:00
shiny test with ggplot2
library(shiny)
library(ggplot2)
# Define server logic required to generate and plot a random distribution
shinyServer(function(input, output) {
# Function that generates a plot of the distribution. The function
# is wrapped in a call to reactivePlot to indicate that:
#
# 1) It is "reactive" and therefore should be automatically
@haven-jeon
haven-jeon / server.R
Created November 11, 2012 09:39
Korea Oil Price plot with Shiny
library(shiny)
library(ggplot2)
library(reshape2)
library(scales)
#data load from dropbox
load(url("http://dl.dropbox.com/u/8686172/oil_price.RData"))
@haven-jeon
haven-jeon / rjava_test.R
Created November 14, 2012 16:40
rJava option test
options( "java.parameters")
library(rJava)
options( "java.parameters")
#options( java.parameters = "" )
.jinit(parameters=c("-Dfile.encoding=UTF-8"))
#.jinit()
@haven-jeon
haven-jeon / compile_pdf_korean.R
Last active December 10, 2015 19:58
knitr ์‚ฌ์šฉ์„ ์œ„ํ•œ ํ•จ์ˆ˜
#' run like this "require(devtools);source_gist("https://gist.github.com/4485043");"
compile_pdf<- function(filename, typeset="pdflatex"){
require(knitr)
prev_enc <- getOption("encoding")
options(encoding="UTF-8")
rnw <- knit(filename, envir=new.env())
system(paste(typeset, rnw))
options(encoding=prev_enc)
}
@haven-jeon
haven-jeon / gist:4970856
Last active December 13, 2015 20:38
knitr markdown ๋ธ”๋กœ๊น… ํ…Œ์ŠคํŠธ

์ด์ œ ๋ธ”๋กœ๊น…๋„ R + knitr + Markdown์œผ๋กœ...

๊ฐœ์š”

์ง€๋‚œ ๊ธˆ์š”์ผ ์˜คํ›„ ๋Šฆ๊ฒŒ๋ถ€ํ„ฐ ํ† ์š”์ผ๊นŒ์ง€ ์ด ๋ธ”๋กœ๊ทธ๋ฅผ ์„œ๋น„์Šคํ•˜๋Š” ํ˜ธ์ŠคํŒ… ์„œ๋ฒ„์— ๋ฌธ์ œ๊ฐ€ ์ƒ๊ฒผ๋‹ค. ๋‹ค๋ฅธ๋•Œ์˜€์œผ๋ฉด ํฐ ๋ฌธ์ œ๊ฐ€ ๋˜์ง€ ์•Š์•˜์„ํ…๋ฐ, ๋ฐ˜๋“œ์‹œ ๋ธ”๋กœ๊ทธ๋ฅผ ํ†ตํ•ด์„œ ๋””๋ฒ„๊น…์„ ํ•ด์•ผ๋  ์ƒํ™ฉ์ด ๊ฒน์นœ๊ฒƒ์ด์—ˆ๋‹ค.

knitr ๊ฐœ๋ฐœ์ž๊ฐ€ ์ƒˆ๋กœ ์ธ์ฝ”๋”ฉ ์˜ต์…˜์ด ๋“ค์–ด๊ฐ„ ํ•จ์ˆ˜์˜ ๋ฒ„๊ทธ ํŒจ์น˜๋ฅผ ๋นจ๋ฆฌ ํ•ด๋‹ฌ๋ผ๋Š” ๋ฉ”์ผ์„ ๋ฐ›๊ณ  ๊ทธ๋‚˜๋งˆ ์ •์‹ ์ด ์—†๋Š” ์ƒํ™ฉ์— ํ˜ธ์ŠคํŒ… ์„œ๋น„์Šค์— ๋Œ€ํ•œ ์ฆ์˜ค๋Š” ์ •๋ง ์‹œ๊ฐ„์ด ๊ฐˆ์ˆ˜๋ก ์˜ฌ๋ผ๋งŒ ๊ฐ”๋‹ค. ๊ฒŒ๋‹ค๊ฐ€ ํ˜ธ์ŠคํŒ…์„ ์˜ฎ๊ฒจ๋ฒ„๋ฆฌ๋ ค๋Š” ์‹œ๋„๋ฅผ ํ† ์š”์ผ ์˜คํ›„๋ถ€ํ„ฐ ํ–ˆ๋Š”๋ฐ, ํ˜ธ์ŠคํŒ… DB์— ๋ฌธ์ œ๊ฐ€ ์ƒ๊ฒจ์„œ DB๋คํ”„๋„ ์•ˆ๋˜๊ณ  ์ฐธ ์ด๋ž˜์ €๋ž˜ ์›๋ง๋งŒ ์Œ“์ด๋‹ค๊ฐ€, ํ† ์š”์ผ ์˜คํ›„ ์•„์ฃผ ์ž ๊น DB๋คํ”„๊ฐ€ ๊ฐ€๋Šฅํ•œ ์ƒํ™ฉ์ด ๋˜์–ด ๋คํ”„๋ฅผ ๋ฐ›๊ณ  ๋ฐ”๋กœ ์ข€ ๋น„์‹ธ์ง€๋งŒ ์•ˆ์ •์ ์ด๊ณ  ์„œ๋น„์Šค ์ข‹์€ ํ˜ธ์ŠคํŒ… ์—…์ฒด๋กœ ์˜ฎ๊ธฐ๊ฒŒ ๋˜์—ˆ๋‹ค. ๋‚˜์ด๊ฐ€ ๋“ค๋ฉด์„œ ์ €๋ ด(?)์— ์˜๋ฏธ๋ฅผ ๋‘๊ธฐ ๋ณด๋‹ค๋Š” ์“ธ๋ฐ์—†๋Š” ๊ณณ์— ์‹œ๊ฐ„ ๋บ๊ธฐ์ง€ ์•Š๊ฒŒ ๋” ๊ท€์ฐฎ๊ฒŒ ํ•˜์ง€ ์•Š๋Š” ์„œ๋น„์Šค๋“ค์„ ์ฐพ๋Š” ๊ฒฝํ–ฅ์ด ์žˆ๋Š”๋ฐ, ์ด๋ฒˆ ํ˜ธ์ŠคํŒ… ์„œ๋น„์Šค ์„ ํƒ๋„ ๊ทธ๋žฌ๋‹ค. ์—ฌํŠผ ์ž˜ ์˜ฎ๊ฒผ๊ณ , ๊ฒŒ๋‹ค๊ฐ€ ๋ธ”๋กœ๊ทธ๋„ ์ข€๋” ์‹ฌํ”Œํ•˜๊ฒŒ ํ™• ๋ฆฌ๋‰ด์–ผ ํ•ด๋ฒ„๋ ธ๋‹ค.

@haven-jeon
haven-jeon / word2vec.ipynb
Last active September 30, 2018 08:31
word2vec with MXNet Gluon
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@haven-jeon
haven-jeon / naver_review_classifications_gluon_attention.ipynb
Created September 8, 2018 11:34
GluonNLP Attention API ํ™œ์šฉ๋ฒ•
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@haven-jeon
haven-jeon / naver_review_classifications_gluon_bert.ipynb
Last active February 25, 2023 08:36
BERT with Naver Sentiment Movie Corpus
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.