Notice
Recent Posts
Recent Comments
ยซ   2024/09   ยป
์ผ ์›” ํ™” ์ˆ˜ ๋ชฉ ๊ธˆ ํ† 
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30
Archives
Today
In Total
๊ด€๋ฆฌ ๋ฉ”๋‰ด

A Joyful AI Research Journey๐ŸŒณ๐Ÿ˜Š

[42] 230227 Ch. 3 ๋ผ์ฆˆ๋ฒ ๋ฆฌ ํŒŒ์ด๋ฅผ ์œ„ํ•œ ํŒŒ์ด์ฌ ๊ธฐ์ดˆ ๋ฐฐ์šฐ๊ธฐ: 5. ํŒŒ์ด์ฌ ํด๋ž˜์Šค์™€ ๋ชจ๋“ˆ [K-๋””์ง€ํ„ธ ํŠธ๋ ˆ์ด๋‹ 42์ผ] ๋ณธ๋ฌธ

๐ŸŒณBootcamp Revision 2023โœจ/Python, Flask, SQL

[42] 230227 Ch. 3 ๋ผ์ฆˆ๋ฒ ๋ฆฌ ํŒŒ์ด๋ฅผ ์œ„ํ•œ ํŒŒ์ด์ฌ ๊ธฐ์ดˆ ๋ฐฐ์šฐ๊ธฐ: 5. ํŒŒ์ด์ฌ ํด๋ž˜์Šค์™€ ๋ชจ๋“ˆ [K-๋””์ง€ํ„ธ ํŠธ๋ ˆ์ด๋‹ 42์ผ]

yjyuwisely 2023. 2. 27. 12:33

230227 Mon 42nd class

Ch. 3 ๋ผ์ฆˆ๋ฒ ๋ฆฌ ํŒŒ์ด๋ฅผ ์œ„ํ•œ ํŒŒ์ด์ฌ ๊ธฐ์ดˆ ๋ฐฐ์šฐ๊ธฐ
์ง„๋„: p. 101 ~ (๊ต์žฌ: IoT ์‚ฌ๋ฌผ์ธํ„ฐ๋„ท์„ ์œ„ํ•œ ๋ผ์ฆˆ๋ฒ ๋ฆฌํŒŒ์ด 4 ์ •์„, ์ €์ž: ์ตœ์ฃผํ˜ธ , ๊น€์žฌ๋ฒ” , ์ •๋™์ง„)
์ฐธ๊ณ  ๊ฐ€๋Šฅ ์ฑ…: ์™•์ดˆ๋ณด๋ฅผ ์œ„ํ•œ Python: ์‰ฝ๊ฒŒ ํ’€์–ด ์“ด ๊ธฐ์ดˆ ๋ฌธ๋ฒ•๊ณผ ์‹ค์Šต

๊ต์žฌ ์ฝ”๋“œ ๊นƒํ—ˆ๋ธŒ: https://github.com/codingspecialist/RaspberryPi4-Book-Example

๊ต์žฌ ์†Œ์Šค ๋ฐ PPT: http://jspstudy.co.kr/main/main.jsp
์ €์ž ์นดํŽ˜: https://cafe.naver.com/metacoding

 

IoT ์‚ฌ๋ฌผ์ธํ„ฐ๋„ท์„ ์œ„ํ•œ ๋ผ์ฆˆ๋ฒ ๋ฆฌํŒŒ์ด 4 ์ •์„ | ์ตœ์ฃผํ˜ธ - ๊ต๋ณด๋ฌธ๊ณ 

IoT ์‚ฌ๋ฌผ์ธํ„ฐ๋„ท์„ ์œ„ํ•œ ๋ผ์ฆˆ๋ฒ ๋ฆฌํŒŒ์ด 4 ์ •์„ | ใ€ŽIoT ์‚ฌ๋ฌผ์ธํ„ฐ๋„ท์„ ์œ„ํ•œ ๋ผ์ฆˆ๋ฒ ๋ฆฌํŒŒ์ด 4 ์ •์„ใ€์€ ์™•์ดˆ๋ณด๋„ ๋ผ์ฆˆ๋ฒ ๋ฆฌํŒŒ์ด๋ฅผ ์ด์šฉํ•ด ๋‹ค์–‘ํ•œ IoT๋ฅผ ์ง์ ‘ ๊ฐœ๋ฐœํ•  ์ˆ˜ ์žˆ๋„๋ก ์ „๊ธฐ์ „์ž ๊ธฐ์ดˆ ์›๋ฆฌ๋ถ€ํ„ฐ ์„ผ

product.kyobobook.co.kr

์˜ค๋Š˜ ๋ฐฐ์šด ๊ฒƒ ์ค‘ ๊ธฐ์–ตํ•  ๊ฒƒ์„ ์ •๋ฆฌํ–ˆ๋‹ค.


์ƒˆ๋กœ ์•Œ ๊ฒŒ ๋œ ๊ฒƒ

When the pass statement is executed, nothing happens, but you avoid getting an error when empty code is not allowed.

The __init__() Function

All classes have a function called __init__(), which is always executed when the class is being initiated.
Use the __init__() function to assign values to object properties, or other operations that are necessary to do when the object is being created:

์˜ˆ์ œ)

class Person:
  def __init__(self, name, age):
    self.name = name
    self.age = age

p1 = Person("John", 36)

print(p1.name)
print(p1.age)


๊ฒฐ๊ณผ) 

John
36

์ฐธ๊ณ : https://www.w3schools.com/python/python_classes.asp


Python Requests Module

The requests module allows you to send HTTP requests using Python. The HTTP request returns a Response Object with all the response data (content, encoding, status, etc).

The requests.Response() Object contains the server's response to the HTTP request.

์ฐธ๊ณ : https://www.w3schools.com/python/ref_requests_response.asp


Ch. 3 ๋ผ์ฆˆ๋ฒ ๋ฆฌ ํŒŒ์ด๋ฅผ ์œ„ํ•œ ํŒŒ์ด์ฌ ๊ธฐ์ดˆ ๋ฐฐ์šฐ๊ธฐ

์ฑ…์˜ ๋ชฉ์ฐจ
01 _ ํŒŒ์ด์ฌ ์‹œ์ž‘ํ•˜๊ธฐ
01-1 ํŒŒ์ด์ฌ ๊ฐœ์š”
01-2 ํŒŒ์ด์ฌ Windows ์„ค์น˜ํ•˜๊ธฐ
01-3 ํŒŒ์ด์ฌ์˜ ์ฃผ์„

