Skip to content

Instantly share code, notes, and snippets.

View onemira's full-sized avatar
🎯
Focusing

Mira Kang onemira

🎯
Focusing
View GitHub Profile
@onemira
onemira / gist:0feb4f2e77922ff73ece8044e7a72f1a
Created February 11, 2019 23:07
Kata: Volume of a Cuboid
var Kata;
Kata = (function() {
function Kata() {}
Kata.getVolumeOfCuboid = function(length, width, height)
{return length * width * height};
return Kata;
1. Create a database: createdb company_database
2. Create a table: psql company_database
3. Add the following columns to the table, Use your best judgement for data types
Ruby
id (Primary Key)
full_name
salary
position
#1. we remember a is 1
#2. we remember b is 100
#3. we remember z is _____ (guess)
#4. we tell the user we are going to guess a number between "a" and "b"
#5. user chooses number
#6. we remember our guess is (a+b)/2
#7. tell the user that we are guessing the number "guess"
#8. user chooses yes/no
#9. If user chooses yes
#then say we got it in z guesses
1. In your Company Database, add a table named:departments
Select * from departments;
+---------------+-------------------+------------------+
| depart_name | employee_number | departments_id |
|---------------+-------------------+------------------|
| sales | 10 | 1 |
| logistics | 50 | 2 |
| HR | 37 | 3 |
+---------------+-------------------+------------------+
def flatten_and_sort(array)
array.flatten.sort
end
@onemira
onemira / sec1-project.ipynb
Last active December 13, 2021 08:26
SEC1-Project.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@onemira
onemira / deep_learning.rd
Last active February 22, 2022 05:06
deep_learning
WRAP-UP
λ”₯λŸ¬λ‹: ν•˜λ“œμ›¨μ–΄ 상ν–₯(λ©”λͺ¨λ¦¬, gpu) 빅데이터, μ•Œκ³ λ¦¬μ¦˜ ν–₯상
PERCEPTRON:
- an algorithm for supervised learning of binary classifiers
- a type of linear classifier
- 인간 λ‡Œλ₯Ό ν‰λ‚΄λ‚΄λŠ” 인곡신경망 + λ‹€μ–‘ν•œ λ¨Έμ‹ λŸ¬λ‹ μ•Œκ³ λ¦¬μ¦˜
- λ‰΄λŸ°: 인간이 μˆ˜ν–‰ν•˜λŠ” μƒκ°ν•˜κ³  배우고 μ°½μ‘°ν•˜κ³  κΈ°μ–΅ν•˜κ³  느끼고 μ•„νŒŒν•˜λŠ” 일에 관여함
- ν•˜λ‚˜μ— μƒ˜ν”Œμ΄ μ–΄λ–€ ν΄λž˜μŠ€μ— μ†ν•΄μžˆλŠ”μ§€ μ˜ˆμΈ‘ν•˜λŠ”λ° μ‚¬μš©!!!
@onemira
onemira / training_neural_network.rd
Last active February 24, 2022 00:36
training_neural_network
Level 1 : Lecture Note 에 μžˆλŠ” μ£Όμš” κ°œλ…μ„ μ„€λͺ…ν•  수 있으며 예제 μ½”λ“œλ₯Ό μ΄ν•΄ν•˜κ³  μž¬ν˜„ν•  수 μžˆμŠ΅λ‹ˆλ‹€.
신경망이 ν•™μŠ΅λ˜λŠ” λ©”μ»€λ‹ˆμ¦˜(μˆœμ „νŒŒ, 손싀 계산, μ—­μ „νŒŒ)에 λŒ€ν•΄ μ μ ˆν•œ λΉ„μœ λ₯Ό λ“€μ–΄ μ„€λͺ…ν•  수 μžˆμŠ΅λ‹ˆλ‹€.
1) μˆœμ „νŒŒ (Forward Propagation)
- μž…λ ₯μΈ΅ -> μ€λ‹‰μΈ΅μ˜ μ—°μ‚°(κ°€μ€‘μΉ˜-편ν–₯(가쀑합) μ—°μ‚° + ν™œμ„±ν™” ν•¨μˆ˜) -> 좜λ ₯측으둜 값을 λ‚΄λ³΄λ‚΄λŠ” κ³Όμ •
2) 손싀 계산 (Loss Function)
- 좜λ ₯κ°’ + λ°μ΄ν„°μ˜ νƒ€κ²Ÿκ°’μ„ 손싀 ν•¨μˆ˜μ— λ„£μ–΄ 손싀(loss or error)λ₯Ό 계산
- MSE(Mean-squared error) CEE(Cross-entropy error)