์ „์ฒด๋ณด๊ธฐ 182

๋ˆ„๊ตฌ๋‚˜ ๋”ฐ๋ผํ•  ์ˆ˜ ์žˆ๋Š” VMware ์•ˆ์— CentOS 7 ์„ค์น˜ํ•˜๊ธฐ(์ค€๋น„๋ฌผ: CentOS 7 ISO ํŒŒ์ผ)

Create a NEw Virtual Machine ์„ ํƒ Custom์œผ๋กœ ์„ค์น˜! Next Next Linux, CentOS 7 64-bit ์„ ํƒ CPU ํ”„๋กœ์„ธ์„œ 2๊ฐœ RAM 8GB ์„ค์ • NAT ํƒ€์ž… ๋„คํŠธ์›Œํฌ ์„ ํƒ ์ €์žฅ๋ฐฉ์‹ ์„ค์ • Customize Hardware ์„ ํƒ Sound Card์™€ Printer ์ œ๊ฑฐ ํ”„๋กœ์„ธ์„œ ๊ฐ€์ƒํ™” ์„ ํƒ(์ค‘์š”) FInish CentOS ISO ํŒŒ์ผ ์‚ฝ์ž… Power On Enter English DATE&TIME Asia Seoul KEYBOARD English LANGUAGE SUPPORT ๋ณด์กฐ์–ธ์–ด: ํ•œ๊ตญ์–ด INSTALLATION SOURCE Auto SOFTWARE SELECTION ์›๋ž˜๋Š” ํ•ดํ‚น ๋“ฑ์— ๋Œ€๋น„ํ•˜์—ฌ ์ตœ์†Œ ์„ค์น˜๊ฐ€ ์›์น™์ด์ง€๋งŒ ์ดˆ๋ณด์ž์˜ ํŽธ์˜๋ฅผ ์œ„ํ•˜์—ฌ ์—ฌ๋Ÿฌ๊ฐ€์ง€ ์†Œํ”„ํŠธ์›จ์–ด ์„ ํƒ..

๋ฆฌ๋ˆ…์Šค๋ž€ ๋ฌด์—‡์ผ๊นŒ?

๋ฆฌ๋ˆ…์Šค๋ž€? ๋ฆฌ๋ˆ…์Šค(Linux)๋Š” ๋ฆฌ๋ˆ„์Šค ํ† ๋ฅด๋ฐœ์Šค๊ฐ€ ์ปค๋ฎค๋‹ˆํ‹ฐ ์ฃผ์ฒด๋กœ ๊ฐœ๋ฐœํ–ˆ๋‹ค. ๋ฆฌ๋ˆ…์Šค(Linux)๋Š” ์œˆ๋„์šฐ(Windows)์™€ ๋งฅ(MacOS)๊ณผ ๊ฐ™์ด ์ปดํ“จํ„ฐ ์šด์˜์ฒด์ œ ์ค‘ ํ•˜๋‚˜์ด๋‹ค. ์œ ๋‹‰์Šค (Unix) ์šด์˜์ฒด์ œ๋ฅผ ๊ธฐ๋ฐ˜์œผ๋กœ ๋งŒ๋“ค์–ด์ง„ ์šด์˜์ฒด์ œ๋กœ ๋ฆฌ๋ˆ…์Šค๋Š” ์œ ๋‹‰์Šค์™€ ๋งˆ์ฐฌ๊ฐ€์ง€๋กœ ๋‹ค์ค‘ ์‚ฌ์šฉ์ž, ๋‹ค์ค‘ ์ž‘์—…(Multi-Tasking), ๋‹ค์ค‘ ์Šค๋ ˆ๋“œ(Multi-Thread)๋ฅผ ์ง€์›ํ•˜๋Š” ๋„คํŠธ์›Œํฌ ์šด์˜์ฒด์ œ(NOS)์ด๋‹ค. ๋ฆฌ๋ˆ…์Šค์˜ ๊ทผ๋ณธ์ด ๋˜๋Š” ์œ ๋‹‰์Šค๊ฐ€ ์• ์ดˆ๋ถ€ํ„ฐ ํ†ต์‹  ๋„คํŠธ์›Œํฌ๋ฅผ ์ง€ํ–ฅํ•˜์—ฌ ์„ค๊ณ„๋œ ๊ฒƒ ์ฒ˜๋Ÿผ ๋ฆฌ๋ˆ…์Šค๋„ ๋งˆ์ฐฌ๊ฐ€์ง€๋กœ ์„œ๋ฒ„๋กœ ์ž‘๋™ํ•˜๋Š”๋ฐ ์ตœ์ ํ™”๋˜์–ด ์žˆ๋‹ค. ๋”ฐ๋ผ์„œ ์„œ๋ฒ„์šฉ์œผ๋กœ ๋งŽ์ด ์‚ฌ์šฉ๋˜๋Š” ์šด์˜์ฒด์ œ์ด๋‹ค. ๋ฆฌ๋ˆ…์Šค์˜ ํŠน์ง• - ๋ฆฌ๋ˆ…์Šค๋Š” ์œ ๋‹‰์Šค์™€ ์™„๋ฒฝํ•˜๊ฒŒ ํ˜ธํ™˜๊ฐ€๋Šฅ - ๋ฆฌ๋ˆ…์Šค๋Š” ์˜คํ”ˆ์†Œ์Šค๋กœ ๊ณต๊ฐœ๋œ ์šด์˜์ฒด์ œ๋กœ ๋ˆ„๊ตฌ๋“ ์ง€ ์ž์œ ๋กญ๊ฒŒ ์ˆ˜์ • ๊ฐ€๋Šฅ - ๋ฆฌ๋ˆ…..

