2017/12
file, directory 존재여부 확인하기
import os os.path.exists(path) os.path.isdir(path) os.path.isfile(path)
BeautifulSoup 이용해서 html parsing하기
#if you don't install bs4, you must install bs4 #pip install bs4from bs4 import BeautifulSoup import requests r = requests.get(url) soup = BeautifulSoup(r.text, "html.parser") mr = soup.find("") print(mr.get_text())
ccat - colorizing cat, cat에 color를 입히다.
linux command로 자주 사용하는 cat을 Colorizing 할 때 사용한다. sudo add-apt-repository ppa:twodopeshaggy/ccatsudo apt-get updatesudo apt-get install ccat 설치 후 ~/.bashrc파일에 alias cat=ccat 설정하여 cat을 사용하면 끝!
[Ubuntu 16.04] Change network interface name
Edit your /etc/default/grub changing the line fromGRUB_CMDLINE_LINUX="" toGRUB_CMDLINE_LINUX="net.ifnames=0 biosdevname=0" and, finally:$ sudo update-grub and reboot your system:$ sudo reboot