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
Algorithm | Input Size | Input Type | Sorting Time | #Compare | #Access | |
---|---|---|---|---|---|---|
quickSort | 15 | random | 0.390538 | 572959 | 1519407 | |
quickSort | 16 | random | 0.788945 | 1199432 | 2991392 | |
quickSort | 17 | random | 1.763706 | 2644539 | 6656851 |
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
#!/usr/bin/env bash | |
# Download and install 3X: a Workbench for eXecuting eXploratory eXperiments | |
# Usage: curl -s https://gist.github.com/netj/9065580/raw/get-3x | bash -s release=LATEST dest=~/bin | |
set -eu | |
# export any given definition as arguments | |
export "$@" | |
# defaults to downloading the LATEST release, installing at $HOME/bin/ | |
: ${release:=LATEST} ${dest:=~/bin} |
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
#!/usr/bin/env bash | |
# A script for checking bandwidth of KAIST FTP's new network | |
# Usage: curl -sL https://gist.github.com/netj/5d95a999da6088c57f64/raw/ftp.kaist.ac.kr-bwtest.sh | bash -s [TIMEOUT] [PATH] | |
# | |
# Author: Jaeho Shin <netj@sparcs.org> | |
# Created: 2014-09-25 | |
set -eu | |
# ftp.kaist.ac.kr IPs | |
ipCurrent=143.248.234.110 |
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
#include <cassert> | |
int main() { | |
// The following line may crash the code | |
// Try: g++ assert.cc && ./a.out | |
assert(false); | |
// But only if it weren't compiled with NDEBUG macro defined. | |
// Now try: g++ -DNDEBUG assert.cc && ./a.out | |
return 0; | |
// See: http://en.cppreference.com/w/cpp/error/assert |
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 pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013) (format=pdflatex 2013.5.30) 7 JUN 2015 02:42 | |
entering extended mode | |
restricted \write18 enabled. | |
file:line:error style messages enabled. | |
%&-line parsing enabled. | |
**a.tex | |
(./a.tex | |
LaTeX2e <2011/06/27> | |
Babel <3.9f> and hyphenation patterns for 78 languages loaded. | |
(/opt/texlive/2013/texmf-dist/tex/latex/base/article.cls |
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
#!/usr/bin/env bash | |
# A script to create a Elasticsearch playground with GVim | |
set -eu | |
mkdir -p esplay.d | |
cd esplay.d | |
# prepare a query running script | |
echo >_search.sh '#!/usr/bin/env bash | |
set -eu |
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
#!/bin/bash | |
# take-a-break-with -- Take-a-Break script for the Mac user's health | |
# | |
# Schedule calling this script regularly from your crontab: | |
# | |
# */60 * * * * take-a-break-with Dashboard | |
# | |
# When a Growl bubble comes up, click it and take a break! :) | |
# | |
# You need to get and install Growl from: http://growl.info/ |
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
#!/bin/bash | |
# The "Blinker" (or "깜빡이" in Korean) for Mac | |
# an effective tool for instilling vocabularies into your brain | |
# | |
# Usage: blinker [-OPTION...] SET... | |
# | |
# SET is the path to a file where each of its line contains a word and its | |
# definition separated by tab character. You can get lots of quality sets | |
# from http://quizlet.com/. | |
# |
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
#!/usr/bin/env bash | |
# git-mark-empty-dirs -- Mark empty dirs in a git repo with .gitignore files | |
# Author: Jaeho Shin <netj@sparcs.org> | |
# Created: 2009-12-03 | |
set -e | |
remove-or-mark() { | |
local d=$1; shift | |
interact() { | |
echo "Found empty dir: \`$d'" |
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
#!/usr/bin/env bash | |
# customize -- Substitute contents and names of given files | |
# | |
# Usage: | |
# customize DEST [FILE...] <<RULES | |
# Name=Foo | |
# Version=1.0 | |
# RULES | |
# | |
# |
OlderNewer