02 _ ํŒŒ์ด์ฌ ์ž๋ฃŒํ˜•
02-1 ์ˆซ์žํ˜•
02-2 ๋ฌธ์žํ˜•
02-3 ๋ฆฌ์ŠคํŠธ
02-4 ํŠœํ”Œ
02-5 ๋”•์…”๋„ˆ๋ฆฌ

03 _ ํŒŒ์ด์ฌ ์ œ์–ด๋ฌธ

03-1 if๋ฌธ
03-2 for๋ฌธ
03-3 whie๋ฌธ
03-4 break๋ฌธ

04 _ ํŒŒ์ด์ฌ ํ•จ์ˆ˜ ์‚ฌ์šฉ๋ฒ•

04-1 ํ•จ์ˆ˜ ์„ ์–ธํ•˜๊ธฐ
04-2 ํ•จ์ˆ˜ ์ธ์ˆ˜ ์‚ฌ์šฉํ•˜๊ธฐ

05 _ ํŒŒ์ด์ฌ ํด๋ž˜์Šค์™€ ๋ชจ๋“ˆ

05-1 ํด๋ž˜์Šค
05-2 ๋ชจ๋“ˆ
05-3 ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ

5 ํŒŒ์ด์ฌ ํด๋ž˜์Šค์™€ ๋ชจ๋“ˆ p. 101

5.1 ํด๋ž˜์Šค

ํด๋ž˜์Šค
class A{

	์†์„ฑ
    ์ƒ์„ฑ์ž(๋ฉ”์„œ๋“œ์˜ ์ผ์ข…)
    ๋ฉ”์„œ๋“œ(๊ธฐ๋Šฅ)
    
}
๊ฐ์ฒด๋ฅผ ์ •์˜ํ•˜๋Š” ๋ฐ์ดํ„ฐ(์†์„ฑ)์™€ ์ด๋ฅผ ํ™œ์šฉํ•˜๋Š” ๊ธฐ๋Šฅ(๋ฉ”์„œ๋“œ)

ํด๋ž˜์Šค(class)๋Š” ํ”„๋กœ๊ทธ๋ž˜๋ฐ ๊ณผ์ •์—์„œ ๊ฐ์ฒด๋ฅผ ์ •์˜ํ•˜๋Š” ๋ฐ์ดํ„ฐ์™€ ์ด๋ฅผ ํ™œ์šฉํ•˜๋Š” ๊ธฐ๋Šฅ์„ ๊ฐ€์งˆ ์ˆ˜ ์žˆ๋Š” ๊ตฌ์กฐ๋ฅผ ์˜๋ฏธํ•œ๋‹ค.
๊ฐ ํด๋ž˜์Šค๋Š” ๊ฐ์ฒด์˜ ์ƒํƒœ๋ฅผ ์ •์˜ํ•  ์ˆ˜ ์žˆ๋Š” ์†์„ฑ(attributes)๊ณผ ๊ฐ์ฒด์˜ ๊ธฐ๋Šฅ์„ ์ •์˜ํ•˜๋Š” ๋ฉ”์„œ๋“œ(methods)๋ฅผ ๊ฐ€์งˆ ์ˆ˜ ์žˆ๋Š” ๊ตฌ์กฐ์ด๋‹ค.

์˜ˆ์ œ 1) ๊ฐ์ฒด์˜ ์†์„ฑ๊ณผ ๊ฐ์ฒด์˜ ๊ธฐ๋Šฅ์ธ ๋ฉ”์„œ๋“œ๊ฐ€ ์žˆ๋Š” ํด๋ž˜์Šค๋ฅผ ์„ ์–ธํ•˜๊ณ  ๊ทธ ํด๋ž˜์Šค๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ๊ฐ์ฒด๋ฅผ ์ƒ์„ฑํ•œ๋‹ค. 
์ง€์—ญ ๋ณ€์ˆ˜์˜ ์œ„์น˜๋Š” ์ƒ๊ด€์—†๋‹ค.
์ง€์—ญ๋ณ€์ˆ˜ ์•ž์— global ํ‚ค์›Œ๋“œ๊ฐ€ ์žˆ์œผ๋ฉด ์ „์—ญ๋ณ€์ˆ˜

class AutoMobile:
    #์†์„ฑ
    name = "" #์ž๋ฃŒํ˜•์ด ๋ฌธ์ž์—ด์ธ name ๋ณ€์ˆ˜ ์„ ์–ธ (์ง€์—ญ๋ณ€์ˆ˜)
    velocity = 0 #์ž๋ฃŒํ˜•์ด ์ •์ˆ˜์ธ velocity ๋ณ€์ˆ˜ ์„ ์–ธ (์ง€์—ญ๋ณ€์ˆ˜)
    # global a = 10 # ์ง€์—ญ๋ณ€์ˆ˜ ์•ž์— global ํ‚ค์›Œ๋“œ๊ฐ€ ์žˆ์œผ๋ฉด ์ „์—ญ๋ณ€์ˆ˜

    # #์ƒ์„ฑ์ž(๋ฉ”์„œ๋“œ์˜ ์ผ์ข…) (๋งค๊ฐœ๋ณ€์ˆ˜ ์—†์Œ)
    def __init__(self):
        self.name = "" 
        self.velocity = 0 
    #์ƒ์„ฑ์ž (๋งค๊ฐœ๋ณ€์ˆ˜ ์žˆ์Œ)    
    # def __init__(self, name, velocity): #๋งค๊ฐœ๋ณ€์ˆ˜ 2๊ฐœ์ธ ์ƒ์„ฑ์ž
    #     self.name = name
    #     self.velocity = velocity
    
    #๋ฉ”์„œ๋“œ
    def velocityPlus(self):
        self.velocity = self.velocity + 1
        print("์†๋„๋Š” %d ์ž…๋‹ˆ๋‹ค." % self.velocity)     
    def velocityDw(self):
        self.velocity = self.velocity -1
        if self.velocity < 0:
            self.velocity = 0
        print("์†๋„๋Š” %d ์ž…๋‹ˆ๋‹ค." % self.velocity)    

ac = AutoMobile() #AutoMobile ํด๋ž˜์Šค ๊ฐ์ฒด ์ƒ์„ฑ
ac.velocityPlus() #velocityPlus() ๋ฉ”์„œ๋“œ ํ˜ธ์ถœ (0+1=1) ์†๋„๋Š” 1 ์ž…๋‹ˆ๋‹ค.
ac.velocity = 20 #๊ฐ์ฒด ์†์„ฑ์— ๊ฐ’์„ ๋Œ€์ž…: velocity๋ณ€์ˆ˜์— 20 ๋Œ€์ž…
ac.velocityDw() #velocityDw() ๋ฉ”์„œ๋“œ ํ˜ธ์ถœ (20-1=19) ์†๋„๋Š” 19์ž…๋‹ˆ๋‹ค.


