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 / 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 / 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())

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 / 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 $@
@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;