inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

묻고 답해요

172만명의 커뮤니티!! 함께 토론해봐요.

ch09의 '01_yt_extract_summerize_exp.ipynb' 실습중 에러

미해결

초보자를 위한 ChatGPT API 활용법 - API 기본 문법부터 12가지 프로그램 제작 배포까지

안녕하세요 ch09의 '01_yt_extract_summerize_exp.ipynb' 실습중에 마지막 'googletrans' 설치 및 실행시 오류가 발생합니다. openai 랑 googletrans 에서 사용하는 라이브러리가 충돌나는거 같은데 해결방법 있을까요? googletrans 설치시 pip install googletrans==3.1.0a0 Collecting googletrans==3.1.0a0 Using cached googletrans-3.1.0a0-py3-none-any.whl Collecting httpx==0.13.3 (from googletrans==3.1.0a0) Using cached httpx-0.13.3-py3-none-any.whl.metadata (25 kB) Requirement already satisfied: certifi in e:\python\inflearn_chatgpt-main\ch09\ch09_env\lib\site-packages (from httpx==0.13.3->googletrans==3.1.0a0) (2024.2.2) Collecting hstspreload (from httpx==0.13.3->googletrans==3.1.0a0) Using cached hstspreload-2024.3.1-py3-none-any.whl.metadata (2.1 kB) Requirement already satisfied: sniffio in e:\python\inflearn_chatgpt-main\ch09\ch09_env\lib\site-packages (from httpx==0.13.3->googletrans==3.1.0a0) (1.3.1) Collecting chardet==3.* (from httpx==0.13.3->googletrans==3.1.0a0) Using cached chardet-3.0.4-py2.py3-none-any.whl.metadata (3.2 kB) Collecting idna==2.* (from httpx==0.13.3->googletrans==3.1.0a0) Using cached idna-2.10-py2.py3-none-any.whl.metadata (9.1 kB) Collecting rfc3986<2,>=1.3 (from httpx==0.13.3->googletrans==3.1.0a0) Using cached rfc3986-1.5.0-py2.py3-none-any.whl.metadata (6.5 kB) Collecting httpcore==0.9.* (from httpx==0.13.3->googletrans==3.1.0a0) Using cached httpcore-0.9.1-py3-none-any.whl.metadata (4.6 kB) Collecting h11<0.10,>=0.8 (from httpcore==0.9.*->httpx==0.13.3->googletrans==3.1.0a0) Using cached h11-0.9.0-py2.py3-none-any.whl.metadata (8.1 kB) Collecting h2==3.* (from httpcore==0.9.*->httpx==0.13.3->googletrans==3.1.0a0) Using cached h2-3.2.0-py2.py3-none-any.whl.metadata (32 kB) Collecting hyperframe<6,>=5.2.0 (from h2==3.*->httpcore==0.9.*->httpx==0.13.3->googletrans==3.1.0a0) Using cached hyperframe-5.2.0-py2.py3-none-any.whl.metadata (7.2 kB) Collecting hpack<4,>=3.0 (from h2==3.*->httpcore==0.9.*->httpx==0.13.3->googletrans==3.1.0a0) Using cached hpack-3.0.0-py2.py3-none-any.whl.metadata (7.0 kB) Using cached httpx-0.13.3-py3-none-any.whl (55 kB) Using cached chardet-3.0.4-py2.py3-none-any.whl (133 kB) Using cached httpcore-0.9.1-py3-none-any.whl (42 kB) Using cached idna-2.10-py2.py3-none-any.whl (58 kB) Using cached h2-3.2.0-py2.py3-none-any.whl (65 kB) Using cached rfc3986-1.5.0-py2.py3-none-any.whl (31 kB) Using cached hstspreload-2024.3.1-py3-none-any.whl (1.1 MB) Using cached h11-0.9.0-py2.py3-none-any.whl (53 kB) Using cached hpack-3.0.0-py2.py3-none-any.whl (38 kB) Using cached hyperframe-5.2.0-py2.py3-none-any.whl (12 kB) Installing collected packages: rfc3986, hyperframe, hpack, h11, chardet, idna, hstspreload, h2, httpcore, httpx, googletrans Attempting uninstall: h11 Found existing installation: h11 0.14.0 Uninstalling h11-0.14.0: Successfully uninstalled h11-0.14.0 Attempting uninstall: idna Found existing installation: idna 3.6 Uninstalling idna-3.6: Successfully uninstalled idna-3.6 Attempting uninstall: httpcore Found existing installation: httpcore 1.0.4 Uninstalling httpcore-1.0.4: Successfully uninstalled httpcore-1.0.4 Attempting uninstall: httpx Found existing installation: httpx 0.27.0 Uninstalling httpx-0.27.0: Successfully uninstalled httpx-0.27.0 ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. openai 1.14.1 requires httpx<1,>=0.23.0, but you have httpx 0.13.3 which is incompatible. Successfully installed chardet-3.0.4 googletrans-3.1.0a0 h11-0.9.0 h2-3.2.0 hpack-3.0.0 hstspreload-2024.3.1 httpcore-0.9.1 httpx-0.13.3 hyperframe-5.2.0 idna-2.10 rfc3986-1.5.0 설치오류 무시하고 google_trans() 실행시 --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) Cell In[14], line 1 ----> 1 from googletrans import Translator 3 def google_trans(messages): 4 google = Translator() File e:\Python\inflearn_chatGPT-main\ch09\ch09_env\Lib\site-packages\googletrans\__init__.py:6 2 __all__ = 'Translator', 3 __version__ = '3.1.0-alpha' ----> 6 from googletrans.client import Translator 7 from googletrans.constants import LANGCODES, LANGUAGES # noqa File e:\Python\inflearn_chatGPT-main\ch09\ch09_env\Lib\site-packages\googletrans\client.py:27 22 from googletrans.models import Translated, Detected 24 EXCLUDES = ('en', 'ca', 'fr') ---> 27 class Translator: 28 """Google Translate ajax API implementation class 29 30 You have to create an instance of Translator to use this API (...) 52 :type raise_exception: boolean 53 """ 55 def __init__(self, service_urls=DEFAULT_CLIENT_SERVICE_URLS, user_agent=DEFAULT_USER_AGENT, 56 raise_exception=DEFAULT_RAISE_EXCEPTION, ... 59 http2=True): 61 self.client = httpx.Client(http2=http2) 62 if proxies is not None: # pragma: nocover AttributeError: module 'httpcore' has no attribute 'SyncHTTPTransport' Output is truncated. View as a scrollable element or open in a text editor. Adjust cell output settings...

  • python
  • 챗봇
  • streamlit
  • openai
  • chatgpt
