inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

묻고 답해요

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

설치 오류

해결됨

챗GPT와 파이썬으로 주식 자동매매 앱 및 웹 투자 리포트 만들기

아나콘다 프롬프트에서 파이썬 정상 설치 후 platform 입력 시 syntax error 가 뜹니다 ㅠ

  • python
  • 재테크
  • streamlit
  • chatgpt
  • 프롬프트엔지니어링
정동학 댓글 1 좋아요 0 조회수 261

비쥬얼 스튜디오에서는 되는데 명령 프롬포트에선 실행되지 않습니다

미해결

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

프롬포트 C:\>C:\infrun\qwer\python1.0_source\source_code\chapter10_ 011.py what is your nameiys hi iys time to play hangman man start loading Traceback (most recent call last): File "C:\infrun\qwer\python1.0_source\source_code\chapter10_011.py", line 21, in <module> with open('source_code/resource/word_list.csv','r') as f: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ FileNotFoundError: [Errno 2] No such file or directory: 'source_code/resource/word_list.csv' 비쥬얼 스튜디오 import time import csv import random import winsound name = input('what is your name') print('hi',name,'time to play hangman man') print() time.sleep(1) print('start loading') print() time.sleep(0.5) words=[] with open('source_code/resource/word_list.csv','r') as f: reader = csv.reader(f) next(reader) for c in reader: words.append(c) random.shuffle(words) q = random.choice(words) words=q[0].strip()

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

2차원 dp 11:45분에서 하상좌우 순서에 의미가 있나요?

해결됨

2주만에 통과하는 알고리즘 코딩테스트 (2024년)

상하좌우 순서 고쳐주셨다고 하셔서 그냥 순서 바꿔서 해봤더니 값이 다르게 나오네요.. 이해가 안됩니다 센세 ㅠㅠ흑흑

  • python
  • 코딩-테스트
  • 알고리즘
shinmj8721@naver.com 댓글 2 좋아요 1 조회수 219

common.service.ts-composeFindOptions

해결됨

[코드팩토리] [초급] NestJS REST API 백엔드 완전 정복 마스터 클래스 - NestJS Core

private composeFindOptions<T extends BaseModel>( dto: BasePaginationDto, ): FindManyOptions<T> { /** * where, order, take, skip 반환 * skip-> page based pagination에서만 */ /** * DTO의 현재 생긴 구조는 아래와 같다. * * { * where__id__more_than: 1, * order__createdAt: 'ASC, * } * * 현재는 where__id__more_than / where__id__less_than에 해당하는 where 필터만 사용중이지만 * 나중에 추가적인 where 필터를 넣고싶어졌을 때 모든 where 필터를 자동으로 파싱할 수 있을만한 기능이 * 필요하다.. * * 1) where로 시작한다면 필터 로직을 적용 * 2) order로 시작한다면 정렬 로직을 정용한다. * 3) 필터 로직을 적용한다면 '__' 기준으로 split 했을 때 3개의 값으로 나뉘는지 2개인지 확인한다. * 3-1) 3개의 값으로 나뉜다면 FILTER_MAPPER에서 해당되는 operator 함수를 찾아서 적용한다. * ex) ['where', 'id', 'more_than'] -> more_than을 실제 typeorm-operator로 적용 * 3-2) 2개의 값으로 나뉜다면 정확한 값을 필터하는 것이기 때문에 operator 없이 적용한다. * ex) ['order', 'createdAt'] -> operator 필요 X * 4) order의 경우 3-2와 같이 적용한다. */ let where: FindOptionsWhere<T> = {}; let order: FindOptionsOrder<T> = {}; for (const [key, value] of Object.entries(dto)) { if (key.startsWith('where__')) { where = { ...where, ...this.parseWhereFilter(key, value), }; } else if (key.startsWith('order__')) { order = { ...order, ...this.parseWhereFilter(key, value), }; } } return { where, order, take: dto.take, skip: dto.page ? dto.take * (dto.page - 1) : null, }; } 여기서 함수가 실행되면 where, order은 빈 객체로 초기화 되는데 왜 for 문 안에선 ...where, ...order을 해주는건가요?

  • javascript
  • typescript
  • rest-api
  • nestjs
  • backend
김동민 댓글 1 좋아요 0 조회수 143

postgres connection 관련 질문입니다 !

미해결

[코드팩토리] [초급] NestJS REST API 백엔드 완전 정복 마스터 클래스 - NestJS Core

