학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! 질문과 관련된 영상 위치를 알려주면 더 빠르게 답변할 수 있어요 먼저 유사한 질문이 있었는지 검색해보세요 작업형1 모의문제3의 문제 7번 3:30초지점 (문제) index "2001" 데이터(행)의 평균보다 큰 값의 수와 index 2003 데이터(행)의 평균보다 작은 값의 수를 더하시오. 문제를 보면 하단에 2001이 아닌 2003이 들어가야 하지 않나요? 검토 및 설명을 바랍니다.
안녕하세요. FastAPI 프로젝트의 폴더 구조에 대해서 궁금한 점이 생겨서 질문 드립니다. 처음에는 라우터에 모든 로직을 넣어서 라우터와 Repository만 분리해서 개발을 하다가, 3 레이어드 아키텍처로 분리를 좀 해볼까 생각이 들었습니다. controller, service, repository 이렇게 나누어 보려고 하는데요. 예를들어 user, board와 같은 도메인이 있다고 하면, 각 폴더를 도메인별로 나누어서 구조를 잡는게 좋을까요? 아니면, controller 폴더 안에 user_controller.py, board_controller.py 등의 파일들이 모여있는게 좋을까요? 선생님께서는 실무에서 어떻게 폴더 구조를 가져가시는지도 궁금합니다. 감사합니다.
현재 RecoBooks 함수 정의가 위와 같고, 3초마다 캐시를 업데이트하는 속성이 설정되어 있습니다. 그런데 저는 강사님처럼 error 노출이 되지 않고 캐시되어 있는 동일한 랜덤 도서 목록이 계속 나오고 있습니다. 아래는 npm run dev로 실행했을 때 나온 로그입니다. 여기서 하나 더 궁금한게 있는데 현재 전체 도서 목록을 불러오는 fetch 함수는 요청한 결과를 무조건 캐싱하는 속성이 설정되어 있습니다. 그런데 제 로그를 보면 http://localhost:12345/book 이 api가 두 번 호출되고 있습니다. request memoization이 호출이 안되는 거 같은데 데이터 캐시가 우위적으로 호출되는 건가요??
❗ 질문 작성시 꼭 참고해주세요 에러 메세지에서 단서를 찾을 수 있는 경우가 많습니다. 에러 메세지를 읽고 한번 검색해보시는것을 추천드립니다. 질문글을 작성하실때는, 현재 문제(또는 에러)와 코드나 github 을 첨부해주세요. 개발중인 OS, ReactNative, Node 버전 등의 개발환경 을 알려주셔야합니다. 에러메세지는 일부분이 아닌 전체 상황 을 올려주세요. 일부만 보여주시면 답변이 어렵습니다. ( 일부만 자르거나 일부만 복사하지말아주세요 .) info Opening the app on iOS... info Found Xcode project "MatApp.xcodeproj" info Found booted iPhone 16 Pro info Launching iPhone 16 Pro info Building (using "xcodebuild -project MatApp.xcodeproj -configuration Debug -scheme MatApp -destination id=F4F5FF9B-9736-4D9D-BDBD-0877EE044254") info 💡 Tip: Make sure that you have set up your development environment correctly, by running react-native doctor. To read more about doctor command visit: https://github.com/react-native-community/cli/blob/main/packages/cli-doctor/README.md#doctor Command line invocation: /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -project MatApp.xcodeproj -configuration Debug -scheme MatApp -destination id=F4F5FF9B-9736-4D9D-BDBD-0877EE044254 User defaults from command line: IDEPackageSupportUseBuiltinSCM = YES Prepare packages ComputeTargetDependencyGraph note: Building targets in dependency order note: Target dependency graph (1 target) Target 'MatApp' in project 'MatApp' (no dependencies) GatherProvisioningInputs CreateBuildDescription ExecuteExternalTool /Applications/Xcode.app/Contents/Developer/usr/bin/ibtool --version --output-format xml1 ExecuteExternalTool /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -v -E -dM -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.2.sdk -x c -c /dev/null ExecuteExternalTool /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -v -E -dM -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.2.sdk -x c -c /dev/null ExecuteExternalTool /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -v -E -dM -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.2.sdk -x objective-c++ -c /dev/null ExecuteExternalTool /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -v -E -dM -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.2.sdk -x objective-c -c /dev/null ExecuteExternalTool /Applications/Xcode.app/Contents/Developer/usr/bin/actool --print-asset-tag-combinations --output-format xml1 /Users/kimhaneui/MatApp/ios/MatApp/Images.xcassets ExecuteExternalTool /Applications/Xcode.app/Contents/Developer/usr/bin/actool --version --output-format xml1 ExecuteExternalTool /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld -version_details Build description signature: d36cd904d40a57305a0ca15973361710 Build description path: /Users/kimhaneui/Library/Developer/Xcode/DerivedData/MatApp-amsjgjqwkyggrzfvexketjxzxmor/Build/Intermediates.noindex/XCBuildData/d36cd904d40a57305a0ca15973361710.xcbuilddata /Users/kimhaneui/MatApp/ios/MatApp.xcodeproj:1:1: error: Unable to open base configuration reference file '/Users/kimhaneui/MatApp/ios/Pods/Target Support Files/Pods-MatApp/Pods-MatApp.debug.xcconfig'. (in target 'MatApp' from project 'MatApp') warning: Unable to read contents of XCFileList '/Target Support Files/Pods-MatApp/Pods-MatApp-resources-Debug-output-files.xcfilelist' (in target 'MatApp' from project 'MatApp') warning: Unable to read contents of XCFileList '/Target Support Files/Pods-MatApp/Pods-MatApp-frameworks-Debug-output-files.xcfilelist' (in target 'MatApp' from project 'MatApp') warning: Run script build phase 'Bundle React Native code and images' will be run during every build because it does not specify any outputs. To address this issue, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'MatApp' from project 'MatApp') error: Unable to load contents of file list: '/Target Support Files/Pods-MatApp/Pods-MatApp-frameworks-Debug-input-files.xcfilelist' (in target 'MatApp' from project 'MatApp') error: Unable to load contents of file list: '/Target Support Files/Pods-MatApp/Pods-MatApp-frameworks-Debug-output-files.xcfilelist' (in target 'MatApp' from project 'MatApp') error: Unable to load contents of file list: '/Target Support Files/Pods-MatApp/Pods-MatApp-resources-Debug-input-files.xcfilelist' (in target 'MatApp' from project 'MatApp') warning: Run script build phase 'Start Packager' will be run during every build because it does not specify any outputs. To address this issue, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'MatApp' from project 'MatApp') warning: Run script build phase '[CP] Embed Pods Frameworks' will be run during every build because it does not specify any outputs. To address this issue, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'MatApp' from project 'MatApp') error: Unable to load contents of file list: '/Target Support Files/Pods-MatApp/Pods-MatApp-resources-Debug-output-files.xcfilelist' (in target 'MatApp' from project 'MatApp') warning: Run script build phase '[CP] Copy Pods Resources' will be run during every build because it does not specify any outputs. To address this issue, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'MatApp' from project 'MatApp') --- xcodebuild: WARNING: Using the first of multiple matching destinations: { platform:iOS Simulator, id:F4F5FF9B-9736-4D9D-BDBD-0877EE044254, OS:18.3.1, name:iPhone 16 Pro } { platform:iOS Simulator, id:F4F5FF9B-9736-4D9D-BDBD-0877EE044254, OS:18.3.1, name:iPhone 16 Pro } BUILD FAILED The following build commands failed: Building project MatApp with scheme MatApp and configuration Debug (1 failure) 가상의 ios가 켜지긴 하는데 해당 에러 때문에 앱이 보이지 않고 있습니다. 왜그런걸까요?
pip install faiss-gpu 커맨드 입력하면 아래와 같은 오류가 뜹니다. (langchain) <username>:~/projects/langchain$ pip install faiss-gpu ERROR: Could not find a version that satisfies the requirement faiss-gpu (from versions: none) ERROR: No matching distribution found for faiss-gpu
예를 들어 '.title'을 붙여 넣기 하여 20개가 나오는 경우 선생님 강의에서는 위아래로 움직이는 경우 개발자도구에서만 아니라 실제 페이지에서 title가 가리키는 부분도 함께 표시가 됩니다. 그런데 내가 하는 경우는 그렇지 않네요. 어떤 차이가 있는 것인지 알고 싶습니다.
수업과 같이 npm에 배포하고 제가 만든 ui를 다운받아 import하는 과정에서 해당 이미지와 같이 node_modules에서 export가 나타납니다. 1) lib파일과 index.ts파일을 myapp 폴더로 직접 import했을때는 정상적으로 작동하였습니다. 2) 해당 수업에서 codecamp-ui가 npm 사이트에 아직 배포중이기에 그것도 시험삼아 다운받아서 import하였지만 똑같은 오류가 나타났습니다. 3) node_modules 파일 삭제하고 다시 yarn install로 다운받았지만 같은 오류가 나타났습니다. 그 전 수업까지는 동일하게 오류없이 진행했습니다. 무엇이 문제일까요?
[AI 실무] AI Research Engineer를 위한 논문 구현 시작하기 with PyTorch
안녕하세요 선생님, 주피터 test.ipynb 파일에서 models 파일의 StyleTransfer을 불러오는 기본적인 import가 안되어 문의 드립니다. 혹시 코드의 문제인가 싶어 loss.py라는 파일에 A라는 클래스를 만들고 똑같이 import 시도해 보았지만 실행이 되지 않습니다 ㅜ test와 loss 파일은 실행해 보았고 문제없이 돌아가는 것을 확인하였습니다. gpt를 통해 여러 방법을 시도해 보았지만 잘 풀리지 않아 질문 드립니다..
안녕하세요! 강의 들으며 많은 부분 배우고 있습니다. DateCoverter 정규표현식 부분을 보면서 드는 의문이 있어 질문드립니다. 제가 이해한 바가 맞다면, 정규표현식에서 {1,2} 부분은 앞부분의 패턴을 1번 또는 2번 반복한다고 이해했습니다. 그렇다면 r"20\d{2}/([1-9]|0[1-9]|1[0-2]){1,2}/([1-9]|0[1-9]|[12][0-9]|3[01]){1,2}" 라는 정규표현식에서 월과 일의 숫자를 체크하는 부분이 1번 또는 2번 반복될 수도 있으니 "2023/0303/1212"와 같은 문자열도 통과 가능한 것일까요?
안녕하세요. 백엔드에서 connect.sid 쿠키와 next-auth의 auth.js-session-token을 사용해서 유저 인증을 하는 것 처럼 보입니다. 프론트서버에서 유저가 접근 시 세션 쿠키(connect.sid)를 받아 백엔드에 유저 세션을 확인한다면 next-auth를 사용하지 않아도 되는 것처럼 보입니다. 백엔드에서 auth.js-sessoin-token으로 유저 인증을 한다면 역시 세션 쿠키(connect.sid)가 필요없는 것처럼 보입니다. connect.sid와 auth.js-session-token 쿠키를 모두 사용해야 하는 이유가 있을까요? 만약 둘 다 사용하는게 좋다고 한다면 동기화가 필요할 것 같은데(만료 시간, 세션 무효화 등..), 이건 어디서 어떻게 처리하는게 좋을까요? (예외 질문) connect.sid의 쿠키에 httpOnly 옵션이 false여도 괜찮은가요? 혹시 백엔드에서 connect.sid의 쿠키를 httpOnly로 보냈다면 쿠키파싱이 제대로 안된 것 같습니다. 아래 모듈로 쿠키파싱하면 되는 것 같습니다. 혹시나하고 남겨봅니다. //현재 코드 //import cookie from "cookie"; //const parsed = cookie.parse(setCookie); import { parseSetCookie } from "next/dist/compiled/@edge-runtime/cookies"; const parsed = parseSetCookie(setCookie);
const res = await fetch( `${process.env.NEXT_PUBLIC_BASE_URL}/api/posts/recommends?cursor=${pageParam}`, { next: { tags: ["posts", "recommends"], }, //cache: "force-cache", } ); '/home'에서 포스팅 로딩 시 또는 새로고침 시에 데이터를 최초 조회하는 시점에서 cache: "force-cache"를 제거하면 포스팅이 노출되고 포함하면 포스팅이 안 나오는 현상이 있는데 어떤 이유인지 의심 가는 부분을 못 찾겠어서 질문 드립니다. cache: "force-cache" 주석처리 데이터 존재 cache: "force-cache" 빈 배열
선생님 질문이 있습니다! const deviceHeight = Dimensions.get('screen').height; ... paddingVertical : deviceHeight > 700 ? 15 : 12; 이런식으로 스타일링 해주셨는데요, 궁금한게 디바이스는 무수히 많은 종류가 있고, 700뿐만 아니라 500, 700, 1000 등등 사이즈마다 다르게 대응해야 할 수도 있을 것 같은데, 상상만 해도 스타일링이 많이 지저분해질 것 같아서요. 혹시 deviceHeight의 수치에 따라 계산식을 만들어서 padding이 비율에 따라 확대/축소될 수 있도록 하는 것도 방법이 될까요? 아니면 웹에서 반응형 레이아웃 대응할 때 미리 사이즈 정의해놓는 것처럼 const deviceSizes = { xs: '575px', sm: '576px', md: '768px', lg: '992px', xl: '1200px', xxl: '1600px', }; 이런식으로 정해놓고 스타일링할 때 사이즈별로 case 문 만들어서 정의하는게 나을까요? 실무에서 이런 방식도 쓰일런지 궁금합니다!
학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! 질문과 관련된 영상 위치를 알려주면 더 빠르게 답변할 수 있어요 먼저 유사한 질문이 있었는지 검색해보세요 작업형1 모의고사2 2분지점 문제4에서 정리했습니다. axis=0 (기본값) → 행을 따라 연산, 열을 기준으로 결과 반환 sum(axis=0): 각 열(Column)의 합계 계산 count(axis=0): 각 열별 NaN 제외 개수 반환 drop(axis=0): 행(Row) 삭제 axis=1 → 열을 따라 연산, 행을 기준으로 결과 반환 sum(axis=1): 각 행(Row)의 합계 계산 count(axis=1): 각 행별 NaN 제외 개수 반환 drop(axis=1): 열(Column) 삭제 연산(sum, count 등)은 axis=0이면 열 기준, axis=1이면 행 기준 으로 수행되고, 반면에 삭제(drop)는 반대로 axis=0이면 행 삭제, axis=1이면 열 삭제 가 됩니다. 이 내용이 맞는지 검토 바랍니다. 맞다면 (sum, count 등)과 달리 삭제(drop)시에는 반대로 적용되는지가 궁금합니다.
안녕하세요. FastAPI로 개발한 어플리케이션을 Rocky 서버에 올려서 실행시키려고 합니다. 그런데, Sqlalchemy를 통해 DB와 연결하는 부분에서 UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb8 in position 61: invalid start byte 위와 같은 에러가 계속 발생하는데요. env에서 받아오는게 잘못됐나 싶어서 직접 스트링으로 넣어봐도 똑같은 에러가 계속 발생하고 있습니다. 서버의 locale도 찍어보면 LANG=ko_KR.UTF-8 LC_CTYPE="ko_KR.UTF-8" LC_NUMERIC="ko_KR.UTF-8" LC_TIME="ko_KR.UTF-8" LC_COLLATE="ko_KR.UTF-8" LC_MONETARY="ko_KR.UTF-8" LC_MESSAGES="ko_KR.UTF-8" LC_PAPER="ko_KR.UTF-8" LC_NAME="ko_KR.UTF-8" LC_ADDRESS="ko_KR.UTF-8" LC_TELEPHONE="ko_KR.UTF-8" LC_MEASUREMENT="ko_KR.UTF-8" LC_IDENTIFICATION="ko_KR.UTF-8" LC_ALL= 잘 설정되어있는데, 뭐가 문제일까요? 아래는 DB 연결하는 부분 코드입니다. from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker from core.settings.settings import settings DATABASE_URL = f"postgresql://{settings.DB_USER}:{settings.DB_PASSWORD}@{settings.DB_HOST}:{settings.DB_PORT}/{settings.DB_NAME}" print(f"DB: {DATABASE_URL}") engine = create_engine( DATABASE_URL, echo=True, connect_args={"options": "-c search_path=schema"} ) SessionFactory = sessionmaker(autoflush=False, autocommit=False, bind=engine) def get_db(): session = SessionFactory() try: yield session finally: session.close()