doRemiPa 댓글 1 좋아요 0 조회수 290

import pygame에서 계속 오류가 발생해요

미해결

파이썬 무료 강의 (활용편1) - 추억의 오락실 게임 만들기 (3시간)

cmd에서 import pygame했을 때는 오류없이 제대로 됐는데 Vs code에서 import pygame을 하면 이런 오류가 계속해서 발생합니다. 어떻게 해야되나요? Exception has occurred: ModuleNotFoundError No module named 'pygame' File " C:\Users\User\Desktop\PythonWorkspace\pygame_basic\1_create_ frame.py ", line 1, in <module> import pygame ModuleNotFoundError: No module named 'pygame'

  • python
  • pygame
  • gui
서민서 댓글 2 좋아요 0 조회수 3713

기본환경설정(2-1) 강의에서, Ctrl+F5 눌러도 Hello python!일 출력되지 않습니다.

미해결

프로그래밍 시작하기 : 파이썬 입문 (Inflearn Original)

안녕하세요. 이전강의들을 포함해서, "파이썬 기본 환경 설정(2-1) : 개발 환경 설정(Vscode) - Windows" 강의 내용을 그대로 따라서 했습니다. 그런데 해당 강의 동영상의 25:33에서처럼 Ctrl+F5 단축키를 누르거나 Run 메뉴에서 Run Without Debugging을 직접 선택해도, 강의에서처럼 Hello python!이 출력되지 않고 이렇게 Select debugger라고 나옵니다. 이때 무엇을 선택해야 하나요? 어떻게 하면 강사선생님처럼 Run Without Debugging을 실행할 수 있나요? 참고로 오른쪽 상단의 오른쪽 방향 세모 아이콘을 클릭하면 문제없이 실행하고 Hello python!이 출력됩니다. (저는 단축키 설정에 대해서 질문을 드린 게 아닙니다.)

  • python
defoogle 댓글 2 좋아요 0 조회수 619

안녕하세요 복습은 어떤식으로 하면 되나요

미해결

[리뉴얼] 파이썬입문과 크롤링기초 부트캠프 [파이썬, 웹, 데이터 이해 기본까지] (업데이트)