지금 섹션 10?? 정도 듣고 있는데 docker-compose.yaml 파일 작성 하고 TypeOrmModule imports 해서 연결 하는 중인데 궁금한게 강의를 듣는 로컬 컴퓨터에도 postgres가 설치되어 있어야 하나요?? 영상에는 설치에 대한 부분이 없던것 같아서요 typeorm module 연결 하는 부분에서 database가 존재하지 않는다고 하는데 1번이 맞다면 postgres에서 db를 직접 만들어 준 다음에 typeormmodule 연결 해야 할까요?? << 이게 맞다면 영상이 누락된건가요?ㅠ 마침 pgadmin이 깔려 있고 postgres 14버전에 마침 postgres 라는 이름을 가진 db가 존재 해서 섹션9 POSTGRES_DB: postgres 실습 까지는 마친것 같은데 다음섹션에서 typeormstudy쪽은 이상하게 진행이 안되더라구요... 연구 결과 도커 컴포즈 파일의 ports 5432:5432중 앞의 포트는 로컬 컴퓨터의 포트이다. 로컬 컴퓨터에 postgres가 설치되어 있지 않다면 강의 영상처럼 따라하면 된다. 로컬 컴퓨터에 postgres가 설치되어 있다면 로컬 5432 포트를 postgres가 사용 중일 것이다. 3번이라면 5432 외의 다른 포트를 활용해 진행 하는 방법이 있고, postgres 설치 과정이 기억 난다면 app.module에서 typeorm 초기화 할때 설치하며 세팅했던 dbname, user, pwd 입력해 연결하면 된다. 끗 5432 포트 정보 확인 $ lsof -i tcp:5432 // mac기준 윈도우는 검색... ```

  • javascript
  • typescript
  • rest-api
  • nestjs
  • backend
  • typeorm
  • postgres
ajrfyd 댓글 1 좋아요 1 조회수 285

consol.log설정

해결됨

한 번에 끝내는 자바스크립트: 바닐라 자바스크립트로 SPA 개발까지

안녕하세요 선생님 제가 설정이 뭔가 틀어졌는지 consol.log하면 선생님처럼 console창이 안뜨고 이렇게 뜨는데 어떻게 해결할 수 있는 방법이 없을까요? 선생님처럼 콘솔창이 떴으면 좋겠습니다.

  • javascript
  • rest-api
  • spa
  • dom
미미쓰 댓글 1 좋아요 1 조회수 220

pycharm setting에서 질문 드려요.

미해결

웹크롤링 with 파이썬

안녕하세요? pycharm 세팅에서 python interpreter 설정 시 설정한 패키지가 보이지 않아서요ㅠㅡㅠ 여러번 다시 따라했는데 안되는데 방법이 있을까요?ㅜ.ㅜ

  • python
  • 웹-크롤링
  • selenium
aoisora821026 댓글 2 좋아요 0 조회수 263

공부 방법

미해결

파이썬 알고리즘 문제풀이 입문(코딩테스트 대비)

-안녕하세요 선생님 강의 잘 듣고 있습니다. 제가 구현이 너무 안되어서....이 강의를 듣게 되었습니다..혼자 코드업 문제 등을 풀어보면 해결이 안되는 문제는 몇일씩 고민해도 시간만 가고 해결이 안되더라구요... 그래서 방법을 한번 바꿔볼까 해서 이 강의를 듣게 되었어요.. 선생님 강의를 전체 한번 쭉 다 듣고 다시 개인적으로 공부하는 방법이 어떤가 싶어 문의드립니다.. 알고리즘을 떠올리기가 힘듭니다...ㅜ 지금 DFS문제부터 듣고 있습니다.. 뒷 부분 강의부터 먼저 접해보면 앞부분의 문제는 좀더 쉽게 해결되지 않을까 해서요....;; 공부 방법에 대해 선생님께 조언을 좀 구하고저 합니다... 작성된 코드는 대부분 다 이해를 합니다..구현이 너무나 어렵습니다....ㅠㅠ 조언 부탁드립니다..

  • python
  • 코딩-테스트
red71004 댓글 1 좋아요 0 조회수 183

실습문제 14 관련 문의

미해결

[신규 개정판] 코딩 입문자를 위한 파이썬 완벽가이드

