inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

묻고 답해요

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

리미트 타임에러

미해결

자바(Java) 알고리즘 문제풀이 입문: 코딩테스트 대비

소수 개수 구하기 문제 언어 : 파이썬 내용: 제가 작성한 하위 코드 for문 두 개 돌렸을뿐인데 리미트 타임에러가 뜹니다.. 구글링 해서 emurate함수 써서 푼 문제는 정답이라고 뜹니다. 난이도 초급에 emurate함수 방식으로 써서 풀라는 의도는 아니라고 판단되어 문의 드립니다. 아래 코드가 에러인지, 제가 잘 못하고 있는지 궁금합니다. (입사 전에는 자바로 면접 보고 들어갔는데 입사 한 회사에서 사용하는 언어는 파이썬이라서 파이썬으로 코테 풀고 있는점도 참고해서 피드백 부탁드립니다) received_data = int(input()) list = [] for i in range(2,received_data+1): list.append(0) for i in range(2,received_data+1): if list[i-2]==0: for j in range(2,received_data+1): if j>i and j%i==0: list[j-2]=1 print(list.count(0))

  • 코딩-테스트
  • java
  • 코테 준비 같이 해요!
  • python
xorwn12345 댓글 1 좋아요 0 조회수 278

후속 강의 Webflux가 듣고 싶습니다.

미해결

Spring Cloud로 개발하는 마이크로서비스 애플리케이션(MSA)

강의를 듣다보니, Webflux 후속 강의를 준비하실 생각이 있다고 하셨는데, 계획이 있을까요?

  • jpa
  • spring-cloud
  • 아키텍처
  • architecture
  • spring-boot
  • kafka
  • JPA
  • Kafka
  • msa
화이팅 댓글 1 좋아요 0 조회수 650

Exception has occurred: SSLError 이런 에러가 발생합니다.

미해결

[신규 개정판] 이것이 진짜 크롤링이다 - 기본편

이 강의에서 에러가 발생했습니다. 소스코드는 다음과 같습니다. import requests from bs4 import BeautifulSoup url = "https://www.naver.com/" response = requests.get(url) # 에러 발생한 부분 html = response.text soup = BeautifulSoup(html, 'html.parser') word = soup.select_one("#NM_set_home_btn") print(word.text) 위 코드중 response = requests.get(url) 위 부분에서 에러가 발생했습니다. [ 에러 내용 ] Max retries exceeded with url:강의에서 접속한 url 이런 에러가 나오고 Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available. 뒤에 이런 문장이 나옵니다. 에러 해결 방법은 무었인가요? [ 에러 전체 내용 ] 에러의 전체 내용은 다음과 같습니다. Exception has occurred: SSLError HTTPSConnectionPool(host='search.naver.com', port=443): Max retries exceeded with url: /search.naver?where=news&sm=tab_jum&query=%EC%82%BC%EC%84%B1%EC%A0%84%EC%9E%90 (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) urllib3.exceptions.SSLError: Can't connect to HTTPS URL because the SSL module is not available. During handling of the above exception, another exception occurred: urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='search.naver.com', port=443): Max retries exceeded with url: /search.naver?where=news&sm=tab_jum&query=%EC%82%BC%EC%84%B1%EC%A0%84%EC%9E%90 (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) During handling of the above exception, another exception occurred: File "D:\crawling\05. 뉴스 제목과 링크 가져오기.py", line 4, in <module> response = requests.get("https://search.naver.com/search.naver?where=news&sm=tab_jum&query=%EC%82%BC%EC%84%B1%EC%A0%84%EC%9E%90") requests.exceptions.SSLError: HTTPSConnectionPool(host='search.naver.com', port=443): Max retries exceeded with url: /search.naver?where=news&sm=tab_jum&query=%EC%82%BC%EC%84%B1%EC%A0%84%EC%9E%90 (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available."))

  • 웹-크롤링
  • 웹-크롤링
  • python
새벽별 댓글 1 좋아요 0 조회수 2025

함수 컴포넌트와 필수 Hook에서 setValue({value1:10}) 관련 질문이요!

해결됨

파이썬/장고 웹서비스 개발 완벽 가이드 with 리액트

