Skip to content

Instantly share code, notes, and snippets.

View sohnryang's full-sized avatar
🍟
Potato inside

Ryang Sohn sohnryang

🍟
Potato inside
View GitHub Profile
@sohnryang
sohnryang / level1.rb
Created February 26, 2017 03:15
Rubywarrior level 1
class Player
def play_turn(warrior)
warrior.walk!
end
end
@sohnryang
sohnryang / level2.rb
Created February 26, 2017 03:18
Rubywarrior level 2
class Player
def play_turn(warrior)
if warrior.feel.empty?
warrior.walk!
else
warrior.attack!
end
end
end
@sohnryang
sohnryang / level3.rb
Created February 26, 2017 03:21
Rubywarrior level 3
class Player
def play_turn(warrior)
if warrior.feel.empty?
if warrior.health < 20
warrior.rest!
else
warrior.walk!
end
else
warrior.attack!
@sohnryang
sohnryang / level4.rb
Created February 26, 2017 03:40
Rubywarrior level 4
class Player
def play_turn(warrior)
if warrior.feel.empty?
if warrior.health < 20 && @health <= warrior.health
warrior.rest!
else
warrior.walk!
end
else
warrior.attack!
@sohnryang
sohnryang / .minttyrc
Created June 21, 2017 03:47
my mintty config file
ForegroundColour=238,232,213
BackgroundColour=0,53,65
CursorColour=220,50,47
Black=0,53,65
BoldBlack=0,40,52
Red=203,76,22
BoldRed=220,50,46
Green=133,153,1
BoldGreen=88,110,117

λ¬΄ν•œμƒμƒ 파이썬 κ°•μ˜ - 0μ°¨μ‹œ

![파이썬 둜고][0]

무엇을 λ°°μš°λ‚˜μš”?

이 κ°•μ˜μ—μ„œλŠ” νŒŒμ΄μ¬μ„ 톡해 코딩을 ν•˜λŠ” 법을 λ°°μ›λ‹ˆλ‹€. 이 κ°•μ˜μ˜ λ§ˆμ§€λ§‰ λΆ€λΆ„μ—μ„œλŠ” κ°„λ‹¨ν•œ κ²Œμž„μ„ λ§Œλ“€ κ²ƒμ΄κ΅¬μš”, μ—¬λŸ¬λΆ„μ€ νŒŒμ΄μ¬μ„ 톡해 마음만 먹으면 데이터 뢄석, ν•΄ν‚Ή, λ¨Έμ‹  λŸ¬λ‹ 등을 ν•  수 있게 될 κ²λ‹ˆλ‹€.

νŒŒμ΄μ¬μ€ λ¬΄μ—‡μΈκ°€μš”?

λ¬΄ν•œμƒμƒ 파이썬 κ°•μ˜ - 1μ°¨μ‹œ

이번 κ°•μ˜μ—μ„œλŠ” μ‹€μ œλ‘œ 파이썬으둜 코딩을 ν•˜κΈ° μœ„ν•΄ νŒŒμ΄μ¬μ„ μ„€μΉ˜ν•˜λŠ” 법을 배울 κ±°κ΅¬μš”, κ°„λ‹¨ν•œ Hello, world! ν”„λ‘œκ·Έλž¨μ„ λ§Œλ“€ κ²ƒμž…λ‹ˆλ‹€.

파이썬 μ„€μΉ˜ν•˜κΈ°

νŒŒμ΄μ¬μ€ macOS, Linux, Windows λ“±μ˜ μ—¬λŸ¬ κ°€μ§€ OS와 CPU νƒ€μž…(ARMμš©λ„ μžˆλ”λΌκ΅¬μš”)λ₯Ό μ§€μ›ν•©λ‹ˆλ‹€. 이번 κ°•μ˜μ—μ„œλŠ” μ‚¬μš©μžμˆ˜κ°€ κ°€μž₯ λ§ŽκΈ°λ„ ν•˜κ³ , 학ꡐ μ»΄ν“¨ν„°μ˜ OS이기도 ν•œ Windowsλ₯Ό κΈ°μ€€μœΌλ‘œ μ„€λͺ…ν•˜κ² μŠ΅λ‹ˆλ‹€.

USB에 μ„€μΉ˜?

미둜 생성기

μ„€λͺ…

미둜λ₯Ό μžλ™μœΌλ‘œ μƒμ„±ν•˜λŠ” turtlecraft([codingmath.xyz][0]) JS μ½”λ“œμ΄λ‹€.

원리

μš°μ„  미둜λ₯Ό λ§Œλ“€μ–΄λ‚΄λŠ”λ° μ‚¬μš©ν•  수 μžˆλŠ” μ•Œκ³ λ¦¬μ¦˜μ΄ λ§Žλ‹€. (ꡬ글에 maze generation algorithm 이라고 치면 λ§Žμ€ μ•Œκ³ λ¦¬μ¦˜μ„ λ³Ό 수 μžˆλ‹€.) λ‚˜λŠ” μ—¬κΈ°μ„œ κ°„λ‹¨ν•œ DFS(깊이 μš°μ„  탐색) μ•Œκ³ λ¦¬μ¦˜μ„ μ‚¬μš©ν•˜μ˜€λ‹€.

@sohnryang
sohnryang / data.json
Created April 7, 2018 10:49
test data for hashcode question
[{"이름": "λ ˆμ˜€λ„¬", "μ†Œμ†": "λ°”λ₯΄μ…€λ‘œλ‚˜", "ν¬μ§€μ…˜": "곡격"}, {"이름": "ν˜Έλ‚ λ‘", "μ†Œμ†": "λ ˆμ•Œλ§ˆλ“œλ¦¬λ“œ", "ν¬μ§€μ…˜": "곡격"}]
@sohnryang
sohnryang / hello.aheui
Created October 3, 2018 16:26
아희 ν—¬λ‘œμ›”λ“œ
λ°£λ°‘λ”°λ§£λ°˜λ°œλ”°λΉ λ”°λ°˜λ°§λ‚˜λ‹€λ­
λšœλ»λ»λ– λ²…λ²Œλ©“λ©“λ»λ– λ²‹λ– λ»λ²–
λ‹€λ°˜λ°§λ‚˜λ‹€λ§£λ°€λΉ λ°œλ°•λ”°λ”°λ‹€λ­
λ­ν„°λ„ˆλ²—λ²ˆλ– λ²‹λ– λ²Œλ²“λ©“λ– λ²“λ²”
λ°œλ°§λ”°λΉ λΉ λ”°λ‹€λ°˜λ°§λ‚˜λ‹€λ§£λ°œλΆ
뭏떠벋떠뻐벖멓더범더떠뻐뻐떠
λ°œλ°˜λ”°λΉ λ”°λ§£λ°›λΉ λ°œλ°•λ”°λ”°λ‹€λ­
ν—ˆμ–΄μ–΄μ–΄μ–΄μ–΄μ–΄μ–΄μ–΄μ–΄λ©“λ– λ²…λ²Œ