Skip to content

Instantly share code, notes, and snippets.

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

WooKyoung Noh wookay

📟
갛낲닽랔맟밪상앗잡참칼탇판학
View GitHub Profile
@wookay
wookay / dog.java
Created August 13, 2017 06:30
oop dogs
public class Dog
{
//Instance vars
private String name;
private Int age;
//constructor
public Dog(String initName)
{
name = initName;
@wookay
wookay / cmd.sh
Last active September 20, 2016 10:42
ecto.jl build deps
cd /home/ubuntu/
wget https://julialang.s3.amazonaws.com/bin/linux/x64/0.5/julia-0.5.0-linux-x86_64.tar.gz
tar xvzf julia-0.5.0-linux-x86_64.tar.gz -C /home/ubuntu/
mkdir -p /home/ubuntu/.julia/v0.5/
cd /home/ubuntu/.julia/v0.5/
git clone https://github.com/JuliaLang/METADATA.jl.git METADATA
git clone https://github.com/wookay/Ecto.jl.git Ecto
@wookay
wookay / cmd.sh
Last active September 20, 2016 10:41
circleci bukdu
cd /home/ubuntu/
wget https://julialang.s3.amazonaws.com/bin/linux/x64/0.5/julia-0.5.0-linux-x86_64.tar.gz
tar xvzf julia-0.5.0-linux-x86_64.tar.gz -C /home/ubuntu/
mkdir -p /home/ubuntu/.julia/v0.5/
cd /home/ubuntu/.julia/v0.5/
git clone https://github.com/JuliaLang/METADATA.jl.git METADATA
git clone https://github.com/JuliaLang/BinDeps.jl.git BinDeps
@wookay
wookay / showtypetree.jl
Last active January 5, 2019 09:01
showtypetree
# https://en.wikibooks.org/wiki/Introducing_Julia/Types
level = 0
function showtypetree(subtype)
global level
subtypelist = filter(asubtype -> asubtype != Any, subtypes(subtype))
if length(subtypelist) > 0
println("\t" ^ level, subtype)
level += 1
map(showtypetree, subtypelist)
@wookay
wookay / cp949.md
Last active February 25, 2016 11:53
parse cp949 csv

iconv 설치

http://gnuwin32.sourceforge.net/packages/libiconv.htm 에서 Complete package, except sources Setup 969371 14 October 2004 e0217c09792beec74578516d9fff55c 요거 받으시면 됩니다.

StringEncodings.jl 설치

julia> Pkg.clone("https://github.com/nalimilan/StringEncodings.jl.git")
julia> Pkg.build("StringEncodings")
import Foundation
class TestTranslate: WTestCase {
func test_locales() {
let en = NSLocale(localeIdentifier: "en_US")
Assert.equal("just now", en.translate("just now"))
let ko = NSLocale(localeIdentifier: "ko_KR")
Assert.equal("방금", ko.translate("just now"))
import Foundation
class TestDates: WTestCase {
func test_dates() {
Assert.equal("ko", NSLocale.currentLocale().languageCode)
let d = NSDate(year: 2016, month: 2, day: 5, hour: 13, min: 2, sec: 3)
Assert.equal("", d.string(.NoStyle))
Assert.equal("2016. 2. 5. 오후 1:02", d.string(.ShortStyle))
@wookay
wookay / TestSys.swift
Created January 30, 2016 02:58
TestSys.swift
//
// TestSys.swift
// Test
//
// Created by wookyoung on 1/29/16.
// Copyright © 2016 factorcat. All rights reserved.
//
import Foundation
@wookay
wookay / kangxi.jl
Created December 11, 2015 10:15
private project test
using KangXi
using FileTools
using Base.Test
db = mapper(f"2500.json", (:id, :hanja, :pinyin))
@test [5] == find(:id=>5, db)
@test [1,2,3,4,5] == find(d->d[:id]<=5, db)
# λ ~/.julia/v0.5/KangXi/test master julia runtests.jl
# Test Summary: | Pass Total
for filename in readdir(".")
if contains(filename, ".mpg")
mp3 = replace(filename, ".mpg", ".mp3")
if !isfile(mp3)
println("ffmpeg -i $filename -vn -ar 44100 -ac 2 -ab 192 -f mp3 $mp3")
end
end
end