Skip to content

Instantly share code, notes, and snippets.

View wookay's full-sized avatar
📟
갛낲닽랔맟밪상앗잡참칼탇판학

WooKyoung Noh wookay

📟
갛낲닽랔맟밪상앗잡참칼탇판학
View GitHub Profile
# 종합소득세 검산 https://www.facebook.com/seungjoon.choi/posts/10224347898020604
julia> 수입금액 = [250_000, 500_000, 750_000]
3-element Vector{Int64}:
250000
500000
750000
julia> 경비율 = [0.587, 0.617, 0.723] # 단순경비율 적용
3-element Vector{Float64}:
@wookay
wookay / mana.jl
Last active August 12, 2020 16:19
### Multi-dimensional Arrays
julia> ma = [[1,2] [3, 4]]
2×2 Array{Int64,2}:
1 3
2 4
julia> ma == hcat([1,2], [3,4]) == [1 3; 2 4]
true
@wookay
wookay / auth.jl
Last active January 17, 2020 12:00
bukdu auth
# https://github.com/wookay/Bukdu.jl/tree/master
using Bukdu
struct Authorization <: Plug.AbstractPlug
end
function user_authorized(conn::Conn)
conn.params[:pass] == "1"
end
@wookay
wookay / thinking.jl
Last active November 14, 2019 13:19
thinking.jl
🤔= 3
println(2🤔)
using Bukdu
struct RestController <: ApplicationController
conn::Conn
end
function long(c::RestController)
sleep(3)
render(JSON, 10)
end
@wookay
wookay / 1059472.jl
Last active June 21, 2019 05:36
1059472
# https://gall.dcinside.com/board/view/?id=programming&no=1059472
using JuMP, GLPK
model = Model(with_optimizer(GLPK.Optimizer))
@variable(model, 🐛 )
@variable(model, 🌺 )
@variable(model, ⏱ )
@constraint(model, 🐛 + 🌺 + 🐛 + 🌺 + 🐛 + 🌺 == 21)
@wookay
wookay / build.log
Created April 23, 2019 04:23
Mongoc build.log
[ Info: Directory E:\home\dev\Mongoc\deps\usr\bin does not exist!
┌ Warning: Could not extract the platform key of https://github.com/felipenoris/mongo-c-driver-builder/releases/download/v1.14.0_1/mongo-c-driver-builder.v1.14.0.x86_64-windows.tar.gz; continuing...
└ @ BinaryProvider E:\home\dev\BinaryProvider\src\Prefix.jl:185
[ Info: Downloading https://github.com/felipenoris/mongo-c-driver-builder/releases/download/v1.14.0_1/mongo-c-driver-builder.v1.14.0.x86_64-windows.tar.gz to E:\home\dev\Mongoc\deps\usr\downloads\mongo-c-driver-builder.v1.14.0.x86_64-windows.tar.gz...
[ Info: No hash cache found
[ Info: Calculated hash 04b5eb428568797545136f6a4a07af4c0f00235d0a6182042e5eb21e562dbaeb for file E:\home\dev\Mongoc\deps\usr\downloads\mongo-c-driver-builder.v1.14.0.x86_64-windows.tar.gz
[ Info: Installing E:\home\dev\Mongoc\deps\usr\downloads\mongo-c-driver-builder.v1.14.0.x86_64-windows.tar.gz into E:\home\dev\Mongoc\deps\usr
[ Info: Found a valid dl path concrt140.dll while looking for libmongoc
[ Info: Fou
@wookay
wookay / example.jl
Created February 11, 2019 19:31
example.jl
using HTTP
using HTTP.Messages: setheader
using Sockets
index = HTTP.Handlers.RequestHandlerFunction() do req
resp = req.response
setheader(resp, "Access-Control-Allow-Origin" => "*")
resp.body = Vector{UInt8}("ok")
@info :resp resp
resp
# module Jive
using Distributed # nprocs addprocs rmprocs
"""
runtests(dir::String)
run the test files from the specific directory.
"""
function runtests(dir::String)
@wookay
wookay / cmd.sh
Last active January 20, 2018 13:45
gist cmd.sh for Bukdu on Julia 0.6
cd /home/ubuntu/
wget https://julialang-s3.julialang.org/bin/linux/x64/0.6/julia-0.6.2-linux-x86_64.tar.gz
tar xvzf julia-0.6.2-linux-x86_64.tar.gz -C /home/ubuntu/
mkdir -p /home/ubuntu/.julia/v0.6/
cd /home/ubuntu/.julia/v0.6/
git clone https://github.com/JuliaLang/METADATA.jl.git METADATA
git clone https://github.com/JuliaLang/BinDeps.jl.git BinDeps