파이썬 not 연산자
해결됨
(2026 최신!) 일주일만에 합격하는 정보처리기사 실기
a = True if not a: print ( "a는 거짓입니다" ) else : print ( "a는 참입니다" ) 위 부분에서 a는 true인데, if not a 구문이 a 가 False 일때 실행되고, else 가 True일때 실행돼서 "a는 참입니다" 값이 나오는건가요?
- python
- java
- c
- 정보처리기사
172만명의 커뮤니티!! 함께 토론해봐요.
해결됨
(2026 최신!) 일주일만에 합격하는 정보처리기사 실기
a = True if not a: print ( "a는 거짓입니다" ) else : print ( "a는 참입니다" ) 위 부분에서 a는 true인데, if not a 구문이 a 가 False 일때 실행되고, else 가 True일때 실행돼서 "a는 참입니다" 값이 나오는건가요?
미해결
파이썬 알고리즘 트레이딩 파트1: 알고리즘 트레이딩을 위한 파이썬 데이터 분석
self.df_signal_summary = (self.df_pair .groupby("signal_group") .agg({"signal": "first", "time": "first", self.stock1: ["first"], self.stock2: ["first"]}) .reset_index(drop=True) ) 여기서 'signal'과 'time'은 'first'를 사용해서 값을 지정하는데, self.stock1과 self.stock2는 왜 ['first']로 리스트화시켜서 값을 지정하나요?
미해결
Airflow 마스터 클래스
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # Basic Airflow cluster configuration for CeleryExecutor with Redis and PostgreSQL. # # WARNING: This configuration is for local development. Do not use it in a production deployment. # # This configuration supports basic configuration using environment variables or an .env file # The following variables are supported: # # AIRFLOW_IMAGE_NAME - Docker image name used to run Airflow. # Default: apache/airflow:3.0.2 # AIRFLOW_UID - User ID in Airflow containers # Default: 50000 # AIRFLOW_PROJ_DIR - Base path to which all the files will be volumed. # Default: . # Those configurations are useful mostly in case of standalone testing/running Airflow in test/try-out mode # # _AIRFLOW_WWW_USER_USERNAME - Username for the administrator account (if requested). # Default: airflow # _AIRFLOW_WWW_USER_PASSWORD - Password for the administrator account (if requested). # Default: airflow # _PIP_ADDITIONAL_REQUIREMENTS - Additional PIP requirements to add when starting all containers. # Use this option ONLY for quick checks. Installing requirements at container # startup is done EVERY TIME the service is started. # A better way is to build a custom image or extend the official image # as described in https://airflow.apache.org/docs/docker-stack/build.html. # Default: '' # # Feel free to modify this file to suit your needs. --- x-airflow-common: &airflow-common # In order to add custom dependencies or upgrade provider distributions you can use your extended image. # Comment the image line, place your Dockerfile in the directory where you placed the docker-compose.yaml # and uncomment the "build" line below, Then run `docker-compose build` to build the images. image: ${AIRFLOW_IMAGE_NAME:-apache/airflow:3.0.2} # build: . environment: &airflow-common-env AIRFLOW__CORE__EXECUTOR: CeleryExecutor AIRFLOW__CORE__AUTH_MANAGER: airflow.providers.fab.auth_manager.fab_auth_manager.FabAuthManager AIRFLOW__DATABASE__SQL_ALCHEMY_CONN: postgresql+psycopg2://airflow:airflow@postgres/airflow AIRFLOW__CELERY__RESULT_BACKEND: db+postgresql://airflow:airflow@postgres/airflow AIRFLOW__CELERY__BROKER_URL: redis://:@redis:6379/0 AIRFLOW__CORE__FERNET_KEY: '' AIRFLOW__CORE__DAGS_ARE_PAUSED_AT_CREATION: 'true' AIRFLOW__CORE__LOAD_EXAMPLES: 'true' AIRFLOW__CORE__EXECUTION_API_SERVER_URL: 'http://airflow-apiserver:8080/execution/' # yamllint disable rule:line-length # Use simple http server on scheduler for health checks # See https://airflow.apache.org/docs/apache-airflow/stable/administration-and-deployment/logging-monitoring/check-health.html#scheduler-health-check-server # yamllint enable rule:line-length AIRFLOW__SCHEDULER__ENABLE_HEALTH_CHECK: 'true' # WARNING: Use _PIP_ADDITIONAL_REQUIREMENTS option ONLY for a quick checks # for other purpose (development, test and especially production usage) build/extend Airflow image. _PIP_ADDITIONAL_REQUIREMENTS: ${_PIP_ADDITIONAL_REQUIREMENTS:-} # The following line can be used to set a custom config file, stored in the local config folder AIRFLOW_CONFIG: '/opt/airflow/config/airflow.cfg' volumes: - ${AIRFLOW_PROJ_DIR:-.}/airflow/dags:/opt/airflow/dags - ${AIRFLOW_PROJ_DIR:-.}/logs:/opt/airflow/logs - ${AIRFLOW_PROJ_DIR:-.}/config:/opt/airflow/config - ${AIRFLOW_PROJ_DIR:-.}/airflow/plugins:/opt/airflow/plugins - ${AIRFLOW_PROJ_DIR:-.}/airflow/files:/opt/airflow/files user: "${AIRFLOW_UID:-50000}:0" depends_on: &airflow-common-depends-on redis: condition: service_healthy postgres: condition: service_healthy services: postgres_custom: image: postgres:13 environment: POSTGRES_USER: leeyujin POSTGRES_PASSWORD: leeyujin POSTGRES_DB: leeyujin volumes: - postgres-custom-db-volume:/var/lib/postgresql/data ports: - 5432:5432 networks: network_custom: ipv4_address: 172.28.0.3 postgres: image: postgres:13 environment: POSTGRES_USER: airflow POSTGRES_PASSWORD: airflow POSTGRES_DB: airflow volumes: - postgres-db-volume:/var/lib/postgresql/data healthcheck: test: ["CMD", "pg_isready", "-U", "airflow"] interval: 10s retries: 5 start_period: 5s restart: always ports: - 5431:5432 networks: network_custom: ipv4_address: 172.28.0.4 redis: # Redis is limited to 7.2-bookworm due to licencing change # https://redis.io/blog/redis-adopts-dual-source-available-licensing/ image: redis:7.2-bookworm expose: - 6379 healthcheck: test: ["CMD", "redis-cli", "ping"] interval: 10s timeout: 30s retries: 50 start_period: 30s restart: always networks: network_custom: ipv4_address: 172.28.0.5 airflow-apiserver: <<: *airflow-common command: api-server ports: - "8080:8080" healthcheck: test: ["CMD", "curl", "--fail", "http://localhost:8080/api/v2/version"] interval: 30s timeout: 10s retries: 5 start_period: 30s restart: always depends_on: <<: *airflow-common-depends-on airflow-init: condition: service_completed_successfully networks: network_custom: ipv4_address: 172.28.0.6 airflow-scheduler: <<: *airflow-common command: scheduler healthcheck: test: ["CMD", "curl", "--fail", "http://localhost:8974/health"] interval: 30s timeout: 10s retries: 5 start_period: 30s restart: always depends_on: <<: *airflow-common-depends-on airflow-init: condition: service_completed_successfully networks: network_custom: ipv4_address: 172.28.0.7 postgres 실습 때문에 yaml 파일 수정 후부터 만든 모든 파일이 web ui에 안 올라가져요.. git을 통해 로컬이나 컨테이너 각 디렉토리에는 파일들이 잘 들어가있습니다. dag 파일 코드 오류일까봐 이미 올라가져있던 파일 코드 복붙해서 test_dag.py를 만들었는데 그것도 안 올라갑니다ㅜㅜ..
미해결
AI 에이전트로 구현하는 RAG 시스템(w. LangGraph)
안녕하세요. Self RAG 에이전트 구현하기 강좌에 대한 질문이 있습니다. 중간 중간에 결과 평가하는 것 중 검색된 문서와 질문에 대한 관련성을 평가하는 부분이 있는데요, 검색 자체를 embedding된 vector에서 similarity search를 하여 뽑아 낸 것들이고, 이 방식 자체가 질문과 유사한 문서를 뽑아 내는 기술인데 굳이 LLM으로 하여 다시 평가를 하게 하는 이유는 뭘까요? 벡터 embedding 과 유사도 검색에 대한 기술이 LLM에 맏기는 것 보다 유사도 검색에 있어 더 정확해야 하는 것이 아닌가 하는 생각이 들어서요. LLM이 하는 유사도 평가가 더 정확하다면 굳이 벡터 embedding 같은 기술을 쓸 필요가 있을까 싶어서 질문 드립니다.
미해결
[개정판] 파이썬 머신러닝 완벽 가이드
강의에서 사용하는 pdf or ppt자료는 따로 없는 건가요?
해결됨
(2026 최신!) 일주일만에 합격하는 정보처리기사 실기
문제에서 get()메소드가 static 메소드인데 static이 아닌 멤머 name값을 리턴해서 오류가 발생한다고 하셨습니다. 근데 main함수나 다른데서 get() 메소드를 실행하는 부분이 없는데도 오류가 발생하는건가요? 추가로 name 변수가 private static String name; 으로 선언된다면 오류가 발생하지 않는건지도 궁금합니다.
해결됨
(2026 최신!) 일주일만에 합격하는 정보처리기사 실기
public class ArithmeticExceptionExample { public static void main (String[] args) { try { int result = 10 / 0 ; // 여기서 ArithmeticException 발생 } catch(AritheticException e) { System.out.println( "에러: 0으로 나눌 수 없습니다!" ); }catch (Exception e) { System.out.println( "에러 발생" ); } finally { System.out.println( "이 블록은 항상 실행됩니다!" ); } 질문 25년 1회시험에 이런방식의 문제가 출체되었는데,, "에러발생" 출력이되어야 하나요? 아니면 생략되어야 하나요?
미해결
Do It! 장고+부트스트랩: 파이썬 웹개발의 정석
안녕하세요. docker-compose down시 계속 permission denined가 뜹니다. 우선 저는 가상머신 os:ubuntu에서 프로젝트를 진행중이며, sudo 붙여서 종료 시도, sudo docker kill 로도 강제 종료를 시도했지만 permission denined이라 다 실패하였습니다. 최후의 수단으로 docker설치 삭제 후, 재설치도 해보았지만 안타깝게도 실패하였습니다. 하여 container를 종료하려고 할 때마다 가상머신 종료하고 다시 들어가야하는 매우 불편하고도 불운한 상황에 처해있습니다. groups를 통해 docker가 있는 것도 확인하였습니다. 도저히 왜 안되는지 모르겠습니다. 도움이 절실합니다... 감사합니다.ㅠ
해결됨
(2026 최신!) 일주일만에 합격하는 정보처리기사 실기
예제2 abstract가 붙으면 재정의한 자식거 출력하고 이문제에서 stopEngine이 자식이 상속받지안호았으므로 부모것이 출력된건가요? 설명 자세히 부탁드립니다
미해결
AI 에이전트로 구현하는 RAG 시스템(w. LangGraph)
문제가 발생하는 코드 ㄴ LLM모델만 gemini-2.5-pro로 사용하고 있고 다른 부분은 다른게 없는데 아래의 에러가 발생하네요... 혹시 도와주실 수 있을까요? # AgentExecutor 실행 query = "시그니처 스테이크의 가격과 특징은 무엇인가요? 그리고 스테이크와 어울리는 와인 추천도 해주세요." agent_response = agent_executor.invoke({"input": query}) 에러로그 Entering new AgentExecutor chain... Invoking: search_menu with {'query': 'Signature Steak'} [Document(metadata={'menu_name': '시그니처 스테이크', 'menu_number': 1, 'source': './data/restaurant_menu.txt'}, page_content='1. 시그니처 스테이크\n • 가격: ₩35,000\n • 주요 식재료: 최상급 한우 등심, 로즈메리 감자, 그릴드 아스파라거스\n • 설명: 셰프의 특제 시그니처 메뉴로, 21일간 건조 숙성한 최상급 한우 등심을 사용합니다. 미디엄 레어로 조리하여 육즙을 최대한 보존하며, 로즈메리 향의 감자와 아삭한 그릴드 아스파라거스가 곁들여집니다. 레드와인 소스와 함께 제공되어 풍부한 맛을 더합니다.'), Document(metadata={'menu_name': '안심 스테이크 샐러드', 'menu_number': 8, 'source': './data/restaurant_menu.txt'}, page_content='8. 안심 스테이크 샐러드\n • 가격: ₩26,000\n • 주요 식재료: 소고기 안심, 루꼴라, 체리 토마토, 발사믹 글레이즈\n • 설명: 부드러운 안심 스테이크를 얇게 슬라이스하여 신선한 루꼴라 위에 올린 메인 요리 샐러드입니다. 체리 토마토와 파마산 치즈 플레이크로 풍미를 더하고, 발사믹 글레이즈로 마무리하여 고기의 풍미를 한층 끌어올렸습니다.')] Invoking: search_wine with {'query': 'steak'} [Document(metadata={'menu_name': '사시카이아 2018', 'menu_number': 3, 'source': './data/restaurant_wine.txt'}, page_content='3. 사시카이아 2018\n • 가격: ₩420,000\n • 주요 품종: 카베르네 소비뇽, 카베르네 프랑, 메를로\n • 설명: 이탈리아 토스카나의 슈퍼 투스칸 와인입니다. 블랙베리, 카시스의 강렬한 과실향과 함께 허브, 가죽, 스파이스 노트가 복잡성을 더합니다. 풀바디이지만 우아한 타닌과 신선한 산도가 균형을 잡아줍니다. 오크 숙성으로 인한 바닐라, 초콜릿 향이 은은하게 느껴집니다.'), Document(metadata={'menu_name': '샤토 디켐 2015', 'menu_number': 9, 'source': './data/restaurant_wine.txt'}, page_content='9. 샤토 디켐 2015\n • 가격: ₩800,000 (375ml)\n • 주요 품종: 세미용, 소비뇽 블랑\n • 설명: 보르도 소테른 지역의 legendary 디저트 와인입니다. 아프리콧, 복숭아, 파인애플의 농축된 과실향과 함께 꿀, 사프란, 바닐라의 복잡한 향이 어우러집니다. 놀라운 농축도와 균형 잡힌 산도, 긴 여운이 특징이며, 100년 이상 숙성 가능한 와인으로 알려져 있습니다.')] --------------------------------------------------------------------------- JSONDecodeError Traceback (most recent call last) Cell In[163], line 4 1 # AgentExecutor 실행 3 query = "시그니처 스테이크의 가격과 특징은 무엇인가요? 그리고 스테이크와 어울리는 와인 추천도 해주세요." ----> 4 agent_response = agent_executor.invoke({"input": query}) File c:\Users\jangi\AppData\Local\pypoetry\Cache\virtualenvs\langgraph-agent-AGzdf7hx-py3.11\Lib\site-packages\langchain\chains\base.py:170, in Chain.invoke(self, input, config, kwargs) 168 except BaseException as e: 169 run_manager.on_chain_error(e) --> 170 raise e 171 run_manager.on_chain_end(outputs) 173 if include_run_info: File c:\Users\jangi\AppData\Local\pypoetry\Cache\virtualenvs\langgraph-agent-AGzdf7hx-py3.11\Lib\site-packages\langchain\chains\base.py:160, in Chain.invoke(self, input, config, kwargs) 157 try: 158 self._validate_inputs(inputs) 159 outputs = ( --> 160 self._call(inputs, run_manager=run_manager) 161 if new_arg_supported 162 else self._call(inputs) 163 ) 165 final_outputs: Dict[str, Any] = self.prep_outputs( 166 inputs, outputs, return_only_outputs 167 ) ... 339 if end != len(s): --> 340 raise JSONDecodeError("Extra data", s, end) 341 return obj JSONDecodeError: Extra data: line 1 column 29 (char 28) Output is truncated. View as a scrollable element or open in a text editor. Adjust cell output settings...
해결됨
(2026 최신!) 일주일만에 합격하는 정보처리기사 실기
자식앞에 스태틱을 지웠을땐 오류가발생하는건 이해했는데 어느줄에서 발생하냐고물으면 어떻게답해야하나요?
해결됨
(2026 최신!) 일주일만에 합격하는 정보처리기사 실기
이해를 못해서 질문하게되어 죄송합니다. 예시5번문제는 생성자 of A 생성자BB1 은 알겠는데 그다음 ACBD가 아니고 CD인 이유를 모르겠습니다
해결됨
(2026 최신!) 일주일만에 합격하는 정보처리기사 실기
정답이 Constructor of A ACBD가 아닌가요? 어렵네요
해결됨
(2026 최신!) 일주일만에 합격하는 정보처리기사 실기
다른 분이 질문해서 해설 올려주신거 봤는데도 저는 아직 이해를 못했습니다. car.start()는 void start-Tesia Model3시동걸기인데 car.stop()는 왜 Tesia Model3정지가 아니고 Tesia Model3정지 및 전원끄기인가요? 용기내서 질문하는거니까 귀찮으셔도 해설 부탁드립니다
해결됨
(2026 최신!) 일주일만에 합격하는 정보처리기사 실기
I는 배열의 숫자들인거 알겠는데 J는 무엇인가요?
해결됨
(2026 최신!) 일주일만에 합격하는 정보처리기사 실기
안녕하세요 연산자 우선순위 강의에서 9:00쯤에 포인터(*) ++전위연산자 보다 우선순위가 높다고 하셨는데 같은 우선순위 아닌가요?
미해결
프로젝트로 배우는 Python 챗봇 & RAG - LangChain, Gradio 활용
패키지 설치: poetry add python-dotenv langchain langchain_openai gradio 위를 입력하는데, 아래 처럼 같은 에러가 수십번 납니다 PS D:\mypersonal\myprojects\LANGCHAIN\qa-bot> poetry add python-dotenv langchain langchain-openai gradio Using version ^1.1.1 for python-dotenv Using version ^0.3.26 for langchain Using version ^0.3.27 for langchain-openai Using version ^5.35.0 for gradio Updating dependencies Resolving dependencies... (1.1s) The current project's supported Python range (>=3.10) is not compatible with some of the required packages Python requirement: - langchain-text-splitters requires Python <4.0,>=3.9, so it will not be installable for Python >=4.0 Because no versions of langchain match >0.3.26,<0.4.0 and langchain (0.3.26) depends on langchain-text-splitters (>=0.3.8,<1.0.0), langchain (>=0.3.26,<0.4.0) requires langchain-text-splitters (>=0.3.8,<1.0.0). Because langchain-text-splitters (0.3.8) requires Python <4.0,>=3.9 and no versions of langchain-text-splitters match >0.3.8,<1.0.0, langchain-text-splitters is forbidden. Thus, langchain is forbidden. So, because qa-bot depends on langchain (^0.3.26), version solving failed. * Check your dependencies Python requirement: The Python requirement can be specified via the python or markers properties For langchain-text-splitters, a possible solution would be to set the python property to ">=3.10,<4.0"
해결됨
(2026 최신!) 일주일만에 합격하는 정보처리기사 실기
10분40초 예제에서 super을 제거했을 시 자식 생성자의 ECar는 호출시에 기본 생성자가 호출 되지 않나요 ? 제가 강의를 들으며 이해하기론 출력값이 Car() // 부모 기본 생성자 ECar() // 자식 기본 생성자 ECar(75) 라고 나와야 한다고 생각했는데 어떤 경우에서는 부모 기본 생성자만 호출되고 어떤 경우에서는 자식 기본 생성자까지 호출되는지 헷갈립니다. 예로 7분에 나오는 예제는 호출시 Car constructor(부모 기본 생성자)가 먼저 호출이 되고 ElectricCar constructor(자식 기본 생성자)가 호출이 된 반면에 위의 예제에서는 왜 부모 기본 생성자만 호출되는 이유가 궁금합니다.
해결됨
(2026 최신!) 일주일만에 합격하는 정보처리기사 실기
배열에 54321 입력하는 코드가 없는데 어떻게 54321이 들어 갔나요?
해결됨
(2026 최신!) 일주일만에 합격하는 정보처리기사 실기
마지막 main 블록 부분에서 printf 값에서 문자열\"%s\"의 길이는... 이 부분에서 \ \을 어떻게 해석해야하나요? 출력값에서는 역슬래쉬가 출력되지 않는데 어떤의미인지 문의드립니다.