function App2() { const [value1, setValue1] = useState(0); const [value2, setValue2] = useState(0); const [value, setValue] = useState({ value1: 0, value2: 0 }); const onClick = () => { setValue({ value1: 10 }); }; return ( <div> Hello App2 <hr /> {JSON.stringify(value1)} {JSON.stringify(value2)} {JSON.stringify(value.value1)} <button onClick={onClick}>클릭</button> </div> ); } export default App2; 여기서 onClick을 수행할때 왜 value.value1의 값이 변경되는 건가요?? 첫번째에 useState(0)으로 만든 value1은 어떻게 해야 값의 변경이 되는거죠??

  • react
  • python
  • django
  • docker
꺼넝 댓글 1 좋아요 0 조회수 400

Spring Boot 최신 3.XX 버전 Security 설정 공유드립니다.

미해결

Spring Cloud로 개발하는 마이크로서비스 애플리케이션(MSA)

최신 버전 진행하시는 분들을 위해 공유드립니다. Spring Security Configuration 설정 내용이 변경되었습니다. WebSecurityConfigurerAdapter 클래스가 deprecated되었는데요. 해당 클래스를 상속 받아 config 메소드를 구현하는 대신 SecurityFilterChain을 반환하고 직접 Bean으로 등록하도록 설정 방법이 바뀌었습니다. package com.example.userservice.security; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; import org.springframework.security.web.SecurityFilterChain; @Configuration @EnableWebSecurity public class WebSecurity { private static final String[] WHITE_LIST = { "/users/**", "/**" }; @Bean protected SecurityFilterChain config(HttpSecurity http) throws Exception { http.csrf().disable(); http.headers().frameOptions().disable(); http.authorizeHttpRequests(authorize -> authorize .requestMatchers(WHITE_LIST).permitAll()); return http.build(); } } 강의 내용을 진행하기 위해서 강의에 나온 설정을 위처럼 설정해보았는데요. 일단 이렇게 설정하면 강의를 진행하는데 문제 없을 것이니 참고 바랍니다~

  • spring-boot
  • spring-security
  • architecture
  • config
  • spring-cloud
  • spring-boot
  • JPA
  • msa
  • Kafka
이강민 댓글 7 좋아요 18 조회수 10129

제발 도와주세요ㅠ

미해결

[신규 개정판] 이것이 진짜 크롤링이다 - 기본편

C:\coding\py>C:/Users/taehw/AppData/Local/Programs/Python/Python311/python.exe c:/coding/py/증권.py Traceback (most recent call last): File "c:\coding\py\증권.py", line 2, in <module> from bs4 import BeautifulSoup ImportError: cannot import name 'BeautifulSoup' from 'bs4' (C:\Users\taehw\AppData\Local\Programs\Python\Python311\Lib\site-packages\bs4\__init__.py) 이렇게 오류 문자가 떠요!코드는 이렇게 썻어요! import requests from bs4 import BeautifulSoup # 종목 코드 리스트 codes = [ '035420', '088980', '005930', '035720' ] for code in codes: url = f"https://finance.naver.com/item/sise.naver?code={code}" response = requests.get(url) html = response.text soup = BeautifulSoup(html, 'html.parser') price = soup.select_one("#_nowVal").text price = price.replace(',', '') print(price)

  • 웹-크롤링
  • 웹-크롤링
  • import
  • python
  • 애러
holy210 댓글 2 좋아요 0 조회수 493

Augmentation 질문

해결됨

[파이토치] 실전 인공지능으로 이어지는 딥러닝 - 기초부터 논문 구현까지

안녕하세요. 데이터 증강 부분에 대해서 궁금점이 있어서 질문드립니다. 가지고 있는 데이터가 1000개 라고 가정했을 때, tr.Compose를 적용시키면 '기존 이미지 1000개 + 증강된 추가 이미지 개수' 가 되는건가요?? 제가 간단하게 해봤을 때는 transform 했을 때 이미지 개수 증가가 아니라 단순 이미지 변환까지만 이루어지는 것 같은데, 제가 잘못된 부분이 있는건가 좀 헷갈려서 질문 드립니다. 만약 단순 이미지 변환만 이루어지는 것이라면 이미지 개수 증가를 위해서 추가적인 작업을 진행해주어야 하는지도 궁금하네요.

  • 딥러닝
  • 머신러닝
  • 딥러닝
  • python
  • 머신러닝 배워볼래요?
  • 인공신경망
  • 인공신경망
  • pytorch
김남욱 댓글 1 좋아요 1 조회수 415

gradle

미해결

Spring Cloud로 개발하는 마이크로서비스 애플리케이션(MSA)

안녕하세요 만약 9003번을 커맨드라인에서 gradle 명령어로 띄우려면 어떻게 해야하나요?

  • msa
  • jpa
  • 아키텍처
  • Kafka
  • spring-boot
  • kafka
  • architecture
  • spring-cloud
  • JPA