VMware ๊ฐ€์ƒ๋จธ์‹ ์ด๋ž€? ๊ฐ€์ƒ ๋จธ์‹  ์™œ ์“ธ๊นŒ? ์žฅ๋‹จ์  ๋ฐ VMware player vs pro ์ฐจ์ด ์„ค์น˜

VMware๋ž€ ๋ฌด์—‡์ธ๊ฐ€? VMware์˜ VM์€ ๊ฐ€์ƒ๋จธ์‹ (Virtual Machine)์œผ๋กœ, ๊ฐ€์ƒ์˜ ๊ธฐ๊ณ„์žฅ์น˜๋ฅผ ์˜๋ฏธํ•œ๋‹ค. ๊ฐ€์ƒํ™” ๊ธฐ์ˆ ์„ ์ด์šฉํ•˜์—ฌ ํ•œ ๊ฐœ์˜ ์‹œ์Šคํ…œ์œผ๋กœ ์—ฌ๋Ÿฌ ๊ฐœ์˜ ๊ฐ€์ƒ ๋ฐ์Šคํฌํ†ฑ ํ™˜๊ฒฝ์„ ๊ตฌ์„ฑํ•˜์—ฌ ์‚ฌ์šฉํ•˜๋Š” ๊ฒƒ์„ ๊ฐ€์ƒ ๋จธ์‹ ์ด๋ผ๊ณ  ํ•œ๋‹ค. ์ฆ‰, PC ์•ˆ์—์„œ ๋˜ ๋‹ค๋ฅธ PC๋ฅผ ๊ตฌ๋™ ํ•  ์ˆ˜ ์žˆ๊ฒŒ ํ•ด ์ฃผ๋Š” ๊ฒƒ์ด๋ฉฐ, ์‰ฝ๊ฒŒ ๋งํ•˜์ž๋ฉด "์ปดํ“จํ„ฐ ์•ˆ์— ๋˜ ๋‹ค๋ฅธ ์ปดํ“จํ„ฐ๋ฅผ ๋งŒ๋“œ๋Š”" ํ”„๋กœ๊ทธ๋žจ์ด๋ผ๊ณ  ํ•  ์ˆ˜ ์žˆ๋‹ค. (๊ฐ€์ƒ๋จธ์‹ ์œผ๋กœ VirtualBox, Hyper-V,VMware ๋“ฑ์ด ์žˆ๋‹ค.) VMware๋ฅผ ์™œ ์‚ฌ์šฉํ•˜๋Š”๊ฐ€? ์˜ˆ์ „์—๋Š” ์ปดํ“จํ„ฐ ํ•œ ๋Œ€๋‹น ํ•œ ๊ฐœ์˜ ์šด์˜์ฒด์ œ๋ฅผ ์‚ฌ์šฉํ•จ์œผ๋กœ ๋‹ค๋ฅธ ์ปดํ“จํ„ฐ๋‚˜ ์šด์˜์ฒด์ œ๊ฐ€ ํ•„์š”ํ•  ๋•Œ ์ƒˆ๋กœ์šด ์šด์˜์ฒด์ œ๊ฐ€ ๋‹ด๊ธด ์ปดํ“จํ„ฐ๋ฅผ ๊ตฌํ•ด์˜ค๋Š” ๋ฐฉ๋ฒ•์„ ์‚ฌ์šฉํ•ด์•ผ ํ–ˆ๋‹ค. ์˜ˆ๋ฅผ ๋“ค์–ด ๋‚ด๊ฐ€ IOS ๊ฐœ๋ฐœํ™˜๊ฒฝ์ด ํ•„์š”ํ•˜๋ฉด ๋งฅ๋ถ์„ ๊ตฌ๋งค..

