Skip to content

Instantly share code, notes, and snippets.

View mrchypark's full-sized avatar

ChanYub Park mrchypark

View GitHub Profile
library(purrr)
library(readr)
library(httr)
library(rvest)
library(dplyr)
"https://github.com/FinanceData/marcap/tree/master/data" %>%
GET() %>%
content() %>%
html_nodes("td.content span a") %>%
library(usethis)
## in global project
create_package("package_name")
## run code, restart rstudio in "package_name" project
use_roxygen_md()
use_readme_rmd()
use_pipe()
@mrchypark
mrchypark / k8s-pi.md
Last active August 25, 2018 16:26 — forked from alexellis/k8s-pi.md
K8s on Raspbian

Kubernetes on (vanilla) Raspbian Lite

Yes - you can create a Kubernetes cluster with Raspberry Pis with the default operating system called Raspbian. This means you can carry on using all the tools and packages you're used to with the officially-supported OS.

Pre-reqs:

  • You must use an RPi 2 or 3 for use with Kubernetes
  • I'm assuming you're using wired ethernet (Wi-Fi also works, but it's not recommended)

Master node setup

# source("https://install-github.me/tidyverse/googledrive")
# source("https://install-github.me/tidyverse/tidyverse")
# source("https://install-github.me/Rdatatable/data.table")
# source("https://install-github.me/hadley/dtplyr")
pack <- c("googledrive","dplyr","tidyr","purrr","data.table","dtplyr")
invisible(lapply(pack, library, character.only = TRUE))
dir.create("./data")
# 셀레늄 패키지와 rvest 패키지를 설치합니다.
source("https://install-github.me/ropensci/RSelenium")
install.packages("rvest")
install.packages("dplyr")
# 패키지를 불러서 사용할 준비를 합니다.
library(RSelenium)
library(rvest)
library(dplyr)
library(shiny)
library(lazyeval)
ui <- fluidPage(
titlePanel("text eval"),
sidebarLayout(
sidebarPanel(
textInput("text",
"formula:",
@mrchypark
mrchypark / trello.gs
Last active May 25, 2018 09:28
 트렐로 카드를 구글 sheet에 현황을 업데이트 해주는 gs
function onOpen() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var menuEntries = [ {name: "Update from Trello", functionName: "main"},];
ss.addMenu("Trello", menuEntries);
}
var api_key = "XXXXXX";
var api_token = "XXXXXX";
var board_id = "XXXXXX";
var sheetName = "sheet_name_where_you_want"
@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
@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 / 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.