๊ฒฐ๊ณผ)

์†๋„๋Š” 1 ์ž…๋‹ˆ๋‹ค.
์†๋„๋Š” 19 ์ž…๋‹ˆ๋‹ค

์˜ˆ์ œ 2) ๊ฐ์ฒด ์ƒ์„ฑ์‹œ ํ˜ธ์ถœ๋˜๋Š” ํŠน์ˆ˜ ๋‚ด์žฅ ํ•จ์ˆ˜์ธ __init__()๊ณผ self ๊ธฐ๋Šฅ์„ ์‚ฌ์šฉํ•œ๋‹ค.
All classes have a function called __init__(), which is always executed when the class is being initiated.

class AutoMobile:
    #์†์„ฑ
    name = "" #์ž๋ฃŒํ˜•์ด ๋ฌธ์ž์—ด์ธ name ๋ณ€์ˆ˜ ์„ ์–ธ
    velocity = 0 #์ž๋ฃŒํ˜•์ด ์ •์ˆ˜์ธ velocity ๋ณ€์ˆ˜ ์„ ์–ธ

	#์ƒ์„ฑ์ž
    def __init__(self, str):#๊ฐ์ฒด ์ƒ์„ฑ ์‹œ ํ˜ธ์ถœ๋˜๋Š” ํŠน์ˆ˜ ๋‚ด์žฅ ํ•จ์ˆ˜, self๋Š” ๊ฐ์ฒด ์ž์‹ ์„ ์˜๋ฏธ
         self.name = str #str ๋ฌธ์ž์—ด์„ 02๋ผ์ธ์˜ name์— ๋Œ€์ž…
    
    #๋ฉ”์„œ๋“œ
    def velocityPlus(self):
        self.velocity = self.velocity + 1
    def velocityDw(self):
        self.velocity = self.velocity -1
        if self.velocity < 0:
            self.velocity = 0

ac = AutoMobile("์†Œ๋‚˜ํƒ€") #๋ฌธ์ž์—ด์„ ๋งค๊ฐœ๋ณ€์ˆ˜๋กœ ๊ฐ์ฒด๋ฅผ ์ƒ์„ฑ
ac.velocity = 20
ac.velocityPlus()
print(ac.name+"์˜ ์†๋„๋Š” %d ์ž…๋‹ˆ๋‹ค." % ac.velocity)

์•„๋ž˜๋Š” ์œ„์™€ ๊ฐ™์€ ์ž๋ฐ”์˜ ์ฝ”๋“œ์ด๋‹ค.
์ž๋ฐ”์—์„œ์˜ this๋Š” ํŒŒ์ด์ฌ์˜ self์ด๋‹ค.

class AutoMobile{
		//์†์„ฑ
		String name;
        int velocity;
        
        //์ƒ์„ฑ์ž (๋งค๊ฐœ๋ณ€์ˆ˜ ์—†์Œ)
        AutoMobile(){}
        
        //์ƒ์„ฑ์ž (๋งค๊ฐœ๋ณ€์ˆ˜ ์žˆ์Œ)
        AutoMobile(name, velocity){
        		this.name = name;
                this.velocity = velocity;
        }
        
        //๋ฉ”์„œ๋“œ
		void velocityPlus(){
        		velocity += 1; //velocity = velocity + 1
		void velocityDw(){
        		velocity -= 1; //velocity = velocity - 1
                if (velocity < 0){
                	velocity = 0;
                }
                printf("์†๋„๋Š” %d ์ž…๋‹ˆ๋‹ค.", velocity)
	}
}

class AutoMobileTest{
	public static void main(String[] args){
    		//๊ฐ์ฒด(AutoMobile ํด๋ž˜์Šค instance)
            Automobile ac = AutoMobile();
	}
}

๊ฒฐ๊ณผ)

์†Œ๋‚˜ํƒ€์˜ ์†๋„๋Š” 21 ์ž…๋‹ˆ๋‹ค.

5.2 ๋ชจ๋“ˆ

ํ•จ์ˆ˜์˜ ๋ชจ์Œ์ง‘
๋ณ€์ˆ˜๋‚˜ ํ•จ์ˆ˜ ๋˜๋Š” ํด๋ž˜์Šค๋ฅผ ๋ชจ์•„ ๋†“์€ ํŒŒ์ด์ฌ ํŒŒ์ผ

๋ชจ๋“ˆ์€ ๋ฏธ๋ฆฌ ์ž‘์„ฑ๋œ ํ•จ์ˆ˜ ์ฝ”๋“œ๋ฅผ ๋ชจ์•„ ๋†“์€ ํŒŒ์ด์ฌ ํŒŒ์ผ์ด๋‹ค. ๋ชจ๋“ˆํ™”๋ฅผ ํ†ตํ•ด์„œ ๋ฏธ๋ฆฌ ๊ตฌํ˜„๋œ ๋‹ค์–‘ํ•œ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋ฅผ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋‹ค. ๋˜๋Š” ์ง์ ‘ ๋ชจ๋“ˆ์„ ๊ฐœ๋ฐœํ•  ์ˆ˜๋„ ์žˆ์œผ๋ฉฐ ํŒŒ์ด์ฌ ๊ฐœ๋ฐœํ™˜๊ฒฝ์ด ๊ธฐ๋ณธ์ ์œผ๋กœ ์ œ๊ณตํ•˜๊ณ  ์žˆ๋Š” ๋‹ค์–‘ํ•œ ํŒŒ์ด์ฌ ๋ชจ๋“ˆ์„ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋‹ค.

์ฐธ๊ณ : https://wikidocs.net/77

ํŒŒ์ด์ฌ์—์„œ ๋ชจ๋“ˆ(module)์ด๋ž€ ํ•˜๋‚˜์˜ ํŒŒ์ด์ฌ ํŒŒ์ผ(.py ํŒŒ์ผ)์„ ์˜๋ฏธํ•ฉ๋‹ˆ๋‹ค.
๋˜ํ•œ ํŒจํ‚ค์ง€(package)๋ž€ ์ด๋Ÿฌํ•œ ๋ชจ๋“ˆ๋“ค์ด ์—ฌ๋Ÿฌ ๊ฐœ ๋ชจ์—ฌ์žˆ๋Š” ๊ฒƒ์„ ๊ฐ€๋ฆฌํ‚ต๋‹ˆ๋‹ค.