안녕하세요 복습은 어떤식으로 하면 되나요

  • python
  • 웹-크롤링
닉네임을 등록해주세요 댓글 1 좋아요 0 조회수 258

포스트맨 구성이 달라졌어요

미해결

[리뉴얼] 파이썬입문과 크롤링기초 부트캠프 [파이썬, 웹, 데이터 이해 기본까지] (업데이트)

- 본 강의 영상 학습 관련 문의에 대해 답변을 드립니다. (어떤 챕터 몇분 몇초를 꼭 기재부탁드립니다) - 이외의 문의등은 평생강의이므로 양해를 부탁드립니다 - 현업과 병행하는 관계로 주말/휴가 제외 최대한 3일내로 답변을 드리려 노력하고 있습니다 - 잠깐! 인프런 서비스 운영(다운로드 방법포함) 관련 문의는 1:1 문의하기를 이용해주세요. 포스트맨 구성이 달라져서 블로그 보고 따라해봐서 성공했습니다 업데이트 되어 달라진 것 같아서, 다른 분들도 참고하실 수 있게 강의 내용도 업데이트 되거나 게시판에 업로드 해주시면 좋을 거 같습니다-

  • python
  • 웹-크롤링
  • 포스트맨
juhyun2393 댓글 2 좋아요 2 조회수 444

강의자료 부탁드립니다

미해결

프로그래밍 시작하기 : 파이썬 입문 (Inflearn Original)

rokoppa@gmail.com 입니다. 감사합니다~!

  • python
댓글 1 좋아요 0 조회수 223

기본환경설정(2-1), (Ctrl+)F5누르면 실행하지 않고 Select debugger라고 뜹니다.

미해결

프로그래밍 시작하기 : 파이썬 입문 (Inflearn Original)

안녕하세요. F5나 Ctrl+F5를 누르면 코드를 실행하지 않고 첨부한 캡쳐처럼 Select debugger 라고 뜹니다. 그리고 오른쪽의 세모를 클릭하면 실행합니다. 강의대로 그대로 따라했는데 제가 무언가 빠뜨린 게 있는 건가요? 어떻게 해야하죠? 감사합니다!

  • python
defoogle 댓글 3 좋아요 0 조회수 2256

asyncio.run() cannot be called from a running event loop 에러 질문 드립니다

미해결

실습으로 끝장내는 웹 크롤링과 웹 페이지 자동화 & 실전 활용

안녕하세요 선생님 강의 듣고 있는 이광희라고 합니다. 올려주신 강의로 텔레그램 자체 API를 써서 메세지 전송하기까진 했는데요 이미지를 전송하려고 보니 거의 모든 블로그, 유튜브 설명들이 파이썬 텔레그램봇으로 설명 하더라구요 근데 이 봇이 v20으로 바뀌면서 비동기 프로그래밍(?)이 된거 같습니다. 설명하고 있는 코드들이 다 과거 버전 코드들이네요. 그래서 위키에 직접 가서 코드를 보고 있는데요 import asyncio import telegram async def main(): bot = telegram.Bot("TOKEN") async with bot: print(await bot.get_me()) if __name__ == '__main__': asyncio.run(main()) 그냥 위키에 나오는 간단한 코드인데도 RuntimeError: asyncio.run() cannot be called from a running event loop 이런 에러가 계속 뜹니다. async 부터 공부하려고 다른 유튜브를 찾아서 import asyncio async def main(): await asyncio.sleep(1) print('hello') asyncio.run(main()) 이런 간단한 코드를 입력해도 똑같은 오류가 뜨네요... 이벤트 메인 루프가 실행되고 있는 동안에 함수가 작동할수 없다 그런 내용인거 같은데 위키에 있는 그대로 따라해도 에러가 나니 비전공자 입장에서는 어떻게 해야 좋을지 모르겠네요. 경영학과 출신 직장인이 실무에서 쓰려고 파이썬을 배우고 있는데 물어볼곳이 여기밖에 없어 여쭤봅니다ㅠㅠ 좀 도와주세요 깃헙? 말고 국내 파이썬 qna있는 커뮤니티라도 알려주시면 가서 좀 물어보고 싶은데 그게 어디인지도 모르겠네요.

  • python
  • 웹-크롤링
  • selenium
  • beautifulsoup
Kwanghee Lee 댓글 4 좋아요 0 조회수 3997

ch07 urllib error

미해결

