Skip to content

Instantly share code, notes, and snippets.

View kuang-da's full-sized avatar
🧬
Focusing

Da (Derek) Kuang kuang-da

🧬
Focusing
View GitHub Profile
@kuang-da
kuang-da / leetcode-templet.cpp
Last active October 25, 2020 20:17
[Notes about LeetCode] #leetcode
include <stdlib.h>
include <stdio.h>
include <string>
include <string.h>
include <iostream>
include <algorithm>
include <vector>
include <unordered_map>
using namespace std;
@kuang-da
kuang-da / Makefile-leetcode
Last active October 25, 2020 19:57
[Notes about Makefile] #c #makefile
TARGETS = Test
all: $(TARGETS)
%.o: %.cpp
g++-7.1.0 $^ -c -o $@
Test: 461.o
g++-7.1.0 $^ -o $@

Keybase proof

I hereby claim:

  • I am wryvotary on github.
  • I am wryvotary (https://keybase.io/wryvotary) on keybase.
  • I have a public key ASClh5-CZKHRKUzCoXICn7O42RZOQsBMi0u69P9IsaD9Tgo

To claim this, I am signing this object:

@kuang-da
kuang-da / ggplot-example.R
Last active October 25, 2020 20:19
[Notes about R] Common used code snippet for R programming #R #datascience
p <- ggplot()
p <- ggplot(data = k_suggest_df,
aes(x = k, y = median_kl, col = calc))
p <- p + geom_line()
p <- p + xlab("K")
p <- p + ylab("Median KL divergence (across all cells)")
p <- p + theme_bw(base_size = 8)
#p <- p + theme(legend.key.size = unit(3, "line"))
p <- p + theme(legend.position = "bottom")
p <- p + theme(legend.title = element_blank())
@kuang-da
kuang-da / code-snippet.tex
Last active November 26, 2021 19:13
[Notes about LaTeX] Examples and common code snipets of LaTeX #LaTeX
% ---------Introduction ----------------
% This snept is used to organize some small examples for LaTeX package listings.
% Iistings is a greate package for formating code in PDF files.
% https://ctan.org/pkg/listings?lang=en
% -------------------------------------
\usepackage{listings}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Code Style
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\lstset{
@kuang-da
kuang-da / libreoffice.sh
Last active October 25, 2020 19:56
[Notes about CLT] Command Linux Tools Notes #Linux#CLT
# convert pptx to pdf in batch
libreoffice --headless --invisible --convert-to pdf *.ppt
@kuang-da
kuang-da / docker-basics.sh
Last active February 25, 2021 23:30
[Notes about Docker] A notes about Docker's usage #docker #linux
#----Introduction---------------
# A notes about Docker's basic usage
#-------------------------------
# check all current containers
docker container ls
docker ps
# First time to run it in front end
docker run -rm -p 8787:8787 -e PASSWORD=chad rocker/rstudio
@kuang-da
kuang-da / deployment.sh
Created February 25, 2021 23:28
[Depolyment]The scripts for deployment
#!/bin/bash
# Depolyment of lecture notes
# Copy all the notes into a single directory before pushing to GitHub
DIRECTORY=.
TARGET_DIR=all-notes
FILE_NAMES=("2-hypothesis-testing" \
"3-binomial-distribution" \
"4-sign-test-wilcoxon-signed-rank-test" \
"5-wilconxon-rank-sum-test-rs-test" \
@kuang-da
kuang-da / outlines.tex
Created February 28, 2021 16:10
tex-nonparametrics
\subsection{Background}
\subsection{Assumption}
\subsection{Hypothesis}
@kuang-da
kuang-da / docker-compose.yml
Created March 23, 2021 18:40
[Docker Template] #docker #template
version: "3.9"
services:
theia-server:
build: .
network_mode: host
ports:
- "3838:3838"
environment:
- PASSWORD=chad
volumes: