백엔드를 " https://api.example.com" 프론트엔드를 " https://example.com " 이렇게 배포했습니다. 그런데 백엔드 서버는 example.com 이 주소에서 api 요청만 가능하고, https://api.example.com/graphql 은 주소창에 검색해도 접속 못하게 하고 싶습니다. 어떻게 해야할까요?
지금 "dialogflow-fulfillment": "^0.6.1", 얘가 최신버전인데, 얘와 호환되는 에가 node6이라고 합니다. 지금 10버전이상이 나오고 있는데 6버전을 쓸 수는 없는 것 같아요. npm install을 하면 버전이 자꾸 안맞다고 합니다. 최신버전에 맞처서 진행을 하고 싶습니다. 그렇다고 dialogflow-fulfillment이거를 최신노드버전이랑 호화되는 것을 찾으려고 하니... 저게 최신이라고 합니다. 6년전께요. 얼마전까지 인스톨해서 포스트맨까지확인하고, 채팅까지 했었고 이벤트 적용하다가 자꾸 에러가 처음부터 다시 작업하는데 이번에도 버전문제라고 하네요 모듈의 버전을 현재 안정적인 최신버전으로 (제 컴퓨터에깔린)바뀌어서 인스톨을 진행하지만 자꾸 에러가 납니다 { "name": "chatbot-app", "version": "1.0.0", "description": "chatbot-app", "main": "index.js", "engines": { "node": ">=20.16.0", "npm": ">=10.2.0" }, "scripts": { "start": "react-scripts --openssl-legacy-provider start", "build": "react-scripts --openssl-legacy-provider build", "test": "react-scripts test", "eject": "react-scripts eject", "backend": "nodemon index.js", "frontend": "npm run front --prefix client", "dev": "concurrently \"npm run backend\" \"npm run start --prefix client\"" }, "author": "Jaewon Ahn", "license": "ISC", "dependencies": { "@google-cloud/dialogflow": "^6.8.0", "actions-on-google": "^2.6.0", "body-parser": "^1.18.3", "dialogflow": "^4.0.3", "dialogflow-fulfillment": "^0.6.1", "express": "^4.16.4", "mongoose": "^5.4.20" }, "devDependencies": { "concurrently": "^8.2.2", "nodemon": "^3.1.4" } } C:\project\vswork\chatbot-app> C:\project\vswork\chatbot-app>npm install npm warn EBADENGINE Unsupported engine { npm warn EBADENGINE package: 'dialogflow-fulfillment@0.6.1', npm warn EBADENGINE required: { node: '6' }, npm warn EBADENGINE current: { node: 'v20.16.0', npm: '10.8.2' } npm warn EBADENGINE } npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. npm warn deprecated npmlog@5.0.1: This package is no longer supported. npm warn deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated npm warn deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported npm warn deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported npm warn deprecated are-we-there-yet@2.0.0: This package is no longer supported. npm warn deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated npm warn deprecated chokidar@2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies npm warn deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated npm warn deprecated google-p12-pem@1.0.5: Package is no longer maintained npm warn deprecated google-p12-pem@1.0.5: Package is no longer maintained npm warn deprecated google-p12-pem@1.0.5: Package is no longer maintained npm warn deprecated google-p12-pem@1.0.5: Package is no longer maintained npm warn deprecated gauge@3.0.2: This package is no longer supported. npm warn deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. npm warn deprecated axios@0.18.1: Critical security vulnerability fixed in v0.21.1. For more information, see https://github.com/axios/axios/pull/3410 npm warn deprecated grpc@1.24.11: This library will not receive further updates other than security fixes. We recommend using @grpc/grpc-js instead.
11.네이버 쇼핑 크롤링의 3편 데이터 추출하기(복작한 HTML)구조 편에서 # 나무태그 선택자 만들기 soup.select(".product_item__MDtDF")까지 하더라도 a 태그에 해당되는 부분을 가져오지 못합니다. 네이버 쇼핑에서 크롤링을 차단하는 것인지, 다른 방법으로 크롤링하는 방법은 없는건가요?
강사님 *** !!!! Please make sure that all your Airflow components (e.g. schedulers, webservers, workers and triggerer) have the same 'secret_key' configured in 'webserver' section and time is synchronized on all your machines (for example with ntpd) See more at https://airflow.apache.org/docs/apache-airflow/stable/configurations-ref.html#secret-key *** Could not read served logs: 403 Client Error: FORBIDDEN for url: http://e1efbc97ae25:8793/log/dag_id=dags_email_operator/run_id=manual__2024-08-24T06:22:20.118495+00:00/task_id=send_email_task/attempt=1.log [2024-08-24, 06:22:25 UTC] {local_task_job_ runner.py:123 } ▶ Pre task execution logs [2024-08-24, 06:22:25 UTC] {warnings.py:112} WARNING - /home/***/.local/lib/python3.12/site-packages/***/utils/email.py:155: RemovedInAirflow3Warning: Fetching SMTP credentials from configuration variables will be deprecated in a future release. Please set credentials using a connection instead. send_mime_email(e_from=mail_from, e_to=recipients, mime_msg=msg, conn_id=conn_id, dryrun=dryrun) [2024-08-24, 06:27:49 UTC] {taskinstance.py:3301} ERROR - Task failed with exception 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/operators/email.py", line 79, in execute send_email( File "/home/airflow/.local/lib/python3.12/site-packages/airflow/utils/email.py", line 80, in send_email return backend( ^^^^^^^^ File "/home/airflow/.local/lib/python3.12/site-packages/airflow/utils/email.py", line 155, in send_email_smtp send_mime_email(e_from=mail_from, e_to=recipients, mime_msg=msg, conn_id=conn_id, dryrun=dryrun) File "/home/airflow/.local/lib/python3.12/site-packages/airflow/utils/email.py", line 280, in send_mime_email smtp_conn.starttls() File "/usr/local/lib/python3.12/smtplib.py", line 779, in starttls self.sock = context.wrap_socket(self.sock, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/ssl.py", line 455, in wrap_socket return self.sslsocket_class._create( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/ssl.py", line 1042, in create self.do handshake() File "/usr/local/lib/python3.12/ssl.py", line 1320, in do_handshake self._sslobj.do_handshake() TimeoutError: _ssl.c:983: The handshake operation timed out 위 문구와 함께 현재 smtp.gmail.com 에 접속이 안되는데.. (worker에서도 접속이 안됨) 혹시 다른 설정이 필요할게 있을까요?
import win32com.client import os import shutil # 캐시 디렉토리 경로 cache_dir = os.path.join(os.getenv('LOCALAPPDATA'), 'Temp', 'gen_py') # 캐시 디렉토리 삭제 if os.path.exists(cache_dir): shutil.rmtree(cache_dir) # 캐시 재생성 및 한글 객체 생성 hwp = win32com.client.gencache.EnsureDispatch("hwpframe.hwpobject") hwp.XHwpWindows.Item(0).Visible = True hwp.RegisterModule("FilePathCheckDLL", "FilePathCheckerModule") # 문서 시작 위치로 커서 이동 hwp.MovePos(2) # 문서 시작으로 커서 이동 # 표 생성: 행(5), 열(3) act = hwp.CreateAction("TableCreate") pset = act.CreateSet() act.GetDefault(pset) pset.SetItem("Cols", 3) pset.SetItem("Rows", 5) act.Execute(pset) 이게 실행코드고 오류는 --------------------------------------------------------------------------- ModuleNotFoundError Traceback (most recent call last) File ~\AppData\Roaming\Python\Python312\site-packages\win32com\client\gencache.py:255, in GetModuleForCLSID(clsid) 254 try: --> 255 __import__(sub_mod_name) 256 except ImportError: ModuleNotFoundError: No module named 'win32com.gen_py.7D2B6F3C-1D95-4E0C-BF5A-5EE564186FBCx0x1x0.IDHwpAction' During handling of the above exception, another exception occurred: FileNotFoundError Traceback (most recent call last) Cell In[3], line 21 18 hwp.MovePos(2) # 문서 시작으로 커서 이동 20 # 표 생성: 행(5), 열(3) ---> 21 act = hwp.CreateAction("TableCreate") 22 pset = act.CreateSet() 23 act.GetDefault(pset) File ~\AppData\Local\Temp\gen_py\3.12\7D2B6F3C-1D95-4E0C-BF5A-5EE564186FBCx0x1x0\IHwpObject.py:106, in IHwpObject.CreateAction(self, actidstr) 103 ret = self._oleobj_.InvokeTypes(10031, LCID, 1, (9, 0), ((8, 1),),actidstr 104 ) 105 if ret is not None: --> 106 ret = Dispatch(ret, 'CreateAction', None) 107 return ret File ~\AppData\Roaming\Python\Python312\site-packages\win32com\client\__init__.py:119, in Dispatch(dispatch, userName, resultCLSID, typeinfo, UnicodeToString, clsctx) 117 assert UnicodeToString is None, "this is deprecated and will go away" 118 dispatch, userName = dynamic._GetGoodDispatchAndUserName(dispatch, userName, clsctx) --> 119 return __WrapDispatch(dispatch, userName, resultCLSID, typeinfo, clsctx=clsctx) File ~\AppData\Roaming\Python\Python312\site-packages\win32com\client\__init__.py:47, in __WrapDispatch(dispatch, userName, resultCLSID, typeinfo, UnicodeToString, clsctx, WrapperClass) 43 from . import gencache 45 # Attempt to load generated module support 46 # This may load the module, and make it available ---> 47 klass = gencache.GetClassForCLSID(resultCLSID) 48 if klass is not None: 49 return klass(dispatch) File ~\AppData\Roaming\Python\Python312\site-packages\win32com\client\gencache.py:200, in GetClassForCLSID(clsid) 198 if CLSIDToClass.HasClass(clsid): 199 return CLSIDToClass.GetClass(clsid) --> 200 mod = GetModuleForCLSID(clsid) 201 if mod is None: 202 return None File ~\AppData\Roaming\Python\Python312\site-packages\win32com\client\gencache.py:264, in GetModuleForCLSID(clsid) 261 info = demandGeneratedTypeLibraries[info] 262 from . import makepy --> 264 makepy.GenerateChildFromTypeLibSpec(sub_mod, info) 265 # Generate does an import... 266 mod = sys.modules[sub_mod_name] File ~\AppData\Roaming\Python\Python312\site-packages\win32com\client\makepy.py:377, in GenerateChildFromTypeLibSpec(child, typelibInfo, verboseLevel, progressInstance, bUnicodeToString) 374 progress.LogBeginGenerate(dir_path_name) 376 gen = genpy.Generator(typelib, info.dll, progress) --> 377 gen.generate_child(child, dir_path_name) 378 progress.SetDescription("Importing module") 379 importlib.invalidate_caches() File ~\AppData\Roaming\Python\Python312\site-packages\win32com\client\genpy.py:1363, in Generator.generate_child(self, child, dir) 1361 out_name = os.path.join(dir, an_item.python_name) + ".py" 1362 worked = False -> 1363 self.file = self.open_writer(out_name) 1364 try: 1365 if oleitem is not None: File ~\AppData\Roaming\Python\Python312\site-packages\win32com\client\genpy.py:1049, in Generator.open_writer(self, filename, encoding) 1039 def open_writer(self, filename, encoding="mbcs"): 1040 # A place to put code to open a file with the appropriate encoding. 1041 # Does *not* set self.file - just opens and returns a file. (...) 1046 # don't step on each others' toes. 1047 # Could be a classmethod one day... 1048 temp_filename = self.get_temp_filename(filename) -> 1049 return open(temp_filename, "wt", encoding=encoding) FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\lemon\\AppData\\Local\\Temp\\gen_py\\3.12\\7D2B6F3C-1D95-4E0C-BF5A-5EE564186FBCx0x1x0\\IDHwpAction.py.7700.temp' 이렇게 나오는데 해결할 수 있는 방법 있을까요?
궁금한 점이 있습니다. 지금까지는 다음과 같이 app.use 안에 요청 처리를 위한 미들웨어를 작성했는데, app.use((req, res, next) => { console.log("모든 요청에 실행하고 싶어요"); next(); }); 다음과 같이 app.use에 다운받은 미들웨어를 장착하는 건 "이 파일에서 특정 미들웨어를 사용하겠다"는 의도로 사용하는 건가요?? 아니면 둘 다 같은 동작을 하는건데 제가 둘을 다르다고 생각하는 걸까요? app.use(morgan("dev")); app.use(cookieParser()); app.use(express.json()); app.use(express.urlencoded({ extended: true })); 추가로, 위 미들웨어들로 인해 req 이나 res 객체에서 편하게 .cookie 나 .body 를 사용할 수 있게 되는데 그럼 미들웨어 내에서 미들웨어를 사용하는 건가요 🤔 🤔 ?
한입크기로 잘라먹는 리액트 강의 섹션12의 폰트,이미지,레이아웃 설정하기 강의에서처럼 vscode에서 public폴더로 폰트 파일을 드래그해서 넣었는데 public에 파일이 들어가지를 않습니다ㅠㅠ아무 오류창같은것도 뜨지 않고요 public폴더 눌러보면 아무것도 없습니다ㅠㅠ ctrl+C해서 public폴더에 ctrl+V도 해봤는데 안되고요 구글링한대로 regedit 수정해 재부팅하고 vscode실행하면 "Updates are unabled because you are running the user-scope installation of Visual Studio Code as Administrator." 이란 창이 뜹니다ㅠㅠ 드래그해서 파일넣기도 안되고요.. 그래서 관리자권한설정을 해지하면 이런 창은 안뜨는데 똑같이 드래그해서 파일넣기가 안되는 상황입니다. 이에 대한 해결방안이나 드래그해서 파일 넣기를 대신할 수 있는 방법이 있다면 답변 부탁드립니다! 참고로 제 컴퓨터os는 윈도우11 입니다.
7.2) useEffect 사용하기 강의에서 state의 상태 변화 함수는 비동기로 동작하기 때문에 콘솔에 count 값을 출력하면 이전 값이 나온다고 설명하셨습니다. 그런데 state의 값이 변경되면 리렌더링 되면서 화면에 count 값이 보여지는 건 setCount인 상태 변화 함수가 실행되고, 완료됐기 때문에 화면에 나타난다고 생각했습니다. 그렇기 때문에 콘솔에 이전의 값이 출력 된다는 점이 이해가 가지 않아 질문 드립니다. 버튼을 누르면 onClickButton 함수가 실행된다. setCount 상태 변화 함수가 실행되어 값을 더한다. setCount 함수가 완료되지 않아 콘솔 창엔 이전의 count 값이 출력된다. setCount 함수가 완료되고 state의 값이 변경됐기 때문에 리렌더링이 된다. 리렌더링 된 값이 화면에 출력된다. 이런 순서로 진행되는 건가요? 코드가 어떻게 동작 되는 건지 이해가 안돼서 질문 남깁니다 ㅜㅜ... 항상 친절하고 자세하게 강의해주셔서 감사합니다!
참고로, 단순 구현 문제와 브루트 포스 관련 문제만 잘 풀어도 어렵지 않은 코딩테스트는 합격을 노려볼만합니다. 해당 내용이 언급 되어 있던데, 이부분은 제 코테 전략은 아래와 같습니다. 백준 브루트포스 알고리즘별 문제모음 https://www.acmicpc.net/problemset?sort=ac_desc&algo=125 백준 시물레이션(구현) 알고리즘별 문제모음 https://www.acmicpc.net/problemset?sort=ac_desc&algo=141 알고리즘별 문제 모음으로 브루트 포스 : 100문제 시물레이션 : 100문제 각각 100문제 정도 풀어보고 해당 강의에 있는 문제들을 완전 이해와 학습 복습을 하는것인데 이정도면 스타트업 코딩테스트 정도 노려볼만한가요?
강의13분대 관련 질문입니다. public void paint() { System.out.print("A"); draw();} 여기서 draw();를 this draw(); 로 수정하게 되면 자식 draw가 아닌 부모 draw를 불러오나요? 강의 14분대 문제 질문입니다. A b = new B(1)을 통해 자식 클래스에서 public B(int i)를 불러왔으면 부모 클래스에서도 public A(int i)를 불러와야 하는것이 아닌가요? 이전 강의에서 파라미터가 있는 생성자 car(a,b)예제를 들고 설명을 해주실 때 그렇게 이해를 했는데 무슨차이인지 통 모르겠네요.. 17분대 specialDraw가 오류 나는 이유가 정확히 궁금해요 A b = new B(1); 을 통해 업캐스팅을 통해 B를 명시해줬기 때문에 에러가 나는걸까요? 뭔가 명확히 갈증이 해소되지 않는느낌이라 답답하네요...ㅠ
안녕하세요, 인강 수강후 현업에서 Airflow 를 통해서 Dag 을 수행하고 있는데요, 서비스 PM 등의 이유로 수시간(3~5시간) 정도 pause 를 진행하고 다시 unpause 를 하게 되는 경우가 있습니다. 이럴때 unpasue 를 클릭하게 된다면 비록 Dag 에 catchup = false 로 지정해 놓더라도, 가장 최근에 수행 되었어야 할 Dag Run 은 수행되게 되는데요 Ex ) schedule_interval = 10,20,30 1,2,3 * * * * Dag.catchup = False pause = 01:15 unpause = 03:25 수행되는 Dag run 의 data_interval_end = 03:20 그런데 여기서 3시 20 분 dag_run 을 수행시키지 않기 위해서 생각을 하다가, Dag 의 default_args 의 start_date 값을 datetime.now 로 주는것에 대해서 생각을 해봤는데요, 당장 간단하게 테스트를 했을때는 큰 문제가 없었는데, 혹시 해당 케이스가 문제가 되는 케이스가 있을까요? 그리고 start_date 를 now 로 하는것 말고도 다른 방안이 있다면 좋은 방안 부탁 드립니다 감사합니다!
여러 챕터에서 객체의 on 메서드를 사용하는 코드가 자주 보여서 개념에 대해 알아보았습니다. const fs = require("fs"); console.log("before:", process.memoryUsage().rss); // 메모리 체크 // 스트림 방식으로 파일 읽고 보내기 const readStream = fs.createReadStream("./big.txt"); const writeStream = fs.createWriteStream("./big3.txt"); readStream.pipe(writeStream); readStream.on("end", () => { console.log("stream: ", process.memoryUsage().rss); }); 그런데 이렇게 이벤트가 발생하는 객체의 종류를 모두 외우고 있어야 하나요? 아니면 이 객체가 이벤트를 발생시키는지 예상(?), 판단할 수 있는 기준이 있나요?
안녕하세요 선생님 머린이 질문드립니다 ㅠ k-fold 검증하는거에 대해 궁금한게 있습니다 X_train, X_val, y_train, y_test = train_test_split(x,y,test_size= 0.3) 으로 햇을 때 만약 100개 데이터가 있으면 30개 데이터를 가지고 질문1) fit -> x_train, y_train : 30개 데이터를 가지고 훈련한다. ) 70개 데이터에 대해 pred : x_val 후 -> accuracy (y_val, pred) 맞춰본다 (모의고사를 푼다) -> 이제 fit한 데이터를 가지고 실제 수능을 푼다 (real test data) 가 맞을까요 ?? 질문2) 이게 맞다면 k-폴드 교차검증은 (k=5일떄) fit 활동 -> 30개 데이터 셋 fit을 5번 수행 실시 후 70개의 pred : x_val 활동을 한다 가 맞을까요 ? '^',,