์˜ˆ์ œ 1) ๊ฐ„๋‹จํ•œ ์ผ๋ฐ˜ ํ•จ์ˆ˜ ์„ธ ๊ฐœ๋ฅผ ํฌํ•จํ•˜๊ณ  ์žˆ๋Š” ๋ชจ๋“ˆ์„ ๋งŒ๋“ ๋‹ค.

#ํ•˜๋‚˜์˜ ๋ชจ๋“ˆ์— 3๊ฐœ์˜ ํ•จ์ˆ˜๋ฅผ ์„ ์–ธ
def mydef01(): #ํ•จ์ˆ˜ ์„ ์–ธ
    print("์ผ๋ฐ˜ ํ•จ์ˆ˜์ž…๋‹ˆ๋‹ค.")

def mydef02(n):
    print(n * n * 3.14159)

def mydef03(n, m): #๋งค๊ฐœ๋ณ€์ˆ˜ ์žˆ๋Š” ํ•จ์ˆ˜ ์„ ์–ธ
    print(n * m)

 

์˜ˆ์ œ 2) ์ผ๋ฐ˜ ํ•จ์ˆ˜ ๋‘ ๊ฐœ๋ฅผ ์„ ์–ธํ•œ module01.py ๋ชจ๋“ˆ์„ ์‚ฌ์šฉํ•œ ์˜ˆ์ œ์ด๋‹ค.
ํŒŒ์ผ ์ด๋ฆ„์„ .py๋กœ ํ•ด์•ผ ์ •์ƒ์ ์œผ๋กœ ์ž‘๋™ํ•œ๋‹ค. 

import module01 #์‚ฌ์šฉ์ž ์ •์˜ ํ•จ์ˆ˜ ๊ฐ€์ ธ์˜จ๋‹ค.
import sys #๋‚ด์žฅ ํ•จ์ˆ˜ ๊ฐ€์ ธ์˜จ๋‹ค.
import math

#module01ํŒŒ์ผ์˜ mydef01ํ•จ์ˆ˜ ํ˜ธ์ถœ
module01.mydef01()
#module01ํŒŒ์ผ์˜ mydef02ํ•จ์ˆ˜ ํ˜ธ์ถœ
module01.mydef02(5)
#module01ํŒŒ์ผ์˜ mydef03ํ•จ์ˆ˜ ํ˜ธ์ถœ
module01.mydef03(10,20)

print("---------------------")
print(sys.builtin_module_names)
print(round(3.14))

๊ฒฐ๊ณผ)
(,) ํŠœํ”Œ ํ˜•์‹์œผ๋กœ ๋ณ€๊ฒฝ ๋ถˆ๊ฐ€๋Šฅ์ด๋‹ค. 

์ผ๋ฐ˜ ํ•จ์ˆ˜์ž…๋‹ˆ๋‹ค.
78.53975
200
---------------------
('_abc', '_ast', '_bisect', '_blake2', '_codecs', '_codecs_cn', '_codecs_hk', '_codecs_iso2022', '_codecs_jp', '_codecs_kr', '_codecs_tw', '_collections', '_contextvars', '_csv', '_datetime', '_functools', '_heapq', '_imp', '_io', '_json', '_locale', '_lsprof', '_md5', '_multibytecodec', '_opcode', '_operator', '_pickle', '_random', '_sha1', '_sha256', '_sha3', '_sha512', '_signal', '_sre', '_stat', '_statistics', '_string', '_struct', '_symtable', '_thread', '_tokenize', '_tracemalloc', '_typing', '_warnings', '_weakref', '_winapi', '_xxsubinterpreters', 'array', 'atexit', 'audioop', 'binascii', 'builtins', 'cmath', 'errno', 'faulthandler', 'gc', 'itertools', 'marshal',
'math', 'mmap', 'msvcrt', 'nt', 'sys', 'time', 'winreg', 'xxsubtype', 'zlib')
3

5.3 ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ

๋ณ€์ˆ˜๋‚˜ ํ•จ์ˆ˜ ๋˜๋Š” ํด๋ž˜์Šค ๋“ฑ์„ ๋ฏธ๋ฆฌ ๋งŒ๋“ค์–ด์„œ ๋ชจ์•„ ๋†“์€ ๊ฒƒ

๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋Š” ๋ชจ๋“ˆ๊ณผ ๋ชจ๋“ˆ์„ ๋ชจ์—ฌ์„œ ๋งŒ๋“  ๊ฐœ๋…์ด๋‹ค. ํŒŒ์ด์ฌ์„ ์„ค์น˜ํ•˜๋ฉด ์ž๋™์ ์œผ๋กœ ๋‚ด์žฅ๋ชจ๋“ˆ์„ ์ œ๊ณตํ•˜์ง€๋งŒ ์™ธ๋ถ€์—์„œ ์ œ๊ณต๋˜๋Š” ๋ชจ๋“ˆ๋„ ์กด์žฌํ•œ๋‹ค. ์™ธ๋ถ€์—์„œ ์ œ๊ณต๋˜๋Š” ๋ชจ๋“ˆ์„ ์‚ฌ์šฉํ•˜๋ ค๋ฉด ๋ผ์ด๋ธŒ๋ฒ„๋ฆฌ ์„ค์น˜๋ฅผ ํ•ด์•ผ ํ•œ๋‹ค.

c
md์—์„œ ์•„๋ž˜ ๋ช…๋ น์–ด๋ฅผ ์ž…๋ ฅํ•˜์—ฌ requests ์„ค์น˜๋ฅผ ์ง„ํ–‰ํ•œ๋‹ค.

TERMINAL์— ์ž…๋ ฅํ•œ๋‹ค.

pip install ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋ช…

requests๋ผ๋Š” ์™ธ๋ถ€ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋ฅผ ์„ค์น˜ํ•œ๋‹ค. requests๋Š” ์›น์— ๋Œ€ํ•ด ์š”์ฒญ์„ ํ•ด์„œ ๋ฐ์ดํ„ฐ๋ฅผ ๊ฐ€์ ธ์˜ค๋Š” ์—ญํ• ์„ ํ•˜๋Š” ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ์ด๋‹ค.

pip3 install requests


์˜ˆ์ œ )
 requests๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ์ง€์ •ํ•œ url์˜ ์š”์ฒญ ์ •๋ณด๋ฅผ ์ถœ๋ ฅํ•˜๋Š” ์˜ˆ์ œ์ด๋‹ค.
