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
ANOVA_SUMMARY = function(formula, data) | |
{ | |
# 1. 데이터 전처리 | |
# 종속변수를 항상 첫번째 input으로 "y~." 형식으로 받음 | |
mf = model.frame(formula, data) | |
y = mf[,1] | |
Response_name = colnames(mf)[1] # 종속변수의 이름 | |
Variable_name = c("(intercept)", colnames(mf)[-1]) # 독립변수의 이름 | |
n = nrow(mf) |
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
set nocompatible " required | |
" filetype off " required | |
syntax on | |
syntax enable | |
" Monokai color scheme | |
" mkdir -p ~/.vim/colors | |
" wget https://raw.githubusercontent.com/crusoexia/vim-monokai/master/colors/monokai.vim ~/.vim/colors | |
colorscheme monokai |
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
""" Trains an agent with (stochastic) Policy Gradients on Pong. Uses OpenAI Gym. """ | |
import numpy as np | |
import cPickle as pickle | |
import gym | |
# hyperparameters | |
H = 200 # number of hidden layer neurons | |
batch_size = 10 # every how many episodes to do a param update? | |
learning_rate = 1e-4 | |
gamma = 0.99 # discount factor for reward |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file has been truncated, but you can view the full file.
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
; 새 생명. | |
(NP (DP 새/MM) | |
(NP 생명/NNG + ./SF)) | |
; 나는 돈이다. | |
(S (NP_SBJ 나/NP + 는/JX) | |
(VNP 돈/NNG + 이/VCP + 다/EF + ./SF)) | |
; 만 원이라는 이름을 붙인 채, 이제 막 태어났다. | |
(VP (NP_AJT (VP_MOD (NP_OBJ (VNP_MOD (NP 만/NR) |
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
# Reference: http://konlpy.org/en/v0.4.4/install/#ubuntu | |
sudo apt-get update && sudo apt-get upgrade | |
sudo apt-get install g++ openjdk-7-jdk python-dev python3-dev --fix-missing | |
sudo pip install JPype1 | |
sudo pip install konlpy | |
sudo apt-get install curl | |
bash <(curl -s https://raw.githubusercontent.com/konlpy/konlpy/master/scripts/mecab.sh) |
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
from konlpy.tag import Mecab | |
mecab = Mecab() | |
import sys | |
reload(sys) | |
sys.setdefaultencoding('utf-8') | |
def mecab_pos_tag(): | |
while True: | |
a = raw_input() | |
for x in mecab.pos(a): |
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
# Note – this is not a bash script (some of the steps require reboot) | |
# I named it .sh just so Github does correct syntax highlighting. | |
# | |
# This is also available as an AMI in us-east-1 (virginia): ami-cf5028a5 | |
# | |
# The CUDA part is mostly based on this excellent blog post: | |
# http://tleyden.github.io/blog/2014/10/25/cuda-6-dot-5-on-aws-gpu-instance-running-ubuntu-14-dot-04/ | |
# Install various packages | |
sudo apt-get update |
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
from __future__ import print_function | |
''' | |
Basic Multi GPU computation example using TensorFlow library. | |
Author: Aymeric Damien | |
Project: https://github.com/aymericdamien/TensorFlow-Examples/ | |
''' | |
''' | |
This tutorial requires your machine to have 2 GPUs | |
"/cpu:0": The CPU of your machine. |
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
from __future__ import print_function | |
''' | |
Basic Multi GPU computation example using TensorFlow library. | |
Author: Aymeric Damien | |
Project: https://github.com/aymericdamien/TensorFlow-Examples/ | |
''' | |
''' | |
This tutorial requires your machine to have 1 GPU | |
"/cpu:0": The CPU of your machine. |
OlderNewer