Skip to content

Instantly share code, notes, and snippets.

View mrchypark's full-sized avatar

ChanYub Park mrchypark

View GitHub Profile
@mrchypark
mrchypark / crawling_hikaku.R
Created August 23, 2017 07:52
crawling hikaku using r
library(rvest)
root<-"http://www.ts-hikaku.com/clist/a0/v1s22t0p"
tail<-".html"
options(stringsAsFactors = F)
dat<-c()
for(i in 1:34){
print(i)
tar<-read_html(paste0(root,i,tail))
company <-
library(dplyr)
library(ggplot2)
# showtext는 윈도우에서 출력시 폰트 문제가 발생하는걸 고칠 수 있게 도와줍니다.
# https://github.com/yixuan/showtext
library(showtext)
font.add.google("Noto Sans")
# q1에서 차용했습니다. 유용한 코드 공유 감사합니다!
format.percent <- function(x) paste(floor(x),'%',se1p='')
library(googleCloudStorageR)
library(dplyr)
library(bigrquery)
library(dbplyr)
# 필요 데이터를 다운로드 받습니다.
# dabrp_classnote3 프로젝트 폴더일 때를 기준으로 했습니다.
chk<-file.info("./data/recomen/tran.csv")
if(is.na(chk$size)){
library(rvest)
library(stringr)
dat<-c()
for (i in 1:2005){
url<-paste0("http://www.bobaedream.co.kr/cyber/CyberCar.php?gubun=K&page=",i)
usedCar <- read_html(url)
title <-
usedCar %>%
html_nodes("td.carinfo a.title") %>%
function(input, output, session) {
# Combine the selected variables into a new data frame
selectedData <- reactive({
iris[, c(input$xcol, input$ycol)]
})
clusters <- reactive({
kmeans(selectedData(), input$clusters)
})
library(shiny)
library(ggplot2)
library(gapminder)
library(dplyr)
ui <- fluidPage(
titlePanel("ggplot test"),
sidebarPanel(
grade <-
as.data.frame(cbind(
ID = c(LETTERS[1:5]),
GPA = list('A+','F', c('C-','B','A+'), c('A','A+'), 'D')
))
unstack <- function(grade){
do.call(rbind, apply(grade, 1, function(x)
data.frame(ID = x$ID, GPA = x$GPA)))
}
@mrchypark
mrchypark / docker-on-wsl-windows-10-home-docker-toolbox.md
Created March 17, 2018 13:25 — forked from strarsis/docker-on-wsl-windows-10-home-docker-toolbox.md
Notes about Docker on WSL (Windows 10 Home / Docker Toolbox) (Virtualbox instead Hyper-V)

Docker on WSL (Windows 10 Home / Docker Toolbox) (Virtualbox instead Hyper-V)

Docker on WSL communicates with Docker on Windows from Docker Toolbox.

Install VirtualBox and Docker Toolbox on Windows.

Docker on Windows uses VM for Linux based docker containers.

@mrchypark
mrchypark / cuda_9.0_cudnn_7.0.sh
Created April 9, 2018 10:17 — forked from ashokpant/cuda_9.0_cudnn_7.0.sh
Install CUDA Toolkit v9.0 and cuDNN v7.0 on Ubuntu 16.04
#!/bin/bash
# install CUDA Toolkit v9.0
# instructions from https://developer.nvidia.com/cuda-downloads (linux -> x86_64 -> Ubuntu -> 16.04 -> deb)
CUDA_REPO_PKG="cuda-repo-ubuntu1604-9-0-local_9.0.176-1_amd64-deb"
wget https://developer.nvidia.com/compute/cuda/9.0/Prod/local_installers/${CUDA_REPO_PKG}
sudo dpkg -i ${CUDA_REPO_PKG}
sudo apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/7fa2af80.pub
sudo apt-get update
sudo apt-get -y install cuda
@mrchypark
mrchypark / remove_password_excel.R
Created May 6, 2018 08:38 — forked from markheckmann/remove_password_excel.R
Remove sheet's password protection in Excel
# remove sheet protection in Excel
# Sample file: https://www.dropbox.com/s/4ul0kowrscyr8cz/excel_protected.xlsx?dl=0
library(stringr)
library(zip)
# file with protected sheets
file <- "data/excel_protected.xlsx"
# file name and path after removing protection