초보자를 위한 ChatGPT API 활용법 - API 기본 문법부터 12가지 프로그램 제작 배포까지

mac에서의 문제인지 다른 문제인지 모르겠지만 실습 중 urllib 에러가 발생해서 다음과 같이 해결했습니다. 다른 분들에게 도움이 되었으면 좋겠네요. 그리고 urllib만 import해오면 urlretrieve를 불러오지 못해서 urllib.request를 import했습니다. <에러 메시지> Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/urllib/request.py", line 1344, in do_open h.request(req.get_method(), req.selector, req.data, headers, File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 1319, in request self._send_request(method, url, body, headers, encode_chunked) File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 1365, in send request self.endheaders(body, encode_chunked=encode_chunked) File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 1314, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 1074, in send output self.send(msg) File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 1018, in send self.connect() File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 1460, in connect self.sock = self._context.wrap_socket(self.sock, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/ssl.py", line 455, in wrap_socket return self.sslsocket_class._create( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/ssl.py", line 1046, in _create self.do_handshake() File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/ssl.py", line 1317, in do_handshake self._sslobj.do_handshake() ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/Users/adampark/Documents/personal/inflearn_chatGPT/ch08/01_dalle_exp_NewVersion.py", line 18, in <module> urllib.request.urlretrieve(image_url, "test.jpg") File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/urllib/request.py", line 240, in urlretrieve with contextlib.closing(urlopen(url, data)) as fp: ^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/urllib/request.py", line 215, in urlopen return opener.open(url, data, timeout) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/urllib/request.py", line 515, in open response = self._open(req, data) ^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/urllib/request.py", line 532, in _open result = self._call_chain(self.handle_open, protocol, protocol + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/urllib/request.py", line 492, in call chain result = func(*args) ^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/urllib/request.py", line 1392, in https_open return self.do_open(http.client.HTTPSConnection, req, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/urllib/request.py", line 1347, in do_open raise URLError(err) urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)> <해결> pip install certifi CERT_PATH=$(python -m certifi) export SSL_CERT_FILE=${CERT_PATH} export REQUESTS_CA_BUNDLE=${CERT_PATH} https://github.com/asdf-community/asdf-python/issues/106

  • python
  • 챗봇
  • streamlit
  • openai
  • chatgpt
team.dev+be 댓글 1 좋아요 1 조회수 653

Custom Agent executor error

해결됨

실리콘밸리 엔지니어와 함께하는 랭체인(LangChain)과 랭그래프(LangGraph) 그리고 MCP

else: print("TOOL NAME : ", output.tool) print("TOOL INPUT : ", output.tool_input) Traceback (most recent call last): File "/Users/chaejinjeong/Desktop/myGit/Study/langchain/inflearn/5.Agent/basic.py", line 75, in <module> print("TOOL NAME : ", output.tool) output : [OpenAIToolAgentAction(tool='get_word_length', tool_input={'word': 'eudca'}, log="\nInvoking: `get_word_length` with `{'word': 'eudca'}`\n\n\n", message_log=[AIMessage(content='', additional_kwargs={'tool_calls': [{'id': 'call_DlTa5qRanu9HhiWGneMz2V3C', 'function': {'arguments': '{"word":"eudca"}', 'name': 'get_word_length'}, 'type': 'function'}]})], tool_call_id='call_DlTa5qRanu9HhiWGneMz2V3C')], <class 'list'> output.tool 이라는 속성이 없어서 print 해보니 AgentAction List 형태로 출력이 되었습니다. intermediate_steps = [] final_result = dict() while True: query.update({"intermediate_steps": intermediate_steps}) output: Union[AgentFinish, AgentAction] = agent.invoke(query) if isinstance(output, AgentFinish): final_result = output.return_values final_result = final_result.get("output") break else: if isinstance(output, list): output = output[0] print("TOOL NAME : ", output.tool) print("TOOL INPUT : ", output.tool_input) _tool = tools.get(output.tool) observation = _tool.run(output.tool_input) intermediate_steps.append((output, observation)) TOOL NAME : get_word_length TOOL INPUT : {'word': 'eudca'} 위처럼 인덱스 0으로 접근해서 처리해야할 것 같아 글 남깁니다.

  • NLP
  • openai
  • 프롬프트엔지니어링
  • llm
  • langchain
정채진 댓글 2 좋아요 1 조회수 427

summary buffer memory token_limit 질문

해결됨

실리콘밸리 엔지니어와 함께하는 랭체인(LangChain)과 랭그래프(LangGraph) 그리고 MCP

