plotly express 예제 중 질문입니다. 1. 우분투 버전 (base) root@gd-virtual-machine:~# cat /etc/issue Ubuntu 20.04.4 LTS \n \l 2. 파이썬 버전 (base) root@gd-virtual-machine:~# python --version Python 3.9.7 3. 공부하는 부분 [2/5] plotly express를 통한 일별 시세 시각화 px.line 을 처음에 실행하면 그래프가 나옵니다. 그러나, 저장된 파일로 실행하면 그래프가 안 나옵니다. 이런 경우도 보셨나요? 4. 해당 소스 import plotly.express as px import pandas as pd df = px.data .stocks() df px.line(df, x="date", y="GOOG") 처음 실행은 정상적으로 그래프가 나옴 저장된 파일로 실행하면 비정상적으로 그래프가 나오지 않음
기존에 사용하던게 Visual code여서 이거 하나로만 사용하고 싶어서 코드로 복사하여 사용하고 관련 라이브러리를 설치하고 실행했는데 오류가 발생해서요. 혹시 Visual code에서도 실행할 수 있는 방법이 있을까요?? C:\StartCode>C:/Users/dantr/AppData/Local/Microsoft/WindowsApps/python3.10.exe c:/StartCode/교육/test1.py c:\StartCode\교육\test1.py:21: DeprecationWarning: use options instead of chrome_options driver = webdriver.Chrome ('chromedriver', chrome_options=chrome_options) Traceback (most recent call last): File "C:\Users\dantr\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\selenium\webdriver\common\service.py", line 72, in start self.process = subprocess.Popen(cmd, env=self.env, File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2032.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 969, in init self._execute_child(args, executable, preexec_fn, close_fds, File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2032.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 1438, in execute child hp, ht, pid, tid = _winapi.CreateProcess(executable, args, FileNotFoundError: [WinError 2] 지정된 파일을 찾을 수 없습니다 During handling of the above exception, another exception occurred: Traceback (most recent call last): File "c:\StartCode\교육\test1.py", line 21, in <module> driver = webdriver.Chrome ('chromedriver', chrome_options=chrome_options) File "C:\Users\dantr\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\selenium\webdriver\chrome\webdriver.py", line 73, in init self.service.start() File "C:\Users\dantr\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\selenium\webdriver\common\service.py", line 81, in start raise WebDriverException( selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home
안녕하세요 교수님 코딩테스트를 준비 중인 학생입니다. 다름이 아니라 제 방식이 맞는 지 궁금해서 글 올립니다. 저는 현재 제가 10분정도 생각하고 안되면 바로 교수님 강의를 바로 보는 식으로 한 다음에 한 단원이 끝나면 다시 코딩을 해보고 안 풀리는걸 체크하고 다음 단원으로 넘어간 다음, 다시 전 단원과 현단원 문제를 풀어보고, 다음 단원으로 넘어가는걸 반복하고 있습니다. 이렇게 공부를 하는게 맞는걸까요?? 가끔은 외워서 코딩을 하는 느낌도 들어서 질문드립니다.
안녕하세요 선생님 이번에 선생님 강의를 수강하려고 막 시작한 학생입니다. 좋은 강의를 만들어 주셔서 감사합니다. 현재 기초를 수강중인데 이에앞서 질문드립니다. 강의수강 방법은 먼저 문제를 풀어보고 강의를 보며 코드 비교 방식으로 수강을 하는 방법을 추천하시는것 같은데 DFS 나 스택 큐 등 개념강의나 이론공부를 따로하지않고 바로 풀기 및 수강을 하는게 나은지요? 문제당 고민시간은 어느정도로 잡아야 괜찮을지요?.. 강의 수강 및 복습을 하고나면 백준에서 바로 삼성이나 카카오등의 기업 기출문제를 바로 풀기 시작하면될까요?
n, m = map(int, input().split()) a = list(map(int, input().split())) cnt = 0 for lt in range(n): rt = lt + 1 tot = 0 while tot < m and rt <= n: tot = sum(a[lt:rt]) if tot == m: cnt += 1 break rt += 1 print(cnt) 4, 5번 테스트 케이스에서 시간초과가 나옵니다 ㅜ
현황 : BCCD에서 사용하던 코드로 Inference를 하려 했는데 다음과 같은 오류가 발생하고 있습니다 바쁘시겠지만 문의드립니다 ◇ 문의사항 : 해결방안이 있을까요? 코드 import torch from mmdet.apis import multi_gpu_test, single_gpu_test from mmcv.parallel import MMDataParallel, MMDistributedDataParallel model_ckpt = MMDataParallel(model_ckpt, device_ids=[0]) outputs=single_gpu_test(model_ckpt, data_loader, True, "저장폴더", 0.5) --------------------------------------------------------------------------- AssertionError Traceback (most recent call last) Input In [6], in <cell line: 8>() 5 model_ckpt = MMDataParallel(model_ckpt, device_ids=[0]) 6 # single_gpu_test를 활용하므로 samples_per_gpu는 1이 되야함 ----> 8 outputs=single_gpu_test(model_ckpt, data_loader, True, "저장폴더", 0.5) File ~/.local/lib/python3.9/site-packages/mmdet/apis/test.py:38, in single_gpu_test(model, data_loader, show, out_dir, show_score_thr) 36 img_tensor = data['img'][0].data[0] 37 img_metas = data['img_metas'][0].data[0] ---> 38 imgs = tensor2imgs(img_tensor, **img_metas[0]['img_norm_cfg']) 39 assert len(imgs) == len(img_metas) 41 for i, (img, img_meta) in enumerate(zip(imgs, img_metas)): File ~/.local/lib/python3.9/site-packages/mmcv/image/misc.py:34, in tensor2imgs(tensor, mean, std, to_rgb) 32 if torch is None: 33 raise RuntimeError('pytorch is not installed') ---> 34 assert torch.is_tensor(tensor) and tensor.ndim == 4 35 channels = tensor.size(1) 36 assert channels in [1, 3] AssertionError: show_result_pypot 사용 시 오류가 발생하는데 해결방안이 있을까요? 코드 from mmdet.apis import show_result_pyplot import cv2 #brg image 사용 img = cv2.imread("sample 이미지 위치") model.cfg = cfg result = inference_detector(model, img) show_result_pyplot(model, img, result, score_thr=0.3) 결과 /home/namu/.local/lib/python3.9/site-packages/mmdet/datasets/utils.py:66: UserWarning: "ImageToTensor" pipeline is replaced by "DefaultFormatBundle" for batch inference. It is recommended to manually replace it in the test data pipeline in your config file. warnings.warn(
from selenium import webdriver from selenium.webdriver.chrome.service import Service from selenium.webdriver.chrome.options import Options # 크롬 드라이버 자동 업데이트 from webdriver_manager.chrome import ChromeDriverManager service = Service(executable_path=ChromeDriverManager().install()) 위와 같이 코딩하고 실행하면 Traceback (most recent call last): File "c:\Users\omonge\Desktop\파이썬공부\desktop\requests_1.py", line 7, in <module> from webdriver_manager.chrome import ChromeDriverManager ModuleNotFoundError: No module named 'webdriver_manager' 위와 같이 모듈이 없다고 하면서 오류가 발생하는데요. pip install webdriver_manager 라이브러리 설치도 했고 pip list 에도 webdriver-manager 3.8.3 설치가 된 것으로 나오는데요. 라이브러리 설치 인식이 안되는걸까요? 검색해보고 컴퓨터도 껐다 켜보고.. 했는데요. 계속 인식이 안되는것 같아요 ㅠ 윈도우10 입니다.
제로초님 깃헙코드 보고 리액트쿼리로 공부하다가 DM 보내는 로직에서 500에러가 떳습니다~!! api 문서대로 요청보냈고, 분명 서버쪽은 문제가 없을텐데 싶어서 며칠 째 고민하다 질문드려요!!! NaN으로 뜨는 부분이 백엔드 코드에서 콘솔 찍어보니까 req.query.perPage 이게 언디파인드로 전달 되더라구요. 근데 저는 perPage를 제로초님처럼 20으로 고정해서 전달하고 있는데 언디파인드로 뜨는게 이상하더라구요.ㅜㅜ +) 그리고 뮤테이션 쿼리키를 ["workspace", workspace, "dm", id, "chat"] 이렇게 주신 이유가 궁금해요!! 제가 공식문서 읽고 이해한게 배열로 줄 경우 첫번째 값이 캐싱할 때 쓰이는 이름이고 그 위에있는 애들은 mutation 안에서 사용될 외부 값을 넣어준다고 이해했었거든요!! 근데 dm 이나 chat은 사용되지 않는 것 같아서요!!