코드코드챌린지 댓글 1 좋아요 1 조회수 771

예시 1번이 이해가 가지않습니다.

미해결

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

선생님께서 주신 1번 자료에서 [22,23]이라는 값이 있습니다. 이값때문에 [12,23], [21,23], [22,23]만 뽑히는거 아닌가요?? 어떻게 6개가 나오는지 이해가 되지않습니다.

  • python
  • 코딩-테스트
  • 코테 준비 같이 해요!
코딩코딩코딩코 댓글 2 좋아요 0 조회수 434

pandas 로 csv 읽어서 django model 에 저장하는데 속도 느려지는 이슈 있음. 질문드립니다.

해결됨

파이썬/장고 웹서비스 개발 완벽 가이드 with 리액트

200여개의 csv 파일이 있습니다. (용량은 각각 1메가에서 120메가 - 최대 100만건 데이터 등등 ). 결측치 가 있어서 판다스 에서 불러들여서 정리하고 for 반복문으로 파일 개별적으로 읽어 들여와 장고 모델에 save() 로 입력시키는 작업을 진행하고 있습니다. 초반 10여개 파일까지는 제법 속도가 나오는데 (7만행 데이터 20분 소요) 이후로 속도가 급격하게 감소해서 24시간 돌려서 30메가 파일 겨우 저장 중입니다(1건에 1초씩 걸리네요 ㅠㅠ). 개발중이라 로컬에 있는 장고 내장 sqlite 사용 했습니다. 속도를 좀 더 빠르게 하는 방법이 있을까요? 3일째 검색 해봤는데 별다른 해결책이 보이지 않아서 질문 남겨 봅니다. app.py # new 폴더에 정리된 csv 파일을 읽어서 DB에 저장 import pandas as pd # django 프로젝트에 있는 settings.py 파일을 읽어서 환경변수로 설정 import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "dbking.settings") import django django.setup() #django 프로젝트에 있는 models.py 파일에서 BasicData 클래스를 읽어온다 from common.models import BasicData # new 폴더에 있는 파일명을 읽어서 product 변수에 리스트에 저장 product_list = os.listdir("./script/newdb") # product_list 에 csv 파일 정렬(오름차순) for x in product_list: # csv 파일 하나씩 읽어오기 df = pd.read_csv("./script/newdb/" + x, encoding="cp949") # 결측치를 0으로 채운다 df = df.fillna(0) for a in list_of_csv: # 파일마다 컬럼수가 달라서 remark1, remark2 라는 예비컬럼 2개 추가 # -> 인덱스 에러 나는 경우 0 으로 저장 if a[16] is None: a.insert(16, 0) a.insert(17, 0) elif a[17] is None: a.insert(17, 0) # DB에 저장 try: db_insert = BasicData( opnSvcId = a[2], opnSfTeamCode = a[3], mgtNo = a[4], fileNumber = fileNumber, businessType = businessType, opnSvcNm = a[1], apvPermYmd = a[5], confirmNumber = a[6], businessCondition = a[7], siteTel = a[8], sitePostNo = a[9], siteWhlAddr = a[10], rdnWhlAddr = a[11], rdnPostNo = a[12], bplcNm = a[13], latitude = a[14], longitude = a[15], remark1 = a[16], remark2 = a[17], ) i += 1 # print(i) except Exception as e: print("쿼리", e) continue #DB에 저장 입력 try: db_insert.save() except Exception as e: print("저장중에러",e) continue from django.db import models class BasicData(models.Model): # 개방서비스아이디 opnSvcId = models.CharField(max_length=100) #개방자치단체코드 opnSfTeamCode = models.CharField(max_length=10) # 관리번호 mgtNo = models.CharField(max_length=100) #파일번호 fileNumber = models.IntegerField() #업종명 businessType = models.CharField(max_length=100) #개방서비스명 opnSvcNm = models.CharField(max_length=100) #인허가일자 apvPermYmd = models.DateField() #영업상태구분코드(1-정상, 2-폐업, 3-휴업, 4-전환) confirmNumber = models.IntegerField() #영업상태명 businessCondition = models.CharField(max_length=100) #소재지전화 siteTel = models.CharField(max_length=100) #우편번호 sitePostNo = models.CharField(max_length=100) #주소 siteWhlAddr = models.CharField(max_length=100) #도로명주소 rdnWhlAddr = models.CharField(max_length=100) #도로명우편번호 rdnPostNo = models.CharField(max_length=100) #사업장명 bplcNm = models.CharField(max_length=100) # 위도 latitude = models.FloatField() # 경도 longitude = models.FloatField() #비고1 remark1 = models.CharField(max_length=100) #비고2 remark2 = models.CharField(max_length=100) # 생성시점 created = models.DateTimeField(auto_now_add=True) update = models.DateTimeField(auto_now=True) def save(self, *args, **kwargs): queryset = BasicData.objects.filter(mgtNo__exact=self.mgtNo) # 중복된 이름이 없을 때만 저장 if len(queryset) == 0: super().save(*args, **kwargs) print('> Created new category') # if '&' in self.addr: # self.addr = self.addr.replace('&', ' ') # self.save() # 중복된 카테고리 있을 시 저장 안함 else: print('> Cannot create category with existing name') def __str__(self): return self.name

  • django
  • docker
  • react
  • python
