macOS의 개발 패키지가 들어있는 "명령어 라인 개발자 도구"가 설치되지 않아서 발생하는 에러이다. 터미널에서 아래의 명령어를 입력해주고, xcode-select --install 이 팝업을 통해서 설치하면 된다.
스타일 복사 : 커맨드+옵션+C, 붙여넣기 : 커맨드+옵션+V
Functions assertEqual(a, b) a == b assertNotEqual(a, b) a != b assertTrue(x) bool(x) is True assertFalse(x) bool(x) is False assertIs(a, b) a is b 3.1 assertIsNot(a, b) a is not b 3.1 assertIsNone(x) x is None 3.1 assertIsNotNone(x) x is not None 3.1 assertIn(a, b) a in b 3.1 assertNotIn(a, b) a not in b 3.1 assertIsInstance(a, b) isinstance(a, b) 3.2 assertNotIsInstance(a, b) not isinstance(a, ..
오늘은 Code-Server 서버에 https를 적용해보려고 한다. sudo apt-get install certbot sudo certbot certonly --webroot -w . -d {서버주소} * 주의: 80포트로 접속 테스트를 하기 때문에, 포트포워딩시 해당 주소를 외부포트만이라도 80으로 설정해줘야 한다. 3개월에 한번씩 갱신해줘야 한다. 3개월 후에 쓰고 있을지 몰라서 crontab 작업은 하지 않았다!.! ** 작업 중 error EACCES: permission denied, open '/etc/letsencrypt/live/jonyejin.duckdns.org/fullchain.pem' 에러가 생겼는데 권한에 대한 공부중이라서 보류중 [출처] https://nhj12311.tisto..
try: print(f"연산결과") except: print("에러 발생") else: print("정상 동작") finally: print("수행 종료") Q) finally는 왜 쓰는걸까? 어차피 오류가 나던, 안나던 실행된다면 try문 바깥쪽에 적어도 되는거 아닌가? A) try나 except에 return문이 있으면 함수 자체가 종료되어 버린다. finally문에서 함수가 끝날 때 처리해야 하는 액션들을 처리하고 리턴하도록 할 수 있다. except에서 오류 종류로 판단하기 except ImportError: # 대응하기 except ValueError: # 대응하기 직접 오류 발생: raise로 오류 발생시키기 raise ValueError("입력값을 다시 확인하세요!") Custom Excep..
Spanning Tree input: 아무 그래프 output: 그래프 내의 모든 정점을 포함하는 트리 * 트리이므로 사이클이 있어서는 안된다. Minimum Spanning Tree input: 방향없는 weighted edge 그래프 output: cycle 없는 edge cost가 최소인 spanning tree (같은 cost인 그래프가 여러개 나올 수도 있다.) Kruskal's Algorithm input: 방향없는 weighted edge 그래프 output: cycle 없는 edge cost가 최소인 spanning tree 0) weight순으로 edge를 sorting한다 1) weight이 가장 작은 edge를 선택한다, cycle을 만들지 않는다면 추가 시간복잡도 O(NlogN) :..
Error Code: 1418. This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable) SET GLOBAL log_bin_trust_function_creators = 1; 해주면 됨