ํฌ๋กค๋ง: ๊ฐœ์ธ ํ˜น์€ ๋‹จ์ฒด์—์„œ ํ•„์š”ํ•œ ๋ฐ์ดํ„ฐ๊ฐ€ ์žˆ๋Š” ์›น(Web)ํŽ˜์ด์ง€์˜ ๊ตฌ์กฐ๋ฅผ ๋ถ„์„ํ•˜๊ณ  ํŒŒ์•…ํ•˜์—ฌ ๊ธ์–ด์˜ต๋‹ˆ๋‹ค. ์—ฌ๊ธฐ์„œ ๊ธ์–ด์˜จ๋‹ค๋Š” ์˜๋ฏธ๋Š” ๋ชจ๋‘ ๊ทธ๋Œ€๋กœ ๊ฐ€์ ธ์˜ค๋Š” ๊ฒƒ์„ ๋งํ•ฉ๋‹ˆ๋‹ค.

import requests
url = 'http://www.naver.com/'
movie = requests.get(url)
print(movie.text)

๊ฒฐ๊ณผ)

<!doctype html>                          <html lang="ko" data-dark="false"> <head> <meta charset="utf-8"> <title>NAVER</title> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=1190"> <meta name="apple-mobile-web-app-title" content="NAVER"/> <meta name="robots" content="index,nofollow"/> <meta name="description" content="๋„ค
์ด๋ฒ„ ๋ฉ”์ธ์—์„œ ๋‹ค์–‘ํ•œ ์ •๋ณด์™€ ์œ ์šฉํ•œ ์ปจํ…์ธ ๋ฅผ ๋งŒ๋‚˜ ๋ณด์„ธ์š”"/> <meta property="og:title" content="๋„ค์ด๋ฒ„"> <meta property="og:url" content="https://www.naver.com/"> <meta property="og:image" content="https://s.pstatic.net/static/www/mobile/edit/2016/0705/mobile_212852414260.png"> <meta property="og:description" content="๋„ค์ด๋ฒ„ ๋ฉ”์ธ์—์„œ ๋‹ค์–‘ํ•œ ์ •๋ณด์™€ ์œ ์šฉํ•œ ์ปจํ…์ธ ๋ฅผ ๋งŒ
๋‚˜ ๋ณด์„ธ์š”"/> <meta name="twitter:card" content="summary"> <meta name="twitter:title" content=""> <meta name="twitter:url"
content="https://www.naver.com/"> <meta name="twitter:image"
content="https://s.pstatic.net/static/www/mobile/edit/2016/0705/mobile_212852414260.png"> <meta name="twitter:description" content="๋„ค์ด๋ฒ„ ๋ฉ”์ธ์—์„œ ๋‹ค์–‘ํ•œ ์ •๋ณด์™€ ์œ ์šฉํ•œ ์ปจํ…์ธ ๋ฅผ ๋งŒ๋‚˜
๋ณด์„ธ์š”"/>  <link rel="stylesheet" href="https://pm.pstatic.net/dist/css/nmain.20221110.css"> <link rel="stylesheet" href="https://ssl.pstatic.net/sstatic/search/pc/css/sp_autocomplete_220526.css"> <link rel="shortcut icon" type="image/x-icon" href="/favicon.ico?1"/>  <link rel="apple-touch-icon" sizes="114x114" href="https://s.pstatic.net/static/www/u/2014/0328/mma_204243574.png"/> <link rel="apple-touch-icon" href="https://s.pstatic.net/static/www/u/2014/0328/mma_20432863.png"/> <script>window.nmain=window.nmain||{},window.nmain.supportFlicking=!1;var nsc="navertop.v4",ua=navigator.userAgent,useIeJSFlag="1";window.nmain.isIE="0"===useIeJSFlag,document.getElementsByTagName("html")[0].setAttribute("data-useragent",ua),window.nmain.isIE&&(Object.create=function(n){function e(){}return e.prototype=n,new e})</script> <script>var darkmode= false;window.naver_corp_da=window.naver_corp_da||{main:{}},window.naver_corp_da.main=window.naver_corp_da.main||{},window.naver_corp_da.main.darkmode=darkmode,window.gladsdk=window.gladsdk||{cmd:[]},window.gladsdk.cmd.push((function(){window.gladsdk.setHostMeta("theme",darkmode?"dark":"light")})),window.ndpsdk=window.ndpsdk||{cmd:[],polyfill:{cmd:[]}},window.ndpsdk.cmd.push((function(){window.ndpsdk.setHostMeta("theme",darkmode?"dark":"light")}))</script>  <script async src="https://ssl.pstatic.net/tveta/libs/glad/prod/gfp-core.js"></script> <script
async src="https://ssl.pstatic.net/tveta/libs/ndpsdk/prod/ndp-loader.js"></script>  <script> window.nmain.gv = {  isLogin: false,
useId: null,   daInfo: {"BEAUTY":{"menu":"BEAUTY","childMenu":"","adType":"singleDom","multiDomAdUrl":"","multiDomUnit":"","infoList":[{"adposId":"1000163","singleDomAdUrl":"https://siape.veta.naver.com/fxshow","param":{"da_dom_id":"p_main_beauty_1","tb":"BEAUTY_1","unit":"SU10595","calp":"-"},"type":{"position":"abs","positionIndex":4,"subject":"contents"},"dom":null},{"adposId":"1000164","singleDomAdUrl":"https://siape.veta.naver.com/fxshow","param":{"da_dom_id":"p_main_beauty_2","tb":"BEAUTY_1","unit":"SU10596","calp":"-"},"type":{"position":"abs","positionIndex":8,"subject":"contents"},"dom":null}]},"LIVING":{"menu":"LIVING","childMenu":"","adType":"singleDom","multiDomAdUrl":"","multiDomUnit":"","infoList":[{"adposId":"1000183","singleDomAdUrl":"https://siape.veta.naver.com/fxshow","param":{"da_dom_id":"p_main_living_1","tb":"LIVING_1","unit":"SU10597","calp":"-"},"type":{"position":"abs","positionIndex":4,"subject":"contents"},"dom":null},{"adposId":"1000184","singleDomAdUrl":"https://siape.veta.naver.com/fxshow","param":{"da_dom_id":"p_main_living_2","tb":"LIVING_1","unit":"SU10606","calp":"-"},"type":{"position":"abs","positionIndex":8,"subject":"contents"},"dom":null}]},"LIVINGHOME":{"menu":"LIVINGHOME","childMenu":"","adType":"singleDom","multiDomAdUrl":"","multiDomUnit":"","infoList":[{"adposId":"1000185","singleDomAdUrl":"https://siape.veta.naver.com/fxshow","param":{"da_dom_id":"p_main_livinghome_1","tb":"LIVINGHOME_1","unit":"SU10571","calp":"-"},"type":{"position":"abs","positionIndex":4,"subject":"contents"},"dom":null},{"adposId":"1000186","singleDomAdUrl":"https://siape.veta.naver.com/fxshow","param":{"da_dom_id":"p_main_livinghome_2","tb":"LIVINGHOME_1","unit":"SU10572","calp":"-"},"type":{"position":"abs","positionIndex":8,"subject":"contents"},"dom":null}]}},
svt: 20230227113346,
}; </script> <script> window.nmain.newsstand = {
rcode: '10140106',
newsCastSubsInfo: '',
newsStandSubsInfo: ''
};
window.etc = {  };
window.svr = "<!--aweb21-->"; </script> <script src="https://ssl.pstatic.net/tveta/libs/assets/js/pc/main/min/pc.veta.core.min.js" defer="defer"></script>   <script src="https://pm.pstatic.net/dist/js/external.2961eaa5.js?o=www" type="text/javascript" crossorigin="anonymous" defer="defer"></script> <script src="https://pm.pstatic.net/dist/js/preload.5fe99fda.js?o=www" type="text/javascript" crossorigin="anonymous" defer="defer"></script> <script src="https://pm.pstatic.net/dist/js/polyfill.f3c68d2d.js?o=www" type="text/javascript" crossorigin="anonymous" defer="defer"></script>  <script src="https://pm.pstatic.net/dist/js/vendors~more~nmain~notice~search~sidebar_notice.40da85e0.js?o=www" type="text/javascript" crossorigin="anonymous" defer="defer"></script>   <script src="https://pm.pstatic.net/dist/js/search.c0c3b1c5.js?o=www" type="text/javascript" crossorigin="anonymous" defer="defer"></script>  <script src="https://pm.pstatic.net/dist/js/vendors~more~nmain~sidebar_notice.7aad5e27.js?o=www" type="text/javascript" crossorigin="anonymous" defer="defer"></script> <script src="https://pm.pstatic.net/dist/js/nmain.e31af4db.js?o=www" type="text/javascript" crossorigin="anonymous" defer="defer"></script>
<style>:root{color-scheme:light}#_nx_kbd .setkorhelp a{display:none}</style> </head> <body> <div id="u_skip"> <a href="#newsstand"><span>๋‰ด์Šค์Šคํƒ ๋“œ ๋ฐ”๋กœ๊ฐ€๊ธฐ</span></a> <a href="#themecast"><span>์ฃผ์ œ๋ณ„์บ์ŠคํŠธ ๋ฐ”๋กœ๊ฐ€๊ธฐ</span></a> <a href="#timesquare"><span>ํƒ€์ž„์Šคํ€˜์–ด ๋ฐ”๋กœ๊ฐ€๊ธฐ</span></a> <a href="#shopcast"><span>์‡ผํ•‘์บ์ŠคํŠธ ๋ฐ”๋กœ๊ฐ€๊ธฐ</span></a> <a href="#account"><span>๋กœ๊ทธ์ธ ๋ฐ”๋กœ๊ฐ€๊ธฐ</span></a> </div> <div id="wrap">
<style>._1syGnXOL{padding-right:18px;font-size:14px;line-height:0;letter-spacing:-.25px;color:#000}._1syGnXOL span,._1syGnXOL strong{line-height:49px}._1syGnXOL:before{display:inline-block;content:"";vertical-align:top;background-image:url(https://static-whale.pstatic.net/main/sprite-20220527@2x.png);background-repeat:no-repeat;background-size:141px 112px;width:18px;height:18px;margin:16px 8px 0 0;background-position:-98px
0}[data-useragent*="MSIE 8"] ._1syGnXOL:before{background-image:url(https://static-whale.pstatic.net/main/sprite-20220527.png)}._1syGnXOL._3dsvmZg2:before{background-position:-47px -85px}._1syGnXOL._1NBFx1WK:before{width:20px;height:20px;margin:15px 8px 0 0;background-position:-21px -89px}._1syGnXOL._2mcQEKCd:before{width:22px;height:22px;margin:14px 7px 0 0;background-position:-47px -63px}._1syGnXOL._36slsKuJ:before{width:21px;height:49px;margin:0 14px 0 0;background-position:0 -63px}._1syGnXOL._3qlJVWzR:before{width:24px;height:49px;margin:0 10px 0 0;background-position:-117px 0}._1syGnXOL._3VkgqBXB:before{width:26px;height:49px;margin:0 10px 0 0;background-position:-116px -54px}._1syGnXOL._3di88A4c{padding-right:12px;font-size:17px}._1syGnXOL._3di88A4c:before{content:none}._1syGnXOL ._19K4X1CD{text-decoration:underline}._2aeXMlrb{display:inline-block;position:relative;font-size:12px;height:49px;width:78px;text-decoration:none;color:#fff;font-weight:700;letter-spacing:-.5px;vertical-align:top}._2aeXMlrb span{text-align:center;margin:9px 0;height:31px;display:block;line-height:31px;border-radius:15px}._2aeXMlrb span:before{display:inline-block;content:"";vertical-align:top;background-image:url(https://static-whale.pstatic.net/main/sprite-20220527@2x.png);background-repeat:no-repeat;background-size:141px 112px}[data-useragent*="MSIE 8"] ._2aeXMlrb span:before{background-image:url(https://static-whale.pstatic.net/main/sprite-20220527.png)}._2aeXMlrb.BMgpjddw{font-size:11px;width:94px}._2aeXMlrb.BMgpjddw span:before{margin:9px 3px 0 0;width:17px;height:13px;background-position:-89px -63px}._3h-N8T9V{position:absolute;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,0)}._1KncATpM{display:inline-block;content:"";vertical-align:top;background-image:url(https://static-whale.pstatic.net/main/sprite-20220527@2x.png);background-repeat:no-repeat;background-size:141px 112px;margin-top:14px;float:left;width:98px;height:21px;background-position:0 -21px}[data-useragent*="MSIE 8"] ._1KncATpM{background-image:url(https://static-whale.pstatic.net/main/sprite-20220527.png)}._1KncATpM._2v3uxv2x{background-position:0 0}._1KncATpM._1yl_Ow6o{background-position:0 -42px}._20PYt6lT{font-size:11px;height:49px;cursor:pointer;position:absolute;top:0;right:0;color:#666;opacity:.7}._20PYt6lT:after{width:15px;height:15px;margin-left:4px;background-position:-98px -33px;display:inline-block;content:"";vertical-align:top;background-image:url(https://static-whale.pstatic.net/main/sprite-20220527@2x.png);background-repeat:no-repeat;background-size:141px 112px}[data-useragent*="MSIE 8"] ._20PYt6lT:after{background-image:url(https://static-whale.pstatic.net/main/sprite-20220527.png)}._20PYt6lT._39oMCV2N:after{background-position:-98px -18px}._20PYt6lT._3MOWOORv{color:#c3c2c2}._20PYt6lT._3MOWOORv:after{background-position:-80px -85px}._20PYt6lT._3wm5EzmJ{color:#fff}._20PYt6lT._3wm5EzmJ:after{background-position:-65px -85px}._1hiMWemA{height:49px}._1hiMWemA .tY_u8r23{position:relative;width:1130px;margin:0 auto}._1hiMWemA .tY_u8r23 a{text-decoration:none}._1hiMWemA._23U_6TM_{position:relative}._1hiMWemA._23U_6TM_:after{position:absolute;z-index:1;content:"";display:block;width:100%;height:1px;bottom:0;background-color:rgba(0,0,0,.050980392156862744)}</style>
<div
id="NM_TOP_BANNER"
data-clk-prefix="top"
class="_1hiMWemA"
style="background-color: #fff7e1"
>
<div class="tY_u8r23">
<a
class="_3h-N8T9V"
href="https://whale.naver.com/ko/details/security/&wpid=RydDy7"
data-clk="dropbanner1a"
></a
><span
class="_1

๋ฌธ์ œ ํ’€์–ด๋ณด๊ธฐ)

 Q1. ํด๋ž˜์Šค, ๊ฐ์ฒด, ์ธ์Šคํ„ด์Šค์— ๋Œ€ํ•ด์„œ ์ •๋ฆฌํ•ด๋ณธ๋‹ค.
ํด๋ž˜์Šค class [1์žฅ 37์ชฝ] ๊ฐ์ฒด๋ฅผ ์ƒ์„ฑํ•˜๊ธฐ ์œ„ํ•œ ํ•„๋“œ์™€ ๋ฉ”์†Œ๋“œ๊ฐ€ ์ •์˜๋œ ๊ฒƒ. ๊ฐ์ฒด์˜ ์„ค๊ณ„๋„์— ํ•ด๋‹นํ•œ๋‹ค.

๊ฐ์ฒด object [6์žฅ 212์ชฝ] ๋ฌผ๋ฆฌ์ ์œผ๋กœ ์กด์žฌํ•˜๊ฑฐ๋‚˜ ์ถ”์ƒ์ ์œผ๋กœ ์ƒ๊ฐํ•  ์ˆ˜ ์žˆ๋Š” ๊ฒƒ ์ค‘์—์„œ ์ž์‹ ์˜ ์†์„ฑ์„ ๊ฐ€์ง€๊ณ  ์žˆ๊ณ  ๋‹ค๋ฅธ ๊ฒƒ๊ณผ ์‹๋ณ„ ๊ฐ€๋Šฅํ•œ ๊ฒƒ์„ ๋งํ•จ. ex) ์ž๋™์ฐจ, ์ž์ „๊ฑฐ, ์ฑ…, ์‚ฌ๋žŒ / ํ•™๊ณผ, ๊ฐ•์˜, ์ฃผ๋ฌธ ๋“ฑ...