su hyun JIN 댓글 1 좋아요 0 조회수 755

Jupyter lab 대신 Colab 활용 가능성?

해결됨

문과생도, 비전공자도, 누구나 배울 수 있는 파이썬(Python)!

안녕하세요. 어제부터 DeepingSauce님 로드맵을 갓 시작한 코린이 입니다. 금일 강의를 전부 결재하고 시작점에 섰는데 확인해보니 공부 환경상 Jupyter lab 활용이 불가능 하여 두가지 질문 드립니다. Colab 활용 가능성 수강 환경상 Jupyter Notebook은 쓸 수 있지만 Jupyter Lab의 사용이 불가능합니다. 그래서 Colab을 사용해볼까 하는데, 수업 진행에 무리가 없을런지 질문 드립니다. (수업내용을 보니 Jupyter에 Extention까지 설치해서 사용하던데 Colab이 해당 기능들을 다 지원할지 모르겠습니다.) Colab 설치 및 세팅방법 Colab이 활용 가능하다면 선생님 수업을 위해 (Jupyter Lab에서 했듯이) Colab의 설치 및 세팅방법도 알고 싶습니다. 혹시 가능하다면 안내 부탁 드립니다. 아는 지식이 짧아 있는 그대로 질문 드립니다.

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

db 생성이 안됩니다

해결됨

파이썬 동시성 프로그래밍 : 데이터 수집부터 웹 개발까지 (feat. FastAPI, async, await)

db 등록이 안되네요 윈도우입니다. https://yamea-guide.tistory.com/entry/atlas-MongoError-user-is-not-allowed-to-do-action-find-on 이 글 참고해서 해봤는데도 안되요 ㅠ

  • 동시성
  • python
  • 동시성
  • FastAPI
gusdnr598 댓글 1 좋아요 0 조회수 482

강사님 강의때 사용하신 강의자료나 그림같은건 어디 있을까요 ?ㅠ

해결됨

파이썬 동시성 프로그래밍 : 데이터 수집부터 웹 개발까지 (feat. FastAPI, async, await)

강의 내용에 도움이 될거같아서 주소나 첨부자료 보내주시면 강의 들을때 같이 활용해보도록 하겠습니다 감사합니다

  • 동시성
  • FastAPI
  • 동시성
  • python
gusdnr598 댓글 1 좋아요 0 조회수 353

딕셔너리 value 값으로 key 값 찾

해결됨

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

a = {'Phone': '01095136634', 'birth': '910904', 'adress': 'Busan', 'rank': [1, 2, 3], 'test': 'test_dict'} a라는 딕셔너리에서 910904라는 value값을 통해 key 값을 찾아서 출력 하고 싶습니다. 제가 생각 해낸 방법은 딕셔너리에는 순서가 없음으로 리스트로 형 변환을 하여 해당하는 인덱스를 불러오는 방법을 사용했습니다. print(list(a.keys())[list(a.values()).index('910904')]) 이거보다 더 효율적이고 간결한 방법이 있을 가요?

  • python
신봉균 댓글 1 좋아요 0 조회수 713

Django Unit Test에서 Async Task 시 Default DB 사용 이슈

미해결

파이썬/장고 웹서비스 개발 완벽 가이드 with 리액트

unittest 기반의 Unit Test시 Celery 혹은 ProcessPoolExecutor을 이용하면 해당 Context에서 DB 접근 시, Test DB를 참조 하는 것이 아니라 settings의 Default로 설정해놓은 Exist DB에 접근하는 이슈가 있더군요. 해당하는 경우 어떻게 해야 Test DB로 붙어서 작업할 수 있을까요? with concurrent.futures.ProcessPoolExecutor() as executor:

  • docker
  • python
  • unittest
  • async
  • django
  • react
