This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ffmpeg commend for generating gif | |
https://www.ffmpeg.org/ | |
ffmpeg -i input.mov -vf scale=1000:-1 -r 10 -f image2pipe -vcodec ppm - | convert -delay 5 -loop 0 - output.gif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Shell History Increase | |
export HISTSIZE=100000 | |
export HISTFILESIZE=100000 | |
export HISTFILE=~/.zhistory | |
setopt HIST_FIND_NO_DUPS | |
setopt inc_append_history | |
setopt share_history | |
PROMPT='%{$fg[yellow]%}$USER@%{$fg[green]%}%m:%{$fg[blue]%}%~%{$fg[white]%}$ ' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#This is my personal setting | |
#Github | |
Host github.com | |
HostName github.com | |
User git | |
IdentityFile ~/.ssh/id_rsa | |
#<CompanyName> | |
Host <CompanyName> | |
HostName bitbucket.org |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np; | |
ROW_COUNT = 5 | |
COL_COUNT = 5 | |
BOMES_COUNT = (ROW_COUNT * COL_COUNT) / 4 | |
def create_board(): | |
""" | |
create a board | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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] | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# initialization file (not found) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 = |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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>' | |
}); |