์ธ์Šคํ„ด์Šค instance [6์žฅ 215์ชฝ] ํด๋ž˜์Šค๋กœ๋ถ€ํ„ฐ ๋งŒ๋“ค์–ด์ง„ ๊ฐ์ฒด

ํด๋ž˜์Šค : ๊ฐ์ฒด๋ฅผ ๊ตฌํ˜„ํ•˜๊ธฐ ์œ„ํ•œ ํ‹€, ์—ฐ๊ด€๋˜์–ด ์žˆ๋Š” ๋ณ€์ˆ˜์™€ ๋ฉ”์„œ๋“œ์˜ ์ง‘ํ•ฉ
๊ฐ์ฒด : ์†Œํ”„ํŠธ์›จ์–ด ์„ธ๊ณ„์— ๊ตฌํ˜„ํ•  ๋Œ€์ƒ

- ํด๋ž˜์Šค: ์„ค๊ณ„๋„๊ฐ€ ํด๋ž˜์Šค(class)์ด๋‹ค. ํด๋ž˜์Šค์—๋Š” ๊ฐ์ฒด๋ฅผ ์ƒ์„ฑํ•˜๊ธฐ ์œ„ํ•œ ํ•„๋“œ์™€ ๋ฉ”์„œ๋“œ๊ฐ€ ์ •์˜๋˜์–ด ์žˆ๋‹ค.
ํด๋ž˜์Šค๋ฅผ ์ธ์Šคํ„ด์Šคํ™”ํ•˜๋ฉด ๊ฐ์ฒด์ด๋‹ค. 
- ๊ฐ์ฒด: ์†์„ฑ๊ณผ ๋™์ž‘์„ ๊ฐ€์ง
- ์ธ์Šคํ„ด์Šค: ํด๋ž˜์Šค๋กœ๋ถ€ํ„ฐ ๋งŒ๋“ค์–ด์ง„ ๊ฐ์ฒด