BJ원생 댓글 1 좋아요 1 조회수 425

kafka 설정 관련해서 올려주신 goolge drive 링크가 만료되었습니다

미해결

Spring Cloud로 개발하는 마이크로서비스 애플리케이션(MSA)

Error: Could not find or load main class org.apache.kafka.connect.cli.ConnectDistributed Caused by: java.lang.ClassNotFoundException: org.apache.kafka.connect.cli.ConnectDistributed kafka connect 설정도중 위의 에러가 해결되지 않아 통합 파일을 받으려했는데 페이지를 찾을 수 없다고 나옵니다. https://www.inflearn.com/questions/601451/windows-kafka-%EC%A0%95%EC%83%81-%EC%9E%91%EB%8F%99%ED%95%98%EB%8A%94-%EB%B2%84%EC%A0%84-%EC%A0%9C%EA%B3%B5%EB%AC%B8%EC%9D%98 https://drive.google.com/file/d/1GDrBskzAE4Y_GojNeXhGeN2YeMFrpFe-/view?usp=sharing 링크 공유 다시해주시면 감사하겠습니다.

  • jpa
  • architecture
  • spring-boot
  • 아키텍처
  • spring-cloud
  • JPA
  • kafka
  • msa
  • Kafka
sky114477 댓글 1 좋아요 0 조회수 792

크롤링 데이터 가공 후 입력창에 넣기

미해결

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

수업 잘 듣고 있습니다. 자동화를 하고 싶으서 예전 영상 보다가 최근에 다시 올라와서 보는 중 강의 발견하고 바로 수강해서 듣고 있습니다. 궁금한 것이 하나 있는데요. 셀레니움에서 하나의 윈도우 창의 특정 태그 값을 찾아서 다른 윈도우 창을 오픈 한 후 특정 필드에 값을 넣을 수 있나요?

  • beautifulsoup
  • 웹-크롤링
  • selenium
  • python
  • beautifulsoup
  • selenium
  • 웹-크롤링
ecomarine 댓글 1 좋아요 0 조회수 445

git 주소

해결됨

파이썬 동시성 프로그래밍 : 데이터 수집부터 웹 개발까지 (feat. FastAPI, async, await)

강사님 이해안되서 git좀 참고하려고하는데 강의하신 자료랑 git주소좀 알려주세요 ..

  • 동시성
  • python
  • FastAPI
  • 동시성
gusdnr598 댓글 1 좋아요 0 조회수 412

Order 서비스의 도메인

미해결

Spring Cloud로 개발하는 마이크로서비스 애플리케이션(MSA)

Order Service URL 주소에서 IP:PORT/user/{user-id}/order 이렇게 주소를 주셨는데 Restful API 에서 주문 도메인에 있는 정보를 유저 아이디 값으로 가져오고 싶을 때 GET ip:port/order?user-id='' 로 가져와도 상관없을까요? 이게 API 디자인 가이드에 위배 되는 행위인지 궁금합니다.

  • jpa
  • msa
  • 아키텍처
  • Kafka
  • architecture
  • kafka
  • spring-boot
  • spring-cloud
  • JPA
윤정기 댓글 1 좋아요 0 조회수 290

list.reverse() 출력에 대해서 질문있습니다.

해결됨

남박사의 파이썬 기초부터 실전 100% 활용

안녕하세요. 남박사님. list() 데이터 구조에서 reverse() 메서드의 결과값이 이해가 안되서 질문을 남기게 되었습니다. a=[4,5,6,1,2,3] a.sort() print(a) b=[4,5,6,1,2,3] b.reverse() print(b) [1, 2, 3, 4, 5, 6] [3, 2, 1, 6, 5, 4] sort()는 정방향 정렬, reverse()는 역방향 정렬이라고 배웠는데요. 역방향 정렬의 결과값이 제가 생각했을 때는 [6,5,4,3,2,1]로 출력되어야 할것 같은데 제 예상과는 반대로 [3,2,1,6,5,4]로 출력되고 있습니다. 왜 그런지 궁금합니다.

  • 웹-크롤링
  • 웹-크롤링
  • python
Hyeongwon Yun 댓글 1 좋아요 1 조회수 457

인기 태그

인프런 TOP Writers

주간 인기글