token_limit 은 대화의 input, output set 개수 일까요 ?

  • NLP
  • openai
  • 프롬프트엔지니어링
  • llm
  • langchain
정채진 댓글 2 좋아요 1 조회수 312

[공유] SQLDatabase를 에디터에서 인식하지 못한다면

해결됨

실리콘밸리 엔지니어와 함께하는 랭체인(LangChain)과 랭그래프(LangGraph) 그리고 MCP

from langchain_community.utilities import SQLDatabase from langchain_community.utilities.sql_database import SQLDatabase vscode 에서 extension이 SQLDatabase를 코드를 수행할때는 상관없는데, 에디터상에서 인지못하는 문제가 있었어요 그런데 sql_database라는 패키지명까지 붙이니 해결되었습니다

  • NLP
  • openai
  • 프롬프트엔지니어링
  • llm
  • langchain
정채진 댓글 1 좋아요 1 조회수 311

ChatPromptTemplate.from_messages(("ai", ...)) 질문

해결됨

실리콘밸리 엔지니어와 함께하는 랭체인(LangChain)과 랭그래프(LangGraph) 그리고 MCP

ChatPromptTemplate.from_messages(("ai", ...)) 에서 system과 human은 Context와 Role을 주는 역할인지 알겠는데 ai는 어떤 역할인가요 ?

  • NLP
  • openai
  • 프롬프트엔지니어링
  • llm
  • langchain
정채진 댓글 1 좋아요 1 조회수 422

결측값 채우지관련해서

해결됨

[퇴근후딴짓] 빅데이터 분석기사 실기 (작업형1,2,3)

안녕하십니까? 결측값 채우기 중 최빈값 관련해서,, m = X_train['workclass'].mode()[0] 여기서 mode()과 mode()[0]의 차이는 무엇인지요? 즉 [0]의 쓰임이 무엇인지? 다른 중앙값, 평균 등은 이런게 없는데 왜 최빈값만 이런게 뒤에 붙는지요?

  • python
  • 머신러닝
  • 빅데이터
  • pandas
  • 빅데이터분석기사
kccjjang 댓글 2 좋아요 0 조회수 255

chroma db import 가 업데이트된 것 같습니다.

해결됨

실리콘밸리 엔지니어와 함께하는 랭체인(LangChain)과 랭그래프(LangGraph) 그리고 MCP

from langchain_community.vectorstores.chroma import Chroma 이렇게 되어야 Chroma를 vscode에서 인식하는 것 같습니다.

  • NLP
  • openai
  • 프롬프트엔지니어링
  • llm
  • langchain
정채진 댓글 1 좋아요 1 조회수 525

CommonList output이 안되는데 무엇이 문제일까요 ?

해결됨

실리콘밸리 엔지니어와 함께하는 랭체인(LangChain)과 랭그래프(LangGraph) 그리고 MCP

from langchain.output_parsers import CommaSeparatedListOutputParserfrom langchain.prompts import PromptTemplate output_parser = CommaSeparatedListOutputParser() format_instructions = output_parser.get_format_instructions()print(f"instruction : {format_instructions}")# instruction : Your response should be a list of comma separated values, eg: `foo, bar, baz` prompt = PromptTemplate( template="List five {subject}.\n{format_instructions}", input_variables=["subject"], partial_variables={"format_instructions": format_instructions},) from langchain_openai import OpenAI llm = OpenAI(temperature=0) _input = prompt.format(subject="ice create flavors")output = llm.invoke(_input) print(output_parser.parse(output)) # ['1. Vanilla\n2. Chocolate\n3. Strawberry\n4. Mint\n5. Coffee'] 이렇게 작성했는데, Output이 ['1. Vanilla\n2. Chocolate\n3. Strawberry\n4. Mint\n5. Coffee'] 이렇게 나옵니다.. parser의 문제일까요 모델의 문제일까요 ?

  • NLP
  • openai
  • 프롬프트엔지니어링
  • llm
  • langchain
정채진 댓글 2 좋아요 1 조회수 291

Langchain version이 업데이트 되어서 코드를 수정해야할 것 같습니다.

해결됨

실리콘밸리 엔지니어와 함께하는 랭체인(LangChain)과 랭그래프(LangGraph) 그리고 MCP

