react-query 사용 시 enabled 옵션이 true인 경우 queryFn을 실행하지는 않지만 queryKey는 생성되는데 queryKey가 안 생기게 하자니 Hook을 조건부로 작성할 수 없어서 이런 방법은 불가능하고 queryFn은 실행하지 않으니 괜찮다는 생각도 드는데 예를 들면 ["post", id]가 있고 id가 null인 경우 queryKey는 ["post", null]로 무조건 생성이 되더군요. Observe도 많은 곳에서 쓸 수록 2 or 3 이런 식으로 증가하고요. 이게 성능에 문제가 없을지 아니면 queryKey 생성까지 막을 수 있는 방법이 있는지 궁금합니다.
질문을 온전히 이해할 수 있도록, 모든 맥락을 전달해주세요. 질문은 질문자가 번거로워야 보다 좋은 답변을 얻으실 수 있습니다. 시행착오를 알려주시면 곧바로 원하는 문제에 집중할 수 있습니다. 오류 메시지는 일부만 알려주시기보다 전체 오류 메시지를 캡처해서 주시면, 오류 파악에 도움이 됩니다. 당신의 파이썬/장고 페이스메이커가 되겠습니다. ;-) 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요. django-csp 4.0 Migration Guide — Django-CSP 4.0 documentation csp 4.0 이 나왔는데 다음과 같이 강의 내용을 변경하면 될까요? ## config/settings.py from csp.constants import SELF INSTALLED_APPS = [ # ... "csp", # ... ] frame_addition = env.list("CSP_FRAME_ANCESTOS". default=[]) CONTENT_SECURITY_POLICY = { "EXCLUDE_URL_PREFIXES": ["/admin"], "DIRECTIVES": { "default-src": [SELF, "*.example.com"]+ frame_addition , "script-src": [SELF, "js.cdn.com/example/"]+ frame_addition , "img-src": [SELF, "data:", "example.com"]+ frame_addition , "csp_frame_ancestors": [SELF] + frame_addition }, } 이런식으로 변경 해주면 충분할까요?
안녕하세요. 작년 8회 필기 합격 후 실기 준비를 하려고 강의 신청을 해뒀었는데요. 직장 생활을 병행 하다 보니 여건 상 준비를 못하고 이번 10회 준비를 하려고 틈틈이 수강 중 입니다. 강의 만료 기간이 5월초라 한달 정도 남았는데요. 시험 응시 전까지 강의를 반복적으로 듣고 연습을 해야될거같아 10회 실기 시험일 까지만 연장 할 수 있는 방법 없을까 문의 드립니다. 그럼 답변 부탁드리겠습니다^^
[AI 실무] AI Research Engineer를 위한 논문 구현 시작하기 with PyTorch
안녕하세요. 강의 잘 들었습니다! 이제 막 AI 를 학습하고 있는 학부생인데, 너무너무 필요했던 정보들이라 좋았습니다. 혹시 해당 논문 외에, Transformer 구조를 가진 모델 중에 직접 스크래치부터 구현을 도전해볼만한 게 있는지 여쭤보려고 합니다. 물론 이것 저것 제가 원하는 모델을 해봐야겠지만... 이 분야에서 좀 더 잘 아시는 분에게 전반적인 로드맵을 추천 받고 싶어서요!
[2025-04-07T14:51:04.313+0000] {taskinstance.py:3310} ERROR - Task failed with exception Traceback (most recent call last): File "/opt/airflow/dags/yfinance_to_snowflake_ fullrefresh.py ", line 56, in load raise e File "/opt/airflow/dags/yfinance_to_snowflake_ fullrefresh.py ", line 41, in load cur.execute(f"USE SCHEMA {schema};") File "/home/airflow/.local/lib/python3.12/site-packages/snowflake/connector/ cursor.py ", line 1087, in execute Error.errorhandler_wrapper(self.connection, self, error_class, errvalue) File "/home/airflow/.local/lib/python3.12/site-packages/snowflake/connector/ errors.py ", line 284, in errorhandler_wrapper handed_over = Error.hand_to_other_handler( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/airflow/.local/lib/python3.12/site-packages/snowflake/connector/ errors.py ", line 339, in hand_to_other_handler cursor.errorhandler(connection, cursor, error_class, error_value) File "/home/airflow/.local/lib/python3.12/site-packages/snowflake/connector/ errors.py ", line 215, in default_errorhandler raise error_class( snowflake.connector.errors.ProgrammingError: 002043 (02000): 01bb881b-0000-c602-0000-cde100062082: SQL compilation error: Object does not exist, or operation cannot be performed. During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/airflow/.local/lib/python3.12/site-packages/airflow/models/ taskinstance.py ", line 767, in execute task result = execute callable(context=context, **execute_callable_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/airflow/.local/lib/python3.12/site-packages/airflow/models/ taskinstance.py ", line 733, in execute callable return ExecutionCallableRunner( ^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/airflow/.local/lib/python3.12/site-packages/airflow/utils/operator_ helpers.py ", line 252, in run return self.func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/airflow/.local/lib/python3.12/site-packages/airflow/models/ baseoperator.py ", line 406, in wrapper return func(self, args, *kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/airflow/.local/lib/python3.12/site-packages/airflow/decorators/ base.py ", line 266, in execute return_value = super().execute(context) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/airflow/.local/lib/python3.12/site-packages/airflow/models/ baseoperator.py ", line 406, in wrapper return func(self, args, *kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/airflow/.local/lib/python3.12/site-packages/airflow/operators/ python.py ", line 238, in execute return_value = self.execute_callable() ^^^^^^^^^^^^^^^^^^^^^^^ File "/home/airflow/.local/lib/python3.12/site-packages/airflow/operators/ python.py ", line 256, in execute_callable return runner.run (*self.op_args, **self.op_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/airflow/.local/lib/python3.12/site-packages/airflow/utils/operator_ helpers.py ", line 252, in run return self.func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/airflow/dags/yfinance_to_snowflake_ fullrefresh.py ", line 62, in load cur.execute(f"REMOVE {table_stage}/{file_name}") File "/home/airflow/.local/lib/python3.12/site-packages/snowflake/connector/ cursor.py ", line 1087, in execute Error.errorhandler_wrapper(self.connection, self, error_class, errvalue) File "/home/airflow/.local/lib/python3.12/site-packages/snowflake/connector/ errors.py ", line 284, in errorhandler_wrapper handed_over = Error.hand_to_other_handler( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/airflow/.local/lib/python3.12/site-packages/snowflake/connector/ errors.py ", line 339, in hand_to_other_handler cursor.errorhandler(connection, cursor, error_class, error_value) File "/home/airflow/.local/lib/python3.12/site-packages/snowflake/connector/ errors.py ", line 215, in default_errorhandler raise error_class( snowflake.connector.errors.ProgrammingError: 090105 (22000): 01bb881b-0000-c619-0000-cde10006306e: Cannot perform STAGE RM. This session does not have a current database. Call 'USE DATABASE', or use a qualified name. Snowflake 세션에서 데이터베이스 또는 스키마가 제대로 설정되지 않아 발생한 문제로 보인다는데;;; 뭔가 실행에 이상이 있는건지;;;;
강사님의 강의를 들으면서 test 페이지가 프로그래메틱하게 이동하기 때문에 따로 useEffect를 사용해 프리페칭되도록 만드는 것과, Link 컴포넌트에 prefetch 속성을 false로 하여 프리페칭되지 않게 만들 수 있다고 이해했습니다! 그런데 직접 코드를 작성하고 npm run start로 재실행한 뒤 새로고침을 했는데도 search 페이지에 필요한 js번들이 남아있고 test 페이지의 번들은 프리페칭되지 않았는데 어디가 문제인지 알 수 있을까요?
학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! 질문과 관련된 영상 위치를 알려주면 더 빠르게 답변할 수 있어요 먼저 유사한 질문이 있었는지 검색해보세요 선생님, 진짜 너무 어려워요. 강의를 하기전에, 코드를 쓰는 배경, 코드를 해석해주는 등등 이해를 좀 시켜주세요. 초심자 눈높이에 좀 맞춰주세요... 혼자 너무 위아래로 왔다갔다 하시면서 , 뭔가 따라 써보려고해도 어디서부터 어떻게 따라써야하는지 기준도 없어서 너무 헷갈립니다. 어떤식으로 공부해야하는지 방향성도 알려주시면 감사하겠습니다.
학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! 세요 질문과 관련된 영상 위치를 알려주면 더 빠르게 답변할 수 있어요 먼저 유사한 질문이 있었는지 검색해보 train = pd.get_dummies(train, columns=cols) test = pd.get_dummies(test, columns=cols) display(train.head(2)) display(test.head(2)) KeyError Traceback (most recent call last) <ipython-input-52-5da4ae8d05fa> in <cell line: 0>() 1 # 원핫 인코딩 ----> 2 train = pd.get_dummies(train, columns=cols) 3 test = pd.get_dummies(test, columns=cols) 4 display(train.head(2)) 5 display(test.head(2)) 3 frames /usr/local/lib/python3.11/dist-packages/pandas/core/indexes/base.py in _raise_if_missing(self, key, indexer, axis_name) 6247 if nmissing: 6248 if nmissing == len(indexer): -> 6249 raise KeyError(f"None of [{key}] are in the [{axis_name}]") 6250 6251 not_found = list(ensure_index(key)[missing_mask.nonzero()[0]].unique()) KeyError: "None of [Index(['sex', 'smoker', 'region'], dtype='object')] are in the [columns]"
Symbol 관련 테스트 코드를 Sandbox로 확인해 보았는데 결과가 다르게 나와서 문의드립니다. Javascript로 sandbox를 create하였고, 생성된 index.mjs 파일에 강의내용의 Symbol 테스트 코드를 동일하게 작성해여 테스트 하였습니다. let testSymbol1 = Symbol(1); let testSymbol2 = Symbol(1); console.log(typeof testSymbol1, testSymbol1); console.log(typeof testSymbol2, testSymbol2); console.log(testSymbol1 == testSymbol2); console.log(testSymbol2 === testSymbol2); Console로 확인한 결과는 2symbol Symbol(1) false true 이렇게 나옵니다. null로 나오지 않고, === 결과도 true인데 어떤 이유로 다르게 나오는건지 궁금합니다.
Null을 세지않으면 col1이 null도 세지 않아서 count가 3이 되는거 아닌가요? 질문은 동영상 강의에 들어가서 오른쪽에 커뮤니티 버튼을 통해 해주세요. 그래야 어떤 강좌에서 질문하셨는지 알 수 있습니다. 영상에서 몇 분 몇 초 대를 알려주셔야 제가 한 번에 질문 내용 확인이 가능합니다. 이미 다른 누군가가 질문을 한 이력 이 있을 수 있습니다. 질문 게시판을 한 번 확인 부탁드립니다. 학교의 과제나 타 강사의 코드 등 외부 수업 자료에 대해서는 답변하지 않습니다. 제가 다루는 커리큘럼 외의 이론이나, 너무 디테일한 컴퓨터 이론에 대해서는 답변 드리지 않습니다. 시험에 안 나오는 경우가 많고, 나와 봤자 1문제 나오는데 외워야 할 부분이 많은 것 등 (예시: 서브넷 마스크 계산) 질문을 올릴 때 이 글은 모두 지우고 내용을 입력해주세요.