1. 현재 학습 진도 몇 챕터/몇 강을 수강 중이신가요? 어떤 알고리즘을 학습하고 계신가요? 여기까지 이해하신 내용은 무엇인가요? 2. 어려움을 겪는 부분 어느 부분에서 막히셨나요? 코드의 어떤 로직이 이해가 안 되시나요? 어떤 개념이 헷갈리시나요? 3. 시도해보신 내용 문제 해결을 위해 어떤 시도를 해보셨나요? 에러가 발생했다면 어떤 에러인가요? 현재 작성하신 코드를 공유해주세요 이렇게 구체적으로 알려주시면, 더 정확하고 도움이 되는 답변을 드릴 수 있습니다! 😊 아래 코드(TODO; 제가 만든 삭제코드, 정답지; 제공된 교재 답 풀이본) 에 대해 문의드립니다. 5,9,12,27 일때 정답지를 통해 결과를 뽑아보면 삭제가 안되는 현상이 일어납니다. 이와 관련해 어떻게 생각하실지 여쭙습니다! class Node: def __init__(self, data): self.data = data self.next = None class LinkedList: def __init__(self, value): self.head = Node(value) def append(self, value): cur = self.head while cur.next is not None: cur = cur.next cur.next = Node(value) def print_all(self): cur = self.head while cur is not None: print(cur.data) cur = cur.next def get_node(self, index): node = self.head count = 0 while count < index: node = node.next count += 1 return node def add_node(self, index, value): new_node = Node(value) if index == 0: new_node.next = self.head self.head = new_node return node = self.get_node(index - 1) next_node = node.next node.next = new_node new_node.next = next_node # def delete_node(self, index): # TODO # if index == 0: # 첫번째 노드를 불러와야 출력이 가능하므로 0번째 인덱스를 제거하려고하면 1번쨰 인덱스를 head로 지정 # self.head = self.head.next # return # before_node = self.get_node(index-1) # 1. 제거해야할 노드 이전 노드 찾기 # delete_node = self.get_node(index) # before_node.next = delete_node.next # 2. 이전 노드 next를 제거할 노드의 next로 # delete_node.next = None # 3. 제거할 노드의 next 를 None # return "index 번째 Node를 제거해주세요!" def delete_node(self, index): # 정답지 if index == 0: # 첫번째 노드를 불러와야 출력이 가능하므로 0번째 인덱스를 제거하려고하면 1번쨰 인덱스를 head로 지정 self.head = self.head.next return before_node = self.get_node(index-1) # 1. 제거해야할 노드 이전 노드 찾기 before_node = before_node.next.next return "index 번째 Node를 제거해주세요!" linked_list = LinkedList(5) linked_list.append(9) linked_list.append(12) linked_list.append(27) print("제거 전") linked_list.print_all() print("제거 후") linked_list.delete_node(3) linked_list.print_all()
사진과 같이 Bad request - please check your parameters [item 0] 400 - "{\"hint\":\"No template was found with that ID.\",\"documentation\":\" https://creatomate.com/docs/api/quick-start/introduction\ "}" 라고 뜹니다 뭐가 문제일까요 ??
안녕하세요, 강사님. 강의의 수강 기한이 곧 만료되어 문의드립니다. 최근 1년간 다른 직종에 관련된 일을 하느라 강의를 거의 수강하지 못했습니다. 이번 연도에 강의를 들으며 빅데이터분석기사 실기를 준비하고 싶은데, 혹시 수강기한을 연장해 주실 수 없을까요? 제 메일은 ksforuo@gmail.com 입니다.
안녕하세요. 과제를 잘 못 이해한건가 싶기도 하지만 아래와 같은 조건하에 구현을 해 봤습니다. 수업 과정에서 Front-end는 고정인 상황이기 때문에 기존 API는 변경이 없다는 가정하에 변경 해 봤습니다. 시간대1개와 요일n개의 설정이 하나의 row로 묶여있는 상태로는 요일별 시간대 변동에 대응하기 까다로운 것 같아 요일별 개별 row로 저장하도록 일부 수정 하였습니다. API endpoint 모델 변경을 피하기 위해서 내부적으로 여러개의 요일별 row로 나누어 저장하도록 했습니다. 고민중에 작가님께서 올려 놓으신 레퍼런스 코드를 봤는데, 책에서 언급하신 것 처럼 postgres 경우와 sqlite 경우로 코드가 분기 되는 것을 보았고, 지금은 교육 과정이기 때문이라고 생각 하지만 배포 코드와 개발 환경 코드가 다른것은 여러모로 좋지 않은 것 같아 현재는 sqlite 기준으로 개별 DB구현에서만 지원하는 것은 배제하는 방향으로 구현 했습니다. 1과 같이 변경 함으로써, 기 등록된 정보의 수정에서는 개별 날짜 별 시간대 설정 면에서 자유도가 생겼다고 생각 됩니다. 타임슬롯의 변경과 삭제에 관해서는 내부적으로는 time-slot으로 관리하지만, 외부공개 id는 아니므로, 키 로서 start-time, end-time, weekday (API형태로서는 리스트)조합으로 정의 해서 동작 하도록 구현했습니다. 특히 삭제의 경우는 부득이 delete method의 경우는 payload가 포함되는것이 받아들여지지 않는 경우도 있는것을 고려해서, 새 등록 값 두가지(new_start_time과, new_end_time) 값이 모두 제공되고 같은 경우를 특정하여 삭제 동작으로 정의하여 동작하도록 구현했습니다. class TimeSlotUpdateByGroupIn(SQLModel): start_time: time end_time: time weekdays: Weekdays new_start_time: time | None = None new_end_time: time | None = None new_weekdays: Weekdays | None = None @model_validator(mode="after") def check_update_fields(self): update_fields = { "new_start_time": self.new_start_time, "new_end_time": self.new_end_time, "new_weekdays": self.new_weekdays, } if not any(value is not None for value in update_fields.values()): raise ValueError("최소 하나의 수정 필드는 반드시 제공되어야 합니다.") return self @router.post("/time-slots", status_code=status.HTTP_201_CREATED, response_model=TimeSlotOut) async def create_time_slot( user: CurrentUserDep, session: DbSessionDep, payload: TimeSlotCreateIn, ) -> TimeSlotOut: if not user.is_host: raise GuestPermissionError() weekdays = sorted(set(payload.weekdays)) # dup. check with already exist one stmt = select(TimeSlot).where( and_( TimeSlot.calendar_id == user.calendar.id, TimeSlot.weekday.in_(weekdays), TimeSlot.start_time < payload.end_time, TimeSlot.end_time > payload.start_time, ) ) result = await session.execute(stmt) existing_time_slot = result.scalars().first() if existing_time_slot: raise TimeSlotOverlapError() time_slots = [ TimeSlot( calendar_id=user.calendar.id, start_time=payload.start_time, end_time=payload.end_time, weekday=weekday, ) for weekday in weekdays ] session.add_all(time_slots) await session.commit() if not time_slots: raise TimeSlotOverlapError() return TimeSlotOut( start_time=time_slots[0].start_time, end_time=time_slots[0].end_time, weekdays=weekdays, created_at=time_slots[0].created_at, updated_at=time_slots[0].updated_at, ) @router.get( "/time-slots/{host_username}", status_code=status.HTTP_200_OK, response_model=list[TimeSlotOut], ) async def get_host_timeslots( host_username: str, session: DbSessionDep, ) -> list[TimeSlotOut]: stmt = ( select(User) .where(User.username == host_username) .where(User.is_host.is_(true())) ) result = await session.execute(stmt) host = result.scalar_one_or_none() if host is None or host.calendar is None: raise HostNotFoundError() stmt = select(TimeSlot).where(TimeSlot.calendar_id == host.calendar.id) result = await session.execute(stmt) time_slots = result.scalars().all() grouped: dict[tuple[time, time], TimeSlotOut] = {} for time_slot in time_slots: key = (time_slot.start_time, time_slot.end_time) if key not in grouped: grouped[key] = TimeSlotOut( start_time=time_slot.start_time, end_time=time_slot.end_time, weekdays=[time_slot.weekday], created_at=time_slot.created_at, updated_at=time_slot.updated_at, ) continue grouped[key].weekdays.append(time_slot.weekday) if time_slot.created_at < grouped[key].created_at: grouped[key].created_at = time_slot.created_at if time_slot.updated_at > grouped[key].updated_at: grouped[key].updated_at = time_slot.updated_at if not grouped: raise TimeSlotNotFoundError() for time_slot in grouped.values(): time_slot.weekdays = sorted(set(time_slot.weekdays)) return list(grouped.values()) @router.patch( "/time-slots", status_code=status.HTTP_200_OK, response_model=TimeSlotOut | None, ) async def update_time_slot( user: CurrentUserDep, session: DbSessionDep, payload: TimeSlotUpdateByGroupIn, ) -> TimeSlotOut | None: if not user.is_host: raise GuestPermissionError() current_weekdays = sorted(set(payload.weekdays)) stmt = select(TimeSlot).where( and_( TimeSlot.calendar_id == user.calendar.id, TimeSlot.start_time == payload.start_time, TimeSlot.end_time == payload.end_time, ) ) result = await session.execute(stmt) current_slots = result.scalars().all() if not current_slots: raise TimeSlotNotFoundError() existing_weekdays = sorted({slot.weekday for slot in current_slots}) if existing_weekdays != current_weekdays: raise TimeSlotNotFoundError() delete_only = ( payload.new_start_time is not None and payload.new_end_time is not None and payload.new_start_time == payload.new_end_time ) if delete_only: current_ids = [slot.id for slot in current_slots] await session.execute(delete(TimeSlot).where(TimeSlot.id.in_(current_ids))) await session.commit() return None new_start_time = payload.new_start_time or payload.start_time new_end_time = payload.new_end_time or payload.end_time new_weekdays = sorted(set(payload.new_weekdays or payload.weekdays)) if new_start_time >= new_end_time: raise HTTPException( status_code=status.HTTP_422_UNPROCESSABLE_CONTENT, detail="시작 시간은 종료 시간보다 빨라야 합니다.", ) current_ids = [slot.id for slot in current_slots] stmt = select(TimeSlot).where( and_( TimeSlot.calendar_id == user.calendar.id, TimeSlot.weekday.in_(new_weekdays), TimeSlot.start_time < new_end_time, TimeSlot.end_time > new_start_time, TimeSlot.id.not_in(current_ids), ) ) result = await session.execute(stmt) existing_time_slot = result.scalars().first() if existing_time_slot: raise TimeSlotOverlapError() await session.execute(delete(TimeSlot).where(TimeSlot.id.in_(current_ids))) new_time_slots = [ TimeSlot( calendar_id=user.calendar.id, start_time=new_start_time, end_time=new_end_time, weekday=weekday, ) for weekday in new_weekdays ] session.add_all(new_time_slots) await session.commit() return TimeSlotOut( start_time=new_start_time, end_time=new_end_time, weekdays=new_weekdays, created_at=new_time_slots[0].created_at, updated_at=new_time_slots[0].updated_at, )
어떤 강의에 대한 질문인지 자세하게 알려주시면 답변을 드리는데 도움이 됩니다. 스크린샷 윈도우키 + 쉬프트키 + S(윈도우) 을 자세히 첨부하시면 답변 드리는데 많은 도움이 됩니다. 동영상 재생 관련 같은 인프런 서비스 관련 문의는 1:1 문의하기를 이용해 주세요. 7강 강의를 보면 switch 노드에 community에서 검색한 imap노드를 사용하시던데요. 지금은 n8n 정책이 바뀌어서 사용이 안된다고 합니다. AI를 찾아보니 정책 바뀐건 맞더라구요. 혹시 해당 기능을 쓸 수 있는 방법이나 대체 방법 알려주시면 감사하겠습니다.
해당 강의 8:10처럼 동일하게 돌렸을 때 다음과 같이 출력이 찍힙니다. 624만원에 관한 정보는 나오지 않습니다. ㅠㅠ 여러번 돌려도 계속 그렇게 나오네요 .. 어떤 문제일까요?, 혹시나 DB에 문서를 적재하는 과정중에서 55조의 테이블이 씹힌건가? 해서 document_list 찍었을땐 (적재 전 txt 파일을 로딩하는과정에서) 또 624만원에 관련된 내용이 있습니다... 출력내용이 길어 10000자가 넘어 마지막 answer만 올려드립니다. document answer == {'answer': AIMessage(content='연봉 5천만 원인 거주자의 소득세는 근로소득공제를 적용하여 계산됩니다. 총급여액 5천만 원의 경우, 근로소득공제는 1천200만 원+(4천500만 원을 초과하는 금액의 100분의 5)입니다. 따라서, 소득세는 해당 공제를 적용한 과세표준에 세율을 적용하여 계산하게 됩니다. 하지만 세율 정보가 없으므로 정확한 소득세 금액을 계산할 수 없습니다. ++ 다른 테이블은 context로 찍히는데 55조 624만원 관련 테이블만 안찍힙니다..
안녕하세요. 좋은 강의 감사합니다. 강의를 듣다 몇가지 의문이 있어 글을 작성합니다. 애드몹 광고는 비공개 테스트시에도 적용을 해야하나요. 비공개 테스트시에도 애드몹광고를 추가한 상태에서 진행해야하나요? 비공개 테스트가 완료된 상태에서 애드몹광고를 추가하고 출시가 가능한가요? 비공개 테스트시에는 애드몸광고를 넣지않고 앱을 개시할때 추가해도되나요 애드몹 공고로 등록한 모바일 폰은 비공개 테스트 시 12개중한개의 모바일폰에 포함되나요.
저는 강사님의 refer & earn 주소로 runpod.io 사이트 열고, 영상에 나온 팝업창 누르고 구글 계정으로가입하고 10달러 결제까진 순조롭게 되었습니다....만 5달러는 안들어왔고 딱 결제한만큼 10달러만 있네요! 다른 분들은 어떻게... 추가로 5달러 받으셨는지 궁금합니다.
강의 수강 방법에 대해서 질문이 있습니다. 저는 Blind75를 순서대로 풀고 있는데 강의 순서랑은 Blind75 순서랑 조금 다르더라구요 자료구조 알고리즘을 모르는 상태로 강의를 시작해도 되는지 1번과 연계되는 질문으로 일단 문제 풀이를 시도하되 한 문제당 어느정도의 시간을 두고 풀면 되는지 보통 10분 정도 고민해보고 정말 모르겠다면 문제풀이 강의를 바로 들어보는 편입니다. Blind75 순서대로 문제를 풀면서 풀지 못한 문제에 대해서만 강의를 시청하면 되는지 좋은 강의 만들어주셔서 감사합니다.
강의 내용 중에 "pip install pykrx" 이 부분에 대한 설명을 해 주신다고 했지만 나중에 VS CODE만 설명하시면서 실제로는 강의에서 빠져 있어서 기존 문의드린 오류가 난 게 아닌가 합니다. 느낌으로는 conda promp 상에서 실행하면 될 것 같은데 안되네요. "pip install pykrx" 를 어디에 설치해야 하나요? 아래 2곳에서는 안됩니다.