class A: #ํด๋ž˜์Šค
	pass
    
#	์ธ์Šคํ„ด์Šค
#ํด๋ž˜์Šค---------->๊ฐ์ฒด

a = A() #๊ฐ์ฒด

Q2. ์‚ฌ๋žŒ (Human) ํด๋ž˜์Šค์— "์‘์• ์‘์• "๋ฅผ ์ถœ๋ ฅํ•˜๋Š” ์ƒ์„ฑ์ž๋ฅผ ์ถ”๊ฐ€ํ•œ๋‹ค.

areum = Human()
์‘์• ์‘์• 

class Human:
    #์†์„ฑ(๋ณ€์ˆ˜)
    #์ƒ์„ฑ์ž(์ดˆ๊ธฐํ™”ํ•จ์ˆ˜)
    def __init__(self):
    	print("์‘์• ์‘์• ")
	#ํ•จ์ˆ˜(๋ฉ”์„œ๋“œ)
def __init__(self,a):
	print(a)
    
Human("์‘์• ์‘์• ")

Q3. ์‚ฌ๋žŒ (Human) ํด๋ž˜์Šค์— (์ด๋ฆ„, ๋‚˜์ด, ์„ฑ๋ณ„)์„ ๋ฐ›๋Š” ์ƒ์„ฑ์ž๋ฅผ ์ถ”๊ฐ€ํ•˜์„ธ์š”. (=์ƒ์„ฑ์ž ์„ ์–ธ ๋งŒ๋“œ์‹œ์˜ค.)
areum = Human("์•„๋ฆ„", 25, "์—ฌ์ž") <-- ์ƒ์„ฑ์ž ํ˜ธ์ถœ

