Skip to content

Instantly share code, notes, and snippets.

View kevinwang09's full-sized avatar

kevinwang kevinwang09

View GitHub Profile
@kevinwang09
kevinwang09 / multiple_ssh_setting.md
Created July 29, 2022 12:28 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
rank airport1 airport2 distance passengers type
1 Jeju Seoul-Gimpo 449 14107414 Domestic
2 Sapporo Tokyo-Haneda 835 9698639 Domestic
3 Sydney Melbourne 705 9245392 Domestic
4 Fukuoka Tokyo-Haneda 889 8762547 Domestic
5 Mumbai Delhi 1150 7392155 Domestic
6 Hanoi Ho Chi Minh City 1171 6867114 Domestic
7 Beijing Shanghai-Hongqiao 1081 6518997 Domestic
8 Hong Kong Taipei-Taoyuan 802 6476268 International
9 Tokyo-Haneda Naha 1573 5829712 Domestic
@kevinwang09
kevinwang09 / city_tbl.csv
Created June 3, 2021 22:55
Cities of the busiest airports
city lon lat
Jeju 126.5311884 33.4996213
Sapporo 141.3544507 43.0617713
Sydney 151.2092955 -33.8688197
Fukuoka 130.4016888 33.5901838
Mumbai 72.8776559 19.0759837
Hanoi 105.8341598 21.0277644
Beijing 116.4073963 39.90419989999999
Hong Kong 114.1693611 22.3193039
Tokyo 139.6503106 35.6761919
@kevinwang09
kevinwang09 / conf_mat.R
Created January 22, 2021 07:14
yardstick conf_mat.R
#' Confusion Matrix for Categorical Data
#'
#' Calculates a cross-tabulation of observed and predicted classes.
#'
#' For [conf_mat()] objects, a `broom` `tidy()` method has been created
#' that collapses the cell counts by cell into a data frame for
#' easy manipulation.
#'
#' There is also a `summary()` method that computes various classification
#' metrics at once. See [summary.conf_mat()]
@kevinwang09
kevinwang09 / r-to-python-data-wrangling-basics.md
Last active January 2, 2022 06:26 — forked from conormm/r-to-python-data-wrangling-basics.md
R to Python: Data wrangling with dplyr and pandas

R to python data wrangling snippets

The dplyr package in R makes data wrangling significantly easier. The beauty of dplyr is that, by design, the options available are limited. Specifically, a set of key verbs form the core of the package. Using these verbs you can solve a wide range of data problems effectively in a shorter timeframe. Whilse transitioning to Python I have greatly missed the ease with which I can think through and solve problems using dplyr in R. The purpose of this document is to demonstrate how to execute the key dplyr verbs when manipulating data using Python (with the pandas package).

dplyr is organised around six key verbs:

@kevinwang09
kevinwang09 / additional_features.md
Last active June 21, 2020 02:25
scMerge maintainance notes
  1. GitHub Actions is used to
  • Deploy pkgdown on the origin/gh-pages branch of the repo
  • Run R CMD check on the package using Linux/Windows/Mac machines.
  • Trigger kevinwang09/scmerge_docker repo's own GitHub Actions, which will trigger a Docker build of the package based on the Bioconductor's base image. This Docker will then be pushed to kevinwang09/scmerge on DockerHub.
  1. Codecov is used for checking the coverage of unit testing.

JupyterHub on Google Cloud

Instructions on deploying a JupyterHub on Google Cloud

Aim

The aim of this repo is to document the steps needed to deploy a JupyterHub (JH) on Google Cloud (GC). We will perform additional steps to make sure we can run R codes as well.

Deploying JH (The Littlest)

@kevinwang09
kevinwang09 / DropletUtils_install.log
Last active October 15, 2019 04:29
Installing DropletUtils in Docker
> install("DropletUtils")
Bioconductor version 3.10 (BiocManager 1.30.7), R 3.6.1 (2019-07-05)
Installing package(s) 'DropletUtils'
trying URL 'https://bioconductor.org/packages/3.10/bioc/src/contrib/DropletUtils_1.5.10.tar.gz'
Content type 'application/x-gzip' length 446056 bytes (435 KB)
==================================================
downloaded 435 KB
* installing *source* package ‘DropletUtils’ ...
** using staged installation