from langchain_openai import OpenAI llm = OpenAI(model="davinci-002") OpenAI 라이브러리 import 하는 방식과 text-devinci-003 모델이 이제 서비스를 안하는 것 같습니다. 위처럼하고 몇번 수행하니 같은 결과가 나왔습니다.

  • NLP
  • openai
  • 프롬프트엔지니어링
  • llm
  • langchain
정채진 댓글 2 좋아요 1 조회수 1076

선생님 혹시 SSV 파일을 json으로 변환할 방법이 있을까요?

미해결

파이썬으로 뭘 만들지? 남박사의 파이썬 알쓸파잡

안녕하세요. 선생님 수업을 통해 크롤링까지는 성공했습니다. HTTP POST 요청으로 받아왔는데요. 다만 Response가 넥사크로에서 사용하는 "SSV"형식으로 왔습니다. SSV:UTF-8ErrorCode:string=0ErrorMsg:string=Dataset:ds_PageList_RowType_TAXNO:string(255)TAXIDX:string(255)MEMBNAM:string(255)TSDATE:string(255)TSTIME:string(255)ACQBID:string(255)CARD_NAME:string(255)HID:string(255)ACQHID:string(255)TERMID:string(255)MTRCNO:string(255)CDNO:string(255)AUTHNO:string(255)ISTMMON:string(255)CURRCODE:string(255)AMT1:bigdecimal(25)AMT2:bigdecimal(25)AMT3:bigdecimal(25)ACQDATE:string(255)DDCEDI:string(255)...... <생략> 이렇게 못생긴 데이터가 왔는데요. 이걸 json으로 파싱하고싶어서요. 이리저리 혼자서 아스키코드 찾아보고 US, RS 사용해서 어떻게든 파싱은 했는데, 제가 짠 로직이 맞나 싶어서요. (일단 작동은 되는데.. ) 혹시 선생님이라면 어떻게 하실까 싶어서요. 이런걸 잘 파싱하려면 알고리즘을 공부해야되는걸까요? 아! 그리고 깃헙에 혹시 라이브러리가 있나 찾아봤는데요. 안나오더라구요. 이게 제일 슬펐어요. 그나저나 저런거 만드는 사람들은 정말 괴물같네요.. 저런걸 도대체 어떻게 만드는 걸까요? (코드가 본문에 저렇게 붙여넣어지는 기능도 신기하네요.. 저런건 또 어떻게 만드나요?)

  • python
  • 웹-크롤링
  • gui
포포 댓글 2 좋아요 0 조회수 846

DAY11 영상에 오타있네요

미해결

기초 알고리즘 코딩테스트 40일 완성 (by 하루코딩)

최댓값 문제 2566번인데 2556번(별 찍기 - 14)로 숫자가 잘못되어있습니다. 수정 부탁드립니다.

  • python
  • java
  • 코딩-테스트
kairs294702 댓글 2 좋아요 0 조회수 292

코드가 실행되는 순서에 관하여

해결됨

삼각형의 실전! OpenAI Triton 초급

@triton.jit def add_kernel(x_ptr, y_ptr, z_ptr, size, block_size: tl.constexpr): (...) def add(x, y): z = (...) size = (...) def grid(meta): return (triton.cdiv(size, meta["block_size"]),) add_kernel[grid](x, y, z, size, 1024) return z 안녕하세요 vector_ add.py 를 보던 중, 코드 라인이 실행되는 순서가 궁금하여 질문남깁니다 수업에서 runtime 때 meta가 받아진다고 말씀해주셨는데요. 그렇다면 코드가 실행되는 순서가 runtime 동안 add_kernel의 argument로 들어온 x, y, z, size, 1024가 meta로 받아지고 meta를 이용해 grid가 (n, )의 형태로 set되고 그 이후 add_kernel이 실행된다 가 맞을까요? 또 하나 궁금한 것은 아래 라인이 실행될 때 @triton.jit 데코레이터의 역할인데요 add_kernel[grid](x, y, z, size, 1024) (x, y, z, size, 1024)를 meta로 받아준다 그 meta가 적용된 특정 grid 설정 위에서 add_kernel 함수가 실행될 수 있게 해준다 일까요? 파이썬에서 원래 함수는 subscriptable하지 않아, 위 syntax가 생소해서 질문드립니다

  • python
  • 딥러닝
  • cnn
  • gpgpu
  • dropout
  • openai
  • argmax
  • relu
  • triton
  • kernel-programming
tritonman 댓글 1 좋아요 0 조회수 389

인기 태그

인프런 TOP Writers

주간 인기글