Skip to content

Instantly share code, notes, and snippets.

View chkwon's full-sized avatar

Changhyun Kwon chkwon

View GitHub Profile
@chkwon
chkwon / latex-quick-start.tex
Created October 31, 2014 18:16
A quick start for LaTeX beginners
\documentclass[letterpaper, 11pt]{article}
\usepackage{amsmath}
\title{This is the title of this document.}
\author{Changhyun Kwon}
\date{October 31, 2014}
\begin{document}
@chkwon
chkwon / myxhtml.cfg
Last active August 29, 2015 14:09
LaTeX to html conversation setting file for htlatex (htlatex filename.tex myxhtml)
\Preamble{xhtml}
\Configure{$}{\PicMath}{\EndPicMath}{}
\Configure{PicMath}{}{}{}{class=’’math’’; align=’’absmiddle’’}
\Configure{graphics*}
{pdf}
{\Needs{"convert \csname Gin@base\endcsname.pdf
\csname Gin@base\endcsname.png"}%
\Picture[pict]{\csname Gin@base\endcsname.png}%
\special{t4ht+@File: \csname Gin@base\endcsname.png}
}
@chkwon
chkwon / jump_gurobi.jl
Created March 21, 2015 04:48
Simple Gurobi Test
using JuMP, Gurobi
m = Model(solver=GurobiSolver())
@defVar(m, x <= 5)
@defVar(m, y >= 45)
@setObjective(m, Min, x + y)
@addConstraint(m, 50x + 24y <= 2400)
@addConstraint(m, 30x + 33y <= 2100)
status = solve(m)
println("Optimal objective: ", getObjectiveValue(m))
@chkwon
chkwon / jump_cplex.jl
Created March 21, 2015 04:53
Simple CPLEX Test
using JuMP, CPLEX
m = Model(solver=CplexSolver())
@defVar(m, x <= 5)
@defVar(m, y <= 45)
@setObjective(m, Min, x + y)
@addConstraint(m, 50x + 24y <= 2400)
@addConstraint(m, 30x + 33y <= 2100)
status = solve(m)
println("Optimal objective: ",getObjectiveValue(m))
\documentclass[11pt]{article}
\usepackage{layouts}
\begin{document}
default baselineskip: \the\baselineskip
\drawfontframelabel{ g x N h }
\drawfontframelabel{ g x N h ( ) }
@chkwon
chkwon / shadow_price.jl
Last active October 18, 2019 01:01
Shadow Price for LP problems in Julia
using JuMP, GLPK
m = Model(with_optimizer(GLPK.Optimizer))
@variable(m, x1 >= 0)
@variable(m, x2 >= 0)
@objective(m, Max, 3x1 + 5x2)
@constraint(m, c1, x1 <= 4)
@constraint(m, c2, 2x2 <= 12)
@constraint(m, c3, 3x1 + 2x2 <= 18)
optimize!(m)
@chkwon
chkwon / The Transportation Problem.ipynb
Created November 12, 2019 14:38
The Transportation Problem
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@chkwon
chkwon / The Transportation Problem.ipynb
Last active November 7, 2020 04:15
The Transportation Problem (simple example)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@chkwon
chkwon / coverage.ipynb
Last active March 28, 2022 22:41
Cover alphabets by five-letter words
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.