2025/03 28

if elif 쓰지 않기

종래 방법권고 방법food_item = input("Enter Food Item Name: ")def getPrice(food_item):      if food_item == "Burger":         return 100      elif food_item == "Pizza":         return 200       elif food_item == "Juice":         return 50       elif food_item == "Apple":         return 150print(getPrice(food_item))food_item = input("Enter Food Item Name: ")food_items = { "Burger":100 "Pizza":200 "Juice":..

data science/python 2025.03.04

Listening (Family Guy)

we finally made it Brian we're in India 우리가 드디어 해냈어, 브라이언! 우리 인도에 왔어!excuse me man with no pupil실례합니다, 눈동자가 없는 분,  where can we get a taxi cab around here?여기서 택시를 어디서 탈 수 있을까요?all right let's do it Stewie let's go find Padma 좋아, 스튜이, 가자! 패드마를 찾으러 가보자.shouldn't be hard in this dreamy land of Wonder 이 신비로운 경이의 땅에서는 어렵지 않을 거야.I can already smell the Enlightenment and tranquility이미 깨달음과 평온의 향기가 나는 것..

youtube english 2025.03.03

그 많던 쌀은 어디로 사라졌나?

21万トンの米はどこに消えた? 備蓄米を放出しても「適正価格に落ち着くまで2年近くかかる【全2回(前編/後編)の前編】  ついに放出されることになった21万トンの備蓄米。もちろん焦点は「これで価格は落ち着くのか」だが、昨年8月の「令和の米騒動」と、それに続くコメ価格news.yahoo.co.jp작년 봄까지만 해도 슈퍼에서 판매하는 5kg 쌀가격은 보통 2000엔 언저리였다. 그런게 여름부터 기온 상승으로 인한 흉작, 경작지 감소, 관광객 증가로 인한 수요 증가등의 뉴스가 흘러 나오더니 여름부터 쌀이 사라지는 슈퍼가 나타났다.그런데 농림부 장관이라는 자가 한가하게 가을 추수가 끝나면 자연히 해결 될거라 가볍게 무시하더니 이번엔 가격 상승을 노리는 업자들이 더욱 비축해 버리는 일까지 일어나 새쌀이 나와도 가격이 4000엔을 넘고 있다...

shell 의 환경화일 (.profile, .bashrc)

Linux OS와 User간의 소통을 위한 text 베이스의 인터페이스가 존재하는데 shell, terminal, prompt 등으로 불리운다.shell 의 종류로는    ・Interactive shell : 유저 입력을 받는 shell ( terminal 실행시 초기 shell )   ・Non-Interactive shell : 유저 입력과 관계없는 실행만 하는 shell (sh 화일이 실행되는 shell)  또한    ・Login shell : 로그인 했을 때 실행되는 shell ( ssh 로 리모트 로그인 등)    ・Non-Login shell : 보통의 shell ( terminal 실행시 shell ) Interactive Login shell보통 login(자동 로그인/그래픽 로그인 포함)시..

Commands/Linux 2025.03.03

검색

locate 화일명하루에 한번씩 업데이트되는 db를 이용하기 때문에 새로 생긴 화일은 검색이 안됨. findfind디렉토리옵션 옵션 명령   -name       -size+10M   10메가 이상  -size-1M   1메가 미만  -size+500M-size-5G-exec du -sh {} \;500메가~5기가 사이로 사이즈 표시  -user(-group)pak  -lspak유저의 화일 리스트  -perm755  -ls권한이 755인 화일 또는 디렉토리 리스트  -perm-222-typef (d)-ls권한이 222인 화일(디렉토리)만 리스트 /etc-mmin-60   과거 60분이내에 변경된 config 화일 /bin /usr/bin /sbin /usr/sbin-ctime-3   (해킹의심시) 3일이..

Commands/Linux 2025.03.01

소프트웨어 패키지 관리

Ubuntu(Debian 계열)에 있어서 apt 는  dpkg 패키지 시스템을 위한 프론트엔드 명령어이다.apt-cache 는 패키지 데이터베이스에서 정보를 검색하기 위한 명령어이다. 로컬 패키지 데이터베이스를 최신 상태로 업데이트$ sudo apt update 현 설치된 패키지들을 일괄적으로 업그레이드$ sudo apt upgrade 패키지 인스톨$ sudo apt install 패키지명# 인스톨되는 과정에 어떠한 일이 일어날지 알고 싶다면 (시뮬레이션)$ sudo apt install -s 패키지명 패키지 제거 # configuration 화일들은 제거되지 않고 남음$ sudo apt remove 패키지# 모든 화일들을 제거$ sudo apt purge 패키지명# 다른 패키지에 딸려 인스톨되서 더이상..

Commands/Linux 2025.03.01

Listening (Colbert Late Show)

what's why why would you why would you do this why is this the thing that you are doing for our Amusement putting yourself endangered so we get our our jollies(=have fun) out of it where did this come from, have you always been like an adrenaline junkie?왜, 왜 그렇게 하는 거야? 왜 이런 일을 하는 거야? 우리를 즐겁게 하려고 네 자신을 위험에 빠뜨리는 거야? 우리가 그걸 보고 즐거워하라고? 이게 대체 어디서 나온 거야? 원래부터 아드레날린 중독자(스릴을 즐기는 사람)였어?  probably a littl..

youtube english 2025.03.01

aws 처럼 ssh 로 password 없이 private key 로 접속하기

ssh 가 인스톨되어 있는지 확인후 없다면 인스톨$ sudo systemctl | grep ssh# 아무것도 안나오면$ sudo apt update$ sudo apt install ssh ssh로 접속시 패스워드를 사용하지 않는 설정$ sudo nano /etc/ssh/sshd_config아래를 찾아서. . . # PasswordAuthentication yes . . .아래로 변경. . . PasswordAuthentication no. . .Ctrl + x 로 save 하여 빠져나옴# 서비스 restart$ sudo systemctl restart ssh 방화벽에서 ssh 를 허용$ sudo ufw allow ssh 키 생성$ ssh-keygen Generating public/private rsa ..

Commands/Linux 2025.03.01