class Human:
    #์†์„ฑ
    name =""
    age = 0
    gender =""

    #์ƒ์„ฑ์ž
    def __init__(self, name, age, gender):
        self.name = name
        self.age = age
        self.gender = gender
        
areum = Human("์•„๋ฆ„", 25, "์—ฌ์ž")

Q4. 3๋ฒˆ์—์„œ ์ƒ์„ฑํ•œ ์ธ์Šคํ„ด์Šค์˜ ์ด๋ฆ„, ๋‚˜์ด, ์„ฑ๋ณ„์„ ์ถœ๋ ฅํ•˜์„ธ์š”.
์ด๋ฆ„: ์กฐ์•„๋ฆ„, ๋‚˜์ด: 25, ์„ฑ๋ณ„: ์—ฌ์ž

์กฐ์•„๋ฆ„
25
์—ฌ์ž

์ฝ”๋“œ)

class Human:
    #์†์„ฑ(๋ณ€์ˆ˜)
    name =""
    age = 0
    gender =""

    #์ƒ์„ฑ์ž(์ดˆ๊ธฐํ™”ํ•จ์ˆ˜)
    def __init__(self, name, age, gender):
        self.name = name
        self.age = age
        self.gender = gender
    #ํ•จ์ˆ˜(๋ฉ”์„œ๋“œ)    
    
areum = Human("์•„๋ฆ„", 25, "์—ฌ์ž")
print(areum.name)
print(areum.age)
print(areum.gender)

๊ฒฐ๊ณผ)

์•„๋ฆ„
25
์—ฌ์ž

Q5. ์‚ฌ๋žŒ(Human) ํด๋ž˜์Šค์—์„œ ์ด๋ฆ„, ๋‚˜์ด, ์„ฑ๋ณ„์„ ์ถœ๋ ฅํ•˜๋Š” who() ๋ฉ”์„œ๋“œ๋ฅผ ์ถ”๊ฐ€ํ•˜์„ธ์š”.
areum.who()
์ด๋ฆ„: ์กฐ์•„๋ฆ„, ๋‚˜์ด: 25, ์„ฑ๋ณ„: ์—ฌ์ž

class Human:
    #์†์„ฑ
    name =""
    age = 0
    gender =""

    #์ƒ์„ฑ์ž
    def __init__(self, name, age, gender):
        self.name = name
        self.age = age
        self.gender = gender

    #๋ฉ”์„œ๋“œ    
    def who(self):
        print("์ด๋ฆ„ : %s, ๋‚˜์ด : %d, ์„ฑ๋ณ„ : %s" % (self.name,self.age,self.gender))
        # print("์ด๋ฆ„: %s, " %areum.name 
        #       +"๋‚˜์ด: %d, " %areum.age
        #       +"์„ฑ๋ณ„: %s " %areum.gender)

areum = Human("์•„๋ฆ„", 25, "์—ฌ์ž")
areum.name = "์กฐ์•„๋ฆ„"
areum.age = 25
areum.gender = "์—ฌ์ž"
areum.who()

๊ฒฐ๊ณผ)

์ด๋ฆ„: ์กฐ์•„๋ฆ„ ๋‚˜์ด: 25 ์„ฑ๋ณ„: ์—ฌ์ž

728x90
๋ฐ˜์‘ํ˜•

'๐ŸŒณBootcamp Revision 2023โœจ > Python, Flask, SQL' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๋‹ค๋ฅธ ๊ธ€

[48] 230308 Ch. 6 Flask๋ฅผ ํ™œ์šฉํ•œ ์„ผ์„œ ์ œ์–ด: 5. Flask ์›นํŽ˜์ด์ง€, 6. IP, Port, Process ๊ฐœ๋… ์žก๊ธฐ, 7. cron๊ณผ daemon ๊ฐœ๋… ์žก๊ธฐ [K-๋””์ง€ํ„ธ ํŠธ๋ ˆ์ด๋‹ 48์ผ]  (1) 2023.03.08
[47] 230307 Ch. 6 Flask๋ฅผ ํ™œ์šฉํ•œ ์„ผ์„œ ์ œ์–ด: 1. Flask ์„ธํŒ…ํ•˜๊ธฐ, 2. Flask ์›น์„œ๋ฒ„ ๊ตฌ์ถ•ํ•˜๊ธฐ, 3. Flask ๋ผ์šฐํŒ…, 4. Flask LED ์ œ์–ดํ•˜๊ธฐ [K-๋””์ง€ํ„ธ ํŠธ๋ ˆ์ด๋‹ 47์ผ]  (0) 2023.03.07
[41] 230224 Ch. 3 ๋ผ์ฆˆ๋ฒ ๋ฆฌ ํŒŒ์ด๋ฅผ ์œ„ํ•œ ํŒŒ์ด์ฌ ๊ธฐ์ดˆ ๋ฐฐ์šฐ๊ธฐ: 3. ํŒŒ์ด์ฌ ์ œ์–ด๋ฌธ, 4. ํŒŒ์ด์ฌ ํ•จ์ˆ˜ ์‚ฌ์šฉ๋ฒ• [K-๋””์ง€ํ„ธ ํŠธ๋ ˆ์ด๋‹ 41์ผ]  (0) 2023.02.24
[40] 230223 Ch. 3 ๋ผ์ฆˆ๋ฒ ๋ฆฌ ํŒŒ์ด๋ฅผ ์œ„ํ•œ ํŒŒ์ด์ฌ ๊ธฐ์ดˆ ๋ฐฐ์šฐ๊ธฐ: 1. ํŒŒ์ด์ฌ ์‹œ์ž‘ํ•˜๊ธฐ, 2. ํŒŒ์ด์ฌ ์ž๋ฃŒํ˜• [K-๋””์ง€ํ„ธ ํŠธ๋ ˆ์ด๋‹ 40์ผ]  (1) 2023.02.23
Comments