안녕하세요 실습문제 풀어보다가 질문이 생겨서 남깁니다! 해당 문제인 경우는 팀원의 수가 적어서 3이라는 숫자로 적어서 나누는게 가능했지만, 만약 팀원의 수가 굉장히 많다면 해당 함수는 쓰기 어려워질까요? (어차피 매개변수에 그만큼 나열해야하니 효율성문제로) sql과 달리 avg라는 연산자가 없는 것 같아서요! 또한 int를 적용하지 않았는데 덧셈연산자가 작동한 이유를 알고 싶습니다! 어렴풋하게만 느낌이 와서 정확히 알고 싶습니다.

  • python
dmsal0544 댓글 2 좋아요 0 조회수 159

타임시리즈 데이터 가져오기에서 에러원인이 무엇인가요?

해결됨

파이썬 알고리즘 트레이딩 파트2: Interactive Brokers API를 활용한 실시간 알고리즘 트레이딩

stock-trading-eda-scheduled.ipynb 파일에서 데이트 타임을 당겨오면 아래와 같은 에러메세지가 출력됩니다. 어떤 현상인가요?

  • python
  • 객체지향
  • 퀀트
chopa111 댓글 2 좋아요 0 조회수 238

보스턴 집값 예측 15번 강의에 쓰이는 csv

해결됨

파이썬으로 시작하는 머신러닝+딥러닝(sklearn을 이용한 머신러닝부터 TensorFlow, Keras를 이용한 딥러닝 개발까지)

보스턴 집값 예측 15번 강의에 쓰이는 csv는 어디서에서 다운받는지요?

  • python
  • 머신러닝
  • 딥러닝
  • keras
  • sklearn
dekman 댓글 1 좋아요 2 조회수 258

테스트코드

미해결

[코드팩토리] [초급] NestJS REST API 백엔드 완전 정복 마스터 클래스 - NestJS Core

강의 너무 잘 보고있습니다. ㅎㅎ 혹시 테스트 코드 이번강의에 넣지 않으신 이유가 있나요 ?

  • javascript
  • typescript
  • rest-api
  • nestjs
  • backend
SJ 댓글 1 좋아요 0 조회수 168

기본 3강부터 막혀 멍청해서 화가납니다 ㅠㅠ

해결됨

2주만에 통과하는 알고리즘 코딩테스트 (2024년)

제곱수의 합문제요.. 6일 경우 제곱이 되려면 루트6밖에 안되는데 왜 2가 2로 떨어지는 약수의 개수로 카운팅되는지 이해를 못하겠네요… 또 3의 제곱 5의 제곱은 왜 고려안하는지도… ( 이미 이해 다 됐다고 가정해서 말씀하신건지도 모르겠습니다.ㅠㅠ ) 바보도 알고리즘 천재로 만들어주신다고 들어서 잘 알려주시면 감사드리겠습니다 ㅠㅠ

  • python
  • 코딩-테스트
  • 알고리즘
0S 댓글 2 좋아요 1 조회수 518

안녕하세요. 강사님께서 제공해주신 코드로 다른 문제를 풀려고 합니다.

해결됨

세계 대회 진출자가 알려주는 코딩테스트 A to Z (with Python)

안녕하세요. 강사님께서 제공해주신 이분탐색 1번 2번 코드중 2번 코드로 새로운 문제를 풀려고 합니다. 1번 코드(left와 right 설정)으로는 잘 풀리는데 2번 코드(cur과 step 설정)로는 잘 안풀리네요. 백준 2343번 기타문제를 강사님께서 제공해주신 코드로 풀려고 아래와 같이 코드를 짜보았습니다. 하지만 원하는 결과를 얻지 못했는데요. 어떤 부분이 잘못된건지 알려주실 수 있을까요?? nums, blue_nums = map(int, input().split()) bluelay_length = list(map(int, input().split())) def check(length): count = 1 current_length = 0 for i in bluelay_length: if current_length + i <= length: current_length += i else: current_length = i count += 1 return count == blue_nums cur = 0 steps = 10000+1 while steps > 0: while cur + steps <= 10000+1 and check(cur + steps): cur += steps steps //= 2 print(cur) 감사합니다.

  • python
  • 코딩-테스트
  • 알고리즘
승환 김 댓글 2 좋아요 0 조회수 181

엑셀에 저장하기

미해결

[신규 개정판] 이것이 진짜 크롤링이다 - 실전편 (인공지능 수익화)

