목록Programming (91)
Allen's 데이터 맛집
import java.util.*;//https://programmers.co.kr/learn/courses/30/lessons/42587//Programmers stack/Queue 중 프린터 문제public class Printer { public static void main(String[] args) { int[] priorities = { 1, 1, 9, 1, 1, 1 }; int location = 2; System.out.println(solution(priorities, location)); } public static int solution(int[] priorities, int location) { int answer = 0; LinkedList list = new Lin..
import java.util.ArrayList;public class IronBar { public static void main(String[] args) { System.out.println(solution("()(((()())(())()))(())")); } public static int solution(String arrangement) { //copyArray 는 arrangement 중에 ()'레이저' 를 알아 보기 쉽게 replace()를 사용하여 0으로 바꾼후 answer 초기화 String copyArray = arrangement.replace("()", "0"); //answer 는 토막난 막대기 수. int answer = 0; ArrayList copy..
이번 포스트에서 파이썬 환경을 통해 라이브러리를 다운받을 때 발생하는 에러 해결 방법에 대해서 알아보겠습니다 https://github.com/haven-jeon/PyKoSpacing GitHub - haven-jeon/PyKoSpacing: Automatic Korean word spacing with PythonAutomatic Korean word spacing with Python . Contribute to haven-jeon/PyKoSpacing development by creating an account on GitHub.github.com 텍스트 전처리를 위한 PyKoSpcaing 이란 라이브러리를 다운 받으려고 할 때 다음과 같은 에러가 발생하였습니다.ERROR: Cannot find ..
파이썬에서 개발을 하다 보면 자주 접하는 FutureWarning 같은 경고 메시지를 보이지 않게 처리하는 방법에 대해 간단하게 설명드리겠습니다. 경고 메시지는 코드가 돌아가는 데 문제가 되는 건 아니지만, 화면에 계속 뜨면 좀 귀찮기도 하죠. 1. 경고 메시지란?경고 메시지는 파이썬에서 현재 코드가 정상적으로 동작하지만, 미래에 문제가 될 수 있는 부분에 대해 알려주는 메시지입니다. 대표적인 경고 메시지로는 FutureWarning, DeprecationWarning 등이 있습니다. 개발 중에 이러한 경고 메시지를 미리 확인해서 수정하면 좋지만, 때로는 불필요한 메시지일 수 있어서 분석 작업을 방해할 때도 있죠.2. 경고 메시지 숨기기경고 메시지를 무시하려면 warnings 모듈을 사용하면 돼요. 이 ..
