Skip to content

Instantly share code, notes, and snippets.

View Kyeongan's full-sized avatar

Karl Kwon Kyeongan

View GitHub Profile
SELECT t_funding, mean_IF
FROM
(
SELECT google_id, name, h_index, min_year, max_year,
t_citations, max_citations, num_journals, mean_IF,
max_IF, num_grants, t_funding, t_deflated_funding, a.department, b.discipline
FROM s_faculty a INNER JOIN dept_disciplines b
ON a.department = b.department
) c
WHERE c.discipline =
# initialization file (not found)
function minimumMovement(obstacleLanes) {
// Write your code here
// console.log(obstacleLanes)
let currentLine = 2;
let total_move = 0;
var len = obstacleLanes.length;
var i = 0
for (i = 0; i < len; i++) {
let element = obstacleLanes[i]
@Kyeongan
Kyeongan / search_value_in_2d_array.py
Last active February 1, 2019 22:01
Write a function to return True or False if the target value is in the 2d array.
# Write a function to return True or False if the target value is in the 2d array.
data = [
[1, 3, 5, 7, 9, 10],
[3, 4, 6, 9, 10, 13],
[6, 8, 10, 12, 14, 16],
[10, 12, 14, 16, 18, 20],
[22, 23, 24, 25, 26, 27]
]
@Kyeongan
Kyeongan / minesweeper.py
Created March 7, 2019 15:50
minesweeper board generation and bomb generation.
import numpy as np;
ROW_COUNT = 5
COL_COUNT = 5
BOMES_COUNT = (ROW_COUNT * COL_COUNT) / 4
def create_board():
"""
create a board
"""
@Kyeongan
Kyeongan / .bashrc
Last active November 1, 2019 17:07
Bash config
export CLICOLOR=1
export LSCOLORS=ExFxBxDxCxegedabagacad
export HISTSIZE=10000
export PS1="\[\e[0;33m\]\u\[\e[0m\]@\[\e[0;32m\]\h\[\e[0m\]:\[\e[0;34m\]\w\[\e[0m\]\$ "
# PATH
export PATH=/Users/kkwon/Library/Python/2.7/bin:$PATH
export PATH="~/Downloads/applications/Sublime Text.app/Contents/SharedSupport/bin":$PATH
export PATH="~/Downloads/applications/Visual\ Studio\ Code.app/Contents/Resources/app/bin":$PATH
@Kyeongan
Kyeongan / config
Created January 13, 2020 03:11
ssh config
#This is my personal setting
#Github
Host github.com
HostName github.com
User git
IdentityFile ~/.ssh/id_rsa
#<CompanyName>
Host <CompanyName>
HostName bitbucket.org
@Kyeongan
Kyeongan / .zshrc
Last active December 4, 2020 20:40
Zsh config
# Shell History Increase
export HISTSIZE=100000
export HISTFILESIZE=100000
export HISTFILE=~/.zhistory
setopt HIST_FIND_NO_DUPS
setopt inc_append_history
setopt share_history
# Zsh Prompt
PROMPT="$fg[yellow]%}$USER@%{$fg[green]%}%m:%{$fg[blue]%}%~$fg[white]$ "
@Kyeongan
Kyeongan / custom_tooltip_in_nvd3.js
Last active November 29, 2022 10:04
Custom tooltip for nvd3
// custom tooltip example
chart.tooltip.contentGenerator(function (obj) {
var format = d3.format(",d");
return '<table><thead><tr><td class=x-value colspan=3><h1 class=tooltip>' + obj.data.name + '</h1></td></tr></thead>' +
'<tbody><tr><td class=key>Impact Factor:</td><td class=value>' + obj.data.meanIF + '</td></tr>' +
'<tr><td class=key>Citations:</td><td class=value>' + format(obj.data.meanCitations) + '</td></tr>' +
'<tr><td class=key>Funding:</td><td class=value>$' + format(obj.data.funding) + '</td></tr>' +
'</tbody></table>'
});