# 엑셀 저장 df.to _excel( 'naver_finance_crawling.xlsx' ) 이렇게 했을 때 TypeError Traceback (most recent call last) Cell In[25], line 2 1 # 엑셀 저장 ----> 2 df .to_excel('naver_finance_crawling.xlsx', engine_kwargs=None) File ~/anaconda3/lib/python3.10/site-packages/pandas/util/_decorators.py:333 , in wrapper (*args, **kwargs) 324 return func(*args, **kwargs) 326 kind = inspect.Parameter.POSITIONAL_OR_KEYWORD 327 params = [ 328 inspect .Parameter("self", kind), 329 inspect .Parameter(name, kind, default=None ), 330 inspect .Parameter("index", kind, default=None ), 331 inspect .Parameter("columns", kind, default=None ), 332 inspect .Parameter("axis", kind, default=None ), --> 333 ] 335 for pname, default in extra_params: 336 params .append(inspect.Parameter(pname, kind, default=default)) File ~/anaconda3/lib/python3.10/site-packages/pandas/core/generic.py:2417 , in to_excel (self, excel_writer, sheet_name, na_rep, float_format, columns, header, index, index_label, startrow, startcol, engine, merge_cells, inf_rep, freeze_panes, storage_options, engine_kwargs) 2294 @final 2295 @doc(storage_options=_shared_docs["storage_options"]) 2296 def to_json( (...) 2309 storage_options: StorageOptions = None , ... 2547 """ 2548 from pandas.io import json 2550 if date_format is None and orient == "table": TypeError : ExcelFormatter.write() got an unexpected keyword argument 'engine_kwargs' Output is truncated. View as a scrollable element or open in a text editor . Adjust cell output settings ... 이런 에러가 발생합니다. 열심히 구글링을 해보았지만, 답을 찾을 수 없어서 질문 남깁니다 ㅠㅠ python은 3.10 사용중이고 pandas는 1.3.5 사용중입니다.

  • python
  • 웹-크롤링
신승민 댓글 2 좋아요 0 조회수 223

AuthService를 주입 받지 못하는 이유를 모르겠어요

미해결

[코드팩토리] [초급] NestJS REST API 백엔드 완전 정복 마스터 클래스 - NestJS Core

코팩님 강의를 따라서 코드를 작성했는데, 강의 영상을 봐도 BasicTokenGuard 에서 AuthService 를 주입 못 하는 이유를 모르겠어요.. AuthModule에가 가서 imports이랑 provider에 BasicTokenGuard를 넣어도 해결되지 않네여.. 가드의 위치는 강의랑 똑같이 auth/guard 폴더 안에 위치하고 있어요.. 원인이 대체 뭘까요..?

  • javascript
  • typescript
  • rest-api
  • nestjs
  • backend
혀니 댓글 2 좋아요 0 조회수 273

강의 자료 부탁드립니다.

미해결

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

강의 자료 부탁드립니다! huo2100@naver.com

  • python
박건율 댓글 1 좋아요 0 조회수 157

pd.concat(df, ignore_index=True) InvalidIndexError 해결 방법 문의

미해결

내 업무를 대신 할 파이썬(Python) 웹크롤링 & 자동화 (feat. 주식, 부동산 데이터 / 인스타그램)