๋„คํŠธ์›Œํฌ&์„œ๋ฒ„ ์ˆ˜์—… OT + ๊ฐ€์ƒ๋จธ์‹  VMware ๊ธฐ์ดˆ

6๊ฐœ์›” ๋™์•ˆ 1. ์™ธ๊ตญ์–ด(์˜์–ด, ์ผ์–ด/์ค‘๊ตญ์–ด, ....) ํ•™์Šต 2. ๋ธ”๋กœ๊ทธ ํ™œ๋™ ์„ ์ ๊ทน ์ถ”์ฒœ =>ํ•ด์™ธ ์ทจ์—…(์ผ๋ณธ, ์ค‘๋™, ์‹ฑ์นดํฌ๋ฅด, ๋ง๋ ˆ์ด์ง€์•„,...VMware(VMware), Virtual PC(MS), Virtual Box(Oracle)์€ ์ผ๋ฐ˜ ํด๋ผ์ด์–ธํŠธ์šฉ =>์ƒ์šฉ ๊ฐ€์ƒ๋จธ์‹ ์—์„œ๋Š” VMware, Citrix๊ฐ€ ์ฃผ๋„ํ•˜๊ณ  ์žˆ๋‹ค. ๊ฐ€์ƒ๋จธ์‹ ์€ ์™ธ๋ถ€ ํ˜ธ์ŠคํŠธ ๋จธ์‹ (Windows 10-11/Windows 7)์— VMware๋ผ๋Š” ์†Œํ”„ํŠธ์›จ์–ด๋ฅผ ์„ค์น˜ํ•œ ๋’ค ๊ทธ ์•ˆ์— Windows Server 2018, Windows 10-11/7, Linux CentOS 7, Ubuntu 18.04, 20.04 ๋“ฑ์„ ์„ค์น˜ํ•ด์„œ ์šด์˜ํ•  ์ˆ˜ ์žˆ๋‹ค. =>์˜ˆ์ „์—๋Š” Architecture(CPU์˜ ์ฒ˜๋ฆฌ๋ฐฉ์‹)์ด ๋งž์ง€ ์•Š์œผ๋ฉด IBM(PC)์—์„œ๋Š” Ap..

ํŒŒ์ด์ฌ json

JSON (JavaScript Object Notation) -๋”•์…”๋„ˆ๋ฆฌ ๋น„์Šทํ•˜๋‹ค -๊ตฌ์กฐ { K : V } 1. Json Writer # ์ฒซ ๋ฒˆ์งธ ๋ฐฉ๋ฒ• dict_list = [ { 'name' : 'james', 'age':20, 'spec':[ 175.5, 70.5 ] }, { 'name':'alice', 'age':21, 'spec': [ 168.5, 60.5 ] } ] json_string = json.dumps(dict_list) with open('dictlist.json', 'w') as file: file.write(json_string) print('dictlist.json ํŒŒ์ผ์ด ์ƒ์„ฑ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.') # ๋‘ ๋ฒˆ์งธ ๋ฐฉ๋ฒ• import json dict_list = [ { 'name' : 'jam..

ํŒŒ์ผ๋ณต์‚ฌ/csvํŒŒ์ผ ์ฝ๊ธฐ ์“ฐ๊ธฐ

1. ํŒŒ์ผ๋ณต์‚ฌ ํŒŒ์ผ๋ณต์‚ฌ ์›๋ณธ -> ๋ฒ„ํผ ๋ณ€์ˆ˜(Memory) -> ๋ณต์‚ฌ๋ณธ buffer_size = 1024 #1024 byte -> 1 KB ์˜๋ฏธ with open('../../Day07/Section13/hello.txt', 'rb') as source: with open('hello2.txt', 'wb') as copy: while True: buffer = source.read(buffer_size) if not buffer: break copy.write(buffer) print('hello2.txt ํŒŒ์ผ์ด ๋ณต์‚ฌ ๋˜์—ˆ์Šต๋‹ˆ๋‹ค') 2. CSV ํŒŒ์ผ CSV(comma-seperated values) ํ•„๋“œ๋ฅผ ์‰ผํ‘œ(,)๋กœ ๊ตฌ๋ถ„ํ•œ ํ…์ŠคํŠธ ๋ฐ์ดํ„ฐ ํŒŒ์ผ์ด๋‹ค. ์˜ˆ์ œ1) csvReader student_list = ..

ํŒŒ์ผ ๋งŒ๋“ค๊ณ  ์ฝ๊ธฐ

1. ํŒŒ์ผ ์ž…์ถœ๋ ฅ(I/O - input/output) ์ž…๋ ฅ(input) ๊ธฐ์กด ํŒŒ์ผ ์ฝ์–ด๋“ค์ด๋Š” ๊ฒƒ ์ถœ๋ ฅ(output) ํŒŒ์ผ์ƒ์„ฑ, ๋‚ด์šฉ ์ถ”๊ฐ€๋ฅผ ๋งํ•œ๋‹ค. # ์ฒซ๋ฒˆ์งธ ๋ฐฉ๋ฒ• file open file = open('myFile.txt', 'wt') print('myFile.txt ํŒŒ์ผ์ด ์ƒ์„ฑ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.') file.close() # ๋‹ซ์•„์ค˜์•ผ ํ•จ # with ๋ฌธ - ์ž๋™์œผ๋กœ close()๋ฅผ ํ•ด์ค€๋‹ค. with open('myFile.txt', 'wt') as file: print('myFile.txt ํŒŒ์ผ์ด ์ƒ์„ฑ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.') 2. open ํ•จ์ˆ˜ ๋ชจ๋“œ w(write mode) : ์“ฐ๊ธฐ ์ „์šฉ ๋ชจ๋“œ / ํŒŒ์ผ ์—†์œผ๋ฉด ์ƒ์„ฑ t(text mode) : ํ•ด๋‹นํŒŒ์ผ์˜ ๋ฐ์ดํ„ฐ๋ฅผ ํ…์ŠคํŠธ ํŒŒ์ผ๋กœ ์ธ์‹ํ•˜๊ณ  ์ž…์ถœ๋ ฅ. b(binary mod..

์ง€์—ญ๋ณ€์ˆ˜(local) ์ „์—ญ๋ณ€์ˆ˜(global)

์ง€์—ญ๋ณ€์ˆ˜(local) ํ•จ์ˆ˜ ๋‚ด๋ถ€ ์„ ์–ธ ํ•จ์ˆ˜ ๋‚ด๋ถ€์—์„œ๋งŒ ์‚ฌ์šฉ ๊ฐ€๋Šฅ ์ „์—ญ ๋ณ€์ˆ˜(global) ํ•จ์ˆ˜ ๋‚ด๋ถ€ ์™ธ๋ถ€ ๋ชจ๋‘ ์‚ฌ์šฉ ๊ฐ€๋Šฅ 1. gVar = '์ „์—ญ' def globalAndLocal(): lVar = '์ง€์—ญ' print(gVar, '๋ณ€์ˆ˜ ์ž…๋‹ˆ๋‹ค.') # ์ „์—ญ๋ณ€์ˆ˜, ์ฐธ์กฐ๋งŒ ํ•˜๊ณ  ์žˆ๋‹ค. print(lVar, '๋ณ€์ˆ˜ ์ž…๋‹ˆ๋‹ค.') globalAndLocal() gVar = '์ „์—ญ' def globalAndLocal2(): lVar = '์ง€์—ญ' gVar = '๋ณ€๊ฒฝ๋œ ์ „์—ญ์ด ์•„๋‹Œ ์ƒˆ๋กœ์šด ์ง€์—ญ' #์ง€์—ญ print(gVar, '๋ณ€์ˆ˜ ์ž…๋‹ˆ๋‹ค.') print(lVar, '๋ณ€์ˆ˜ ์ž…๋‹ˆ๋‹ค.') globalAndLocal2() print(gVar) 2. ์ „์—ญ๋ณ€์ˆ˜ ์„ ์–ธ total = 0 def gift(dic, who, money..

datetime ๋ชจ๋“ˆ

datetime ๋‚ ์งœ์™€ ์‹œ๊ฐ„ ๋ฐ์ดํ„ฐ๋ฅผ ์ฒ˜๋ฆฌํ•  ๋•Œ ์‚ฌ์šฉํ•œ๋‹ค 1. import datetime # ํ˜„์žฌ ๋‚ ์งœ์™€ ์‹œ๊ฐ„ ๋ณ€ํ™˜, ๋งˆ์ดํฌ๋กœ ์ดˆ ๋‹จ์œ„ ์ถœ๋ ฅ print(datetime.datetime.now()) print(datetime.datetime.today()) 2. date() ํ•จ์ˆ˜ ํŠน์ •๋‚ ์งœ๋ฅผ ๋งŒ๋“ค์–ด ๋ฐ˜ํ™˜ print(datetime.date(2023, 1, 30)) print(datetime.time(10, 40, 0)) 3. ๋‚ ์งœ ํ•„๋“œ๊ฐ’ y = datetime.datetime.now().year m = datetime.datetime.now().month d = datetime.datetime.now().day h = datetime.datetime.now().hour mi = datetime.dateti..

ํŒŒ์ด์ฌ time ๋ชจ๋“ˆ

time ๋ชจ๋“ˆ ์‹œ๊ฐ„ ์ฒ˜๋ฆฌ์— ๊ด€๋ จ๋œ time ๋ชจ๋“ˆ 1. import time 1970๋…„ 1์›” 1์ผ 0์‹œ 0๋ถ„ 0์ดˆ๋ถ€ํ„ฐ ํ˜„์žฌ๊นŒ์ง€ ๊ฒฝ๊ณผ ์‹œ๊ฐ„์„ ๋ฐ˜ํ™˜ ๋งˆ์ดํฌ๋กœ ์ดˆ print(time.time()) #ํƒ€์ž„ ๋ชจ๋“ˆ์— ํƒ€์ž„ ํ•จ์ˆ˜๊ฐ€ ์žˆ์Œ 2. ctime() ํ•จ์ˆ˜ - ์ธ์ˆ˜๋กœ ์ „๋‹ฌ๋œ time ์‹œ๊ฐ„ ํ˜•์‹์„ ๊ฐ–์ถฐ ๋ฐ˜ํ™˜ print(time.ctime(time.time())) ์ธ์ˆ˜๋กœ ์ „๋‹ฌ๋œ ๋‚ ์งœ์™€ ์ง€์‹œ์ž๋ฅผ ์ด์šฉํ•˜์—ฌ ํ˜•์‹์„ ๊ฐ–์ถ˜ ๋‚ ์งœ ๋ฐ์ดํ„ฐ๋ฅผ ๋ฌธ์ž์—ด๋กœ ๋ฐ˜ํ™˜ print(time.strftime('%Y-%m-%d %H:%M:%S')) #์ŠคํŠธ๋ง ํฌ๋งท ํƒ€์ž„ print(time.strftime('%Y๋…„ %m์›” %d์ผ %H:%M:%S')) #์ŠคํŠธ๋ง ํฌ๋งท ํƒ€์ž„ #๋งŒ์•ฝ ์ธ์ฝ”๋”ฉ ์—๋Ÿฌ๊ฐ€ ๋‚œ๋‹ค๋ฉด ์•„๋ž˜์™€ ๊ฐ™์ด ์‚ฌ์šฉํ•˜์‹œ๋ฉด ๋ฉ๋‹ˆ๋‹ค. print( time.s..