Skip to content

Instantly share code, notes, and snippets.

View doyonghoon's full-sized avatar

Yong Hoon Do doyonghoon

View GitHub Profile
@doyonghoon
doyonghoon / GitCommitEmoji.md
Created December 30, 2021 00:29 — forked from parmentf/GitCommitEmoji.md
Git Commit message Emoji
@doyonghoon
doyonghoon / waterplants.py
Created October 2, 2019 22:05
water plants google OA
def waterplant(plants, cap1, cap2):
return helper(plants, 0, len(plants) - 1, 0, 0, cap1, cap2)
def helper(plants, left, right, water1, water2, cap1, cap2):
if left > right:
return 0
c1, c2 = 0, 0
leftmax, rightmax = 0, 0
if water1 != cap1 and plants[left] - water1 > 0:
@doyonghoon
doyonghoon / .vimrc
Last active June 12, 2019 20:42
my vimrc
" ~/.vimrc
" Lisa McCutcheon
" Wed Feb 07, 2007
" **************************************
" * VARIABLES
" **************************************
set nocompatible " get rid of strict vi compatibility!
set nu " line numbering on
set autoindent " autoindent on
@doyonghoon
doyonghoon / template_vimrc
Created September 5, 2018 16:32
Template for vimrc
" ~/.vimrc
" Original Author: Lisa McCutcheon
" April 6, 2018
" **************************************
" * VARIABLES
" **************************************
set nocompatible " get rid of strict vi compatibility!
set nu " line numbering on
set autoindent " autoindent on
@doyonghoon
doyonghoon / DefaultKeyBinding.dict
Created June 25, 2018 12:44
key bindings for emacs users.
{
/* Keybindings for emacs emulation. Compiled by Jacob Rus.
* Edited by Yong.
*
* For Mac users, place this file at ~/Library/Keybindings/DefaultKeyBinding.dict
*
* This is a pretty good set, especially considering that many emacs bindings
* such as C-o, C-a, C-e, C-k, C-y, C-v, C-f, C-b, C-p, C-n, C-t, and
* perhaps a few more, are already built into the system.
*
# This R environment comes with all of CRAN preinstalled, as well as many other helpful packages
# The environment is defined by the kaggle/rstats docker image: https://github.com/kaggle/docker-rstats
# For example, here's several helpful packages to load in
library(ggplot2) # Data visualization
library(readr) # CSV file I/O, e.g. the read_csv function
# Input data files are available in the "../input/" directory.
# For example, running this (by clicking run or pressing Shift+Enter) will list the files in the input directory
@doyonghoon
doyonghoon / mega.sh
Created June 5, 2018 00:21
customized tester
#!/bin/bash
make testwriteTables
$(./testwriteTables)
declare -a options=(
"-i outsmall10 -x"
"-i outsmall100 -x"
"-i outsmall1000 -x"
"-i outlarge10000 -x"
package cse12pa2student;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import java.util.Arrays;
import java.util.Collection;
import java.util.NoSuchElementException;
@doyonghoon
doyonghoon / tmp.java
Last active November 2, 2017 23:06
removeAll
private static void removeAll(Collection<Integer>... collections) {
for (Collection<Integer> c : collections) {
for (int i = 0; i < c.size(); i++) {
Collection<Integer> tmp = copyCollection(c);
if (tmp != null) {
long timeTaken = System.nanoTime();
for (int j = 0; j <= i; j++) {
tmp.remove(j);
}
timeTaken = timeTaken - System.nanoTime();
@doyonghoon
doyonghoon / Bill.java
Created February 21, 2017 04:46
MATH 2B: Uncle Bill
/**
* Mini Project:
* Two different methods to calculate the amount that Nancy is to receive from her Uncle Bill.
*/
public class Bill {
public static void main(String[] args) {
List<Double> firstList = new ArrayList<>();
List<Double> secondList = new ArrayList<>();
int max = 15;