안녕하세요. 아래 코드에서 마지막 부분에서 에러가 발생하는데 찾아봐도 해결을 못하겠습니다. # 최종 데이터 합치기 df1 = pd.concat(df, ignore_index=True) --------------------------------------------------------------------------- InvalidIndexError Traceback (most recent call last) Cell In[89], line 2 1 # 최종 데이터 합치기 ----> 2 df1 = pd.concat(df, ignore_index=True) File ~\anaconda3\Lib\site-packages\pandas\core\reshape\concat.py:393, in concat(objs, axis, join, ignore_index, keys, levels, names, verify_integrity, sort, copy) 378 copy = False 380 op = _Concatenator( 381 objs, 382 axis=axis, (...) 390 sort=sort, 391 ) --> 393 return op.get_result() File ~\anaconda3\Lib\site-packages\pandas\core\reshape\concat.py:676, in _Concatenator.get_result(self) 674 obj_labels = obj.axes[1 - ax] 675 if not new_labels.equals(obj_labels): --> 676 indexers[ax] = obj_labels.get_indexer(new_labels) 678 mgrs_indexers.append((obj._mgr, indexers)) 680 new_data = concatenate_managers( 681 mgrs_indexers, self.new_axes, concat_axis=self.bm_axis, copy=self.copy 682 ) File ~\anaconda3\Lib\site-packages\pandas\core\indexes\base.py:3875, in Index.get_indexer(self, target, method, limit, tolerance) 3872 self._check_indexing_method(method, limit, tolerance) 3874 if not self._index_as_unique: -> 3875 raise InvalidIndexError(self._requires_unique_msg) 3877 if len(target) == 0: 3878 return np.array([], dtype=np.intp) InvalidIndexError: Reindexing only valid with uniquely valued Index objects ============================ df = [] articleNos = ['2433459189','2433504511'] for articleNo in articleNos: ind_url = f'https://new.land.naver.com/api/articles/{articleNo}?complexNo=' res = requests.get(ind_url, headers=headers) ind_dict = res.json() article_df = pd.Series(ind_dict['articleDetail']).to_frame().T # articleDetail_df = articleDetail_df[['articl/eNo','articleName','buildingTypeName','realestateTypeName', 'tradeTypeName', 'cityName','divisionName', 'sectionName', 'etcAddress', 'monthlyManagementCost', 'buildingName']] if 'articleFloor' in ind_dict.keys(): articleFloor_df = pd.Series(ind_dict['articleFloor']).to_frame().T article_df = pd.concat( [ article_df, articleFloor_df, ], axis=1 ) else: print(articleNo, '/', 'articleFloor') # articleFloor_df = articleFloor_df[['totalFloorCount','correspondingFloorCount']] if 'articlePrice' in ind_dict.keys(): articlePrice = pd.Series(ind_dict['articlePrice']).to_frame().T article_df = pd.concat( [ article_df, articlePrice, ], axis=1 ) else: print(articleNo, '/', 'articlePrice') # articlePrice_df = articlePrice_df[['dealPrice','allWarrantPrice','allRentPrice']] if 'articleRealtor' in ind_dict.keys(): articleRealtor = pd.Series(ind_dict['articleRealtor']).to_frame().T article_df = pd.concat( [ article_df, articleRealtor, ], axis=1 ) else: print(articleNo, '/', 'articleRealtor') # articleRealtor_df = articleRealtor_df[['realtorName','representativeName','cellPhoneNo','representativeTelNo']] if 'articleSpace' in ind_dict.keys(): articleSpace = pd.Series(ind_dict['articleSpace']).to_frame().T article_df = pd.concat( [ article_df, articleSpace, ], axis=1 ) else: print(articleNo, '/', 'articleSpace') # articleSpace_df = articleSpace_df[['supplySpace','exclusiveSpace']] # article_df = pd.concat( # [ # articleDetail_df, # articleFloor_df, # articlePrice_df, # articleRealtor_df, # articleSpace_df, # ], # axis=1 # ) df.append(article_df) # 최종 데이터 합치기 df1 = pd.concat(df, ignore_index=True)

  • python
  • 웹-크롤링
  • pandas
  • concat
초칼라 댓글 2 좋아요 0 조회수 510

blazor실습 시 바인딩 관련 및 버튼이 동작하지 않는 이슈가 있으면? ( .NET 8.0 기준 )

미해결

[C#과 유니티로 만드는 MMORPG 게임 개발 시리즈] Part6: 웹 서버

구글링 해보니, 다음과 같은 글이 있었네요.. .Net 8.0기준으로 정적 렌더링이 기본 설정인 경우에는 Blazor 컴포넌트의 인터랙티비티가 자동으로 연결되지 않습니다. App.razor의 body영역에 있는 Routes부분에 @rendermode=RenderMode.InteractiveServer 이 코드를 추가해줍니다. 해당 부분 코드 : <Routes @rendermode=RenderMode.InteractiveServer /> 출처 : https://stackoverflow.com/questions/58196812/blazor-onclick-event-is-not-triggered

  • rest-api
  • blazor
  • web-api
  • asp.net-core
GOM방방 댓글 1 좋아요 3 조회수 400

Practice 58번 예제 반복문이요

미해결

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

선생님 코드를 화면에서는 결과값 55만 출력이 되는데 같은 코드로 주피터에서 실행하니 1 3 6 ... 55까지 전부 출력 되는데 왜 55만 출력되지 않는 걸까요? sum = 0 for index in range(1, 11): sum = sum + index print (sum )

  • python
  • 웹-크롤링
lse8189 댓글 1 좋아요 0 조회수 124

인기 태그

인프런 TOP Writers

주간 인기글