inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

묻고 답해요

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

GetText()사용법

해결됨

직장인에게 꼭 필요한 파이썬-아래아한글 자동화 레시피

GetText 사용법이 감이 잘 안오네요 while과 state없이 GetText()를 실행하면 텍스트 출력이 안되네요.. 파이썬에서 정확한 문법 정의가 어떻게 되는지요?

  • python
  • 한컴오피스
schnabel 댓글 2 좋아요 1 조회수 2027

수업 자료에 오류가 있는것 같습니다 ㅠ

해결됨

한국인이 좋아하는 속도로 때려넣는 파이썬

문서 정리 자동화 소프트웨어 만들기 압축 파일에 직원 정보라는 파일이 들어있지 않네요 ㅠ

  • python
eric040928 댓글 2 좋아요 0 조회수 609

H2 console 에서의 문제

해결됨

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

안녕하세요. 먼저 좋은 수업을 강의 해주셔서 감사합니다! 다름이 아니라 제가 해당 수업 진행 중 오류가 있어서 문의드립니다! mysql 콘솔에서는 오류가 발생 하지 않았으나, H2 Console 에서 테이블을 조회시 SELECT * FROM ORDERS; (conn=42) Table 'mydb.ORDERS' doesn't exist 42S02/1146 이러한 에러가 발생하는데 원인이 무엇일까요?? order-service 에서 조회시에는 문제가 없습니다..

  • spring-boot
  • jpa
  • 아키텍처
  • spring-cloud
  • kafka
  • msa
용정 댓글 1 좋아요 0 조회수 646

GATEWAY-SERVICE 를 통하여 호출하지 않는 이유가 있을까요?

해결됨

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

마이크로 서비스 사용간 (RestTemplate 혹은 Feign) 에서 Eureka 의 서비스 명으로 USER-SERVICE 같은 마이크로 서비스명을 통하여 직접 호출하면 결론적으로는 GATEWAY-SERVICE 를 통하여 사용했을때의 장점을 잃어버리는 것 같은데, 섹션 10 에서는 게이트웨이를 통하지 않고 직접 서비스를 호출하는 이유가 있을까요?

  • spring-boot
  • jpa
  • 아키텍처
  • spring-cloud
  • kafka
  • msa
램쥐뱅 댓글 1 좋아요 1 조회수 585

MSA에서 데이터를 가져오는 방법

미해결

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

MSA에서 다른 어플리케이션의 데이터를 가져오는 방법으로 RestTemplate, FeignClient를 사용하는 방법을 알려주셨는데요. 데이터를 가져오는 것은 보통 rest 통신을 사용하여 가져오나요? 실무에서 카프카나 다른 라이브러리를 사용해서 가져오는지, 아니면 설명해주신 것 처럼 rest 통신을 통해 가져오는지 궁금합니다~

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

precision_recall_curve() 관련 질문드립니다.

미해결

[개정판] 파이썬 머신러닝 완벽 가이드

안녕하세요, 좋은강의 감사합니다. precision_recall_curve() 함수를 이용해서, y값과, 예측 값을 넣어주었을때 리턴되는값이 정밀도, 재현율, thresholds 값이 반환이 되는것으로 확인했습니다. 여기서 궁금한 부분이 thresholds값의 변화는 함수에서 임의로 진행 되는것 일까요?

  • python
  • 머신러닝
  • 통계
댓글 1 좋아요 0 조회수 324

Spring Security 최신버전(Spring Boot 3.X.X 대)의 WebSecurity 설정 공유드립니다.

미해결

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

최신버전으로 진행하다보니 막혔었는데요. 구글링, ChatGPT 등을 통해서 동작하는 코드 공유드립니다. 정확한 구현은 아닐 수 있겠지만, 강의를 진행하는 데는 문제 없는 것 같습니다. 참고만 부탁드려요~ package com.example.userservice.security; import com.example.userservice.service.UserService; import lombok.RequiredArgsConstructor; import org.springframework.boot.autoconfigure.security.servlet.PathRequest; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.security.authentication.AuthenticationManager; import org.springframework.security.config.annotation.ObjectPostProcessor; import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; import org.springframework.security.web.SecurityFilterChain; import org.springframework.security.web.util.matcher.IpAddressMatcher; @Configuration @EnableWebSecurity @RequiredArgsConstructor public class WebSecurity { private final UserService userService; private final BCryptPasswordEncoder bCryptPasswordEncoder; private final ObjectPostProcessor<Object> objectPostProcessor; 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 -> { try { authorize .requestMatchers(WHITE_LIST).permitAll() .requestMatchers(PathRequest.toH2Console()).permitAll() .requestMatchers(new IpAddressMatcher("127.0.0.1")).permitAll() .and() .addFilter(getAuthenticationFilter()); } catch (Exception e) { e.printStackTrace(); } } ); return http.build(); } public AuthenticationManager authenticationManager(AuthenticationManagerBuilder auth) throws Exception { auth.userDetailsService(userService).passwordEncoder(bCryptPasswordEncoder); return auth.build(); } private AuthenticationFilter getAuthenticationFilter() throws Exception { AuthenticationFilter authenticationFilter = new AuthenticationFilter(); AuthenticationManagerBuilder builder = new AuthenticationManagerBuilder(objectPostProcessor); authenticationFilter.setAuthenticationManager(authenticationManager(builder)); return authenticationFilter; } } 이렇게 하시고 중요한 것이, Login Form을 사용하지 않기 때문에 AuthenticationFilter 클래스의 Override 메소드 중 successfulAuthentication 메소드 내부에super.successfulAuthentication(request, response, chain, authResult); 코드가 작성되어 있다면, 아래처럼 제거 또는 주석 처리를 꼭 해야 합니다! (다른 질문 글에서 발견하였습니다, 공유 감사드립니다.) 하지 않은 경우 에러가 발생하며 login 요청이 제대로 동작하지 않습니다. package com.example.userservice.security; import com.example.userservice.vo.RequestLogin; import com.fasterxml.jackson.databind.ObjectMapper; import jakarta.servlet.FilterChain; import jakarta.servlet.ServletException; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; import org.springframework.security.core.Authentication; import org.springframework.security.core.AuthenticationException; import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter; import java.io.IOException; import java.util.ArrayList; public class AuthenticationFilter extends UsernamePasswordAuthenticationFilter { @Override public Authentication attemptAuthentication(HttpServletRequest request, HttpServletResponse response) throws AuthenticationException { try { RequestLogin creds = new ObjectMapper().readValue(request.getInputStream(), RequestLogin.class); return getAuthenticationManager().authenticate( new UsernamePasswordAuthenticationToken( creds.getEmail(), creds.getPassword(), new ArrayList<>() ) ); } catch (IOException e) { throw new RuntimeException(e); } } @Override protected void successfulAuthentication(HttpServletRequest request, HttpServletResponse response, FilterChain chain, Authentication authResult) throws IOException, ServletException { //super.successfulAuthentication(request, response, chain, authResult); } }

  • spring-boot
  • spring-cloud
  • spring-security
  • 최신버전
이강민 댓글 5 좋아요 18 조회수 12156

행맨 만들기에서..

미해결

실리콘밸리 엔지니어가 가르치는 파이썬 기초부터 고급까지

행맨 만들기 프로젝트 일부 코드에서 이해가 안되는 부분이 있어 질문드립니다! while 문에서 i = 0 을 설정한 뒤에 elem 값이 char 의 input 값과 같으면 그 값이 lst에서 치환되는 것이라고 설명해주셨는데 lst[i] 는 lst 내에서 i+1 번째 값을 의미하는 것이 아닌가요?? 아니면 i 는 그냥 미지수의 의미로 설정한 변수로 생각하면 되나요? 비슷한 질문으로 i += 1 이라는 코드를 추가한 이유가 무엇인가요? 저 코드를 빼고 작동시켜보니 이전에 맞췄던 철자가 저장되지 않고 첫 단어에만 값이 입력되는 걸 보니 이전 값들을 차곡차곡 쌓는 느낌인가요..? 너무 초보적인 질문이라 죄송합니다.. 아무리 고민하고 찾아봐도 쉽게 답이 나오지 않아 질문드립니다..

  • python
  • 알고리즘
logic 댓글 1 좋아요 1 조회수 670

Config Client의 설정정보 업데이트 원리

미해결

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

안녕하세요. 강의 잘 듣고 있습니다. 강의를 듣던 중 아래 몇 가지 이해가 부족한 부분과 조언이 필요한 부분이 있어 이렇게 질문 남깁니다. 제가 이해하기로, Spring Cloud Config는 애플리케이션의 환경정보(이하 env)를 외부로부터 받아오기 위한 의존성이며, Spring Actuator의 /refresh는 단지 env를 업데이트 하기 위해 사용하는것 뿐이다. 둘 사이의 종속적인 부분은 없어보인다. 식으로 이해를 했습니다. 제가 생각한 것이 맞는지 궁금합니다. 혹은 참고해서 공부할 수 있는 키워드가 있다면 참고하여 학습하도록 하겠습니다. @Component 어노테이션으로 Spring Bean이 등록이 될 때, @Value 어노테이션을 통해 환경정보를 주입받을 수 있는 것을 알고 있습니다. 직접 확인을 해보니 /refresh는 Environment의 값은 바꾸지만, @Value를 통해 주입된 필드값은 수정되지 않음을 볼 수 있었습니다. Spring Cloud Config를 도입한다고 하면 @Value를 통해 주입받던 모든 곳을 Environment를 통해 가져오는 것으로 수정을 해야하는지 혹은 다른 해결방안이 있는지 궁금합니다. 감사합니다.

  • spring-boot
  • jpa
  • 아키텍처
  • spring-cloud
  • kafka
  • msa
최학준 댓글 1 좋아요 0 조회수 682

'is' 와 '==' 언제 사용하나요?

미해결

프로그래밍 시작하기 : 도전! 45가지 파이썬 기초 문법 실습 (Inflearn Original)

'is'와 '==' 차이점은 어느 정도 이해되는데, 각각을 언제 사용해야 하는지는 잘 모르겠습니다. 검색을 해보면 주로 '==' 사용하고 None 과 비교할 때 'is'를 사용한다고 하는데 실제로 이렇게 사용하나요? z = 'None' a = None print(f'z is None : {z is None}') print(f'z == None : {z == "None"}') print(f'a is None : {a is None}') print(f'a == None : {a == "None"}') z is None : False z == None : True a is None : True a == None : False

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

보상 트랜잭션의 대한 후속 강의 문의합니다.

미해결

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

강의를 다 들어가는데요~ msa에서 예외가 발생 시 보상 트랜잭션의 대한 후속 강의를 제작한다고 들었습니다! 해당 후속 강의는 정말 중요한 강의라고 생각되는데.. 언제쯤 업데이트 하실 계획이실까요?

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

챗지피티 때문에 결제했는데...

해결됨

ChatGPT 100% 활용하여 배우는 파이썬 기초 A to Z

ChatGPT와 함께 파이썬 시작하기 (변수, 정수) 편 아직 안올라 온건가요?

  • python
  • 알고리즘
sonyyjj 댓글 2 좋아요 0 조회수 1543

[파이썬 Print 사용법(1-4) - New 2023] NameError

미해결

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

파이썬 Print 사용법(1-4) - New 2023 강의에서 print로 출력하려고 하는데 자꾸 아래와 같은 오류가 떠요... 입력 값: 출력값: >>> print(f'm : {m:,}') Traceback (most recent call last): File "<stdin>", line 1, in <module> NameError: name 'm' is not defined Python Version : 3.11.2 64-bit

  • python
Ilyeop Kang 댓글 1 좋아요 0 조회수 359

numpy의 shape

해결됨

파이썬을 활용한 머신러닝 딥러닝 입문

안녕하세요 인프런에서 강사님의 강의(파이썬을 활용한 머신러닝 딥러닝 입문)를 수강 중인 손승운입니다. 질문 '파이썬을 활용한 머신러닝 딥러닝 입문' 강의 12강 내용 7분 18초를 보면 주피터 노트에서는 z.shape의 값이 (axis2, axis0, axis1) 순서로 나오고 제가 직접 주피터노트에 실습한 결과도 동일했습니다. 하지만 7분 33초 중앙을 보면 shape를 (axis0, axis1, axis2)로 표현하셨는데, 이는 구글링을 통해 다른 사람들이 표현한 것과 같습니다. 그럼 (axis2, axis0, axis1)와 (axis0, axis1, axis2) 둘 중 어느 것이 맞는 표현인가요? 혹시 원래는 (axis0, axis1, axis2)로 표현해야 하지만 numpy를 활용해 shape를 볼 때만 (axis2, axis0, axis1)로 표현되는 건가요? 강사님의 강의 덕에 머신러닝 개발자가 되는데 한걸음 내딛을 수 있었습니다. 감사합니다. 편하신 시간에 답변주시면 감사하겠습니다.

  • 머신러닝
  • numpy
  • 딥러닝
  • tensorflow
  • 딥러닝
  • keras
  • anaconda
  • pandas
  • python
  • 머신러닝 배워볼래요?
  • matplotlib
  • cnn
thstmddns 댓글 1 좋아요 0 조회수 625

셀레늄 실습중 문의

해결됨

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

수업을 듣고 다른 사이트로 실습을 해보려고 하는데, jsp로 만들어진 공공기관 사이트는 뭔가 잘 안먹히는 모습니다. 아래 사이트의 테이블 정보를 가져오고 싶은데, 얘네들은 클릭해도 주소가 변경되는것도 없고 아래와 같이 table이 들어있는 상위 class 태그를 찾아서 정의하고, 거기에서 table의 class명을 넣고 tbody, tr까지 찾아들어가도록 코딩을 했는데 table의 class명이 없다고 에러가 뜹니다. 이런 사이트의 table내 정보는 어떻게 가져올 수 있고, 테이블에 있는 원자재를 클릭해서 넘어가는 페이지는 어떻게 찾아갈 수 있나요?(XPATH, LINK_TEXT해도 먹히지 않아요..) https://www.motie.go.kr/motie/py/sa/todayeconomyindexprice/todayEconomyIndexPri.jsp url = "http://www.motie.go.kr/motie/py/sa/todayeconomyindexprice/todayEconomyIndexPri.jsp" driver.get(url) time.sleep(2) # driver.find_element(By.LINK_TEXT,"통계정보").click() # time.sleep(2) # driver.find_element(By.LINK_TEXT,"원자재가격정보") # time.sleep(2) class1 = driver.find_element(By.CLASS_NAME,"iframeLayout01") #테이블은 위와 같이 <table>안에 <tbody>, <tbdoy>안에 <tr>, <tr>안에 <td> 순으로 포함되어 있다. table_content = class1.find_element(By.CLASS_NAME,"data_print") tbody = table_content.find_element(By.TAG_NAME,"tbody") rows = tbody.find_elements(By.TAG_NAME,"tr") for index, value in enumerate(rows): body=value.find_elements(By.TAG_NAME,"td")[0] print(body.text)

  • python
  • 웹-크롤링
  • 웹-크롤링
  • selenium
  • beautifulsoup
쥰쓰 댓글 1 좋아요 0 조회수 831

{% for i in range(block_start, block_last + 1 ) %} 에서

미해결

남박사의 파이썬으로 실전 웹사이트 만들기

{% for i in range(block_start, block_last + 1 ) %} 에서 block_last + 1을 해주는 이유가 궁금합니다.

  • python
날아라숑 댓글 2 좋아요 0 조회수 422

suggestion에서 onFollowUser을 수행할때 에러 질문입니다!

해결됨

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

import React from "react"; import { Button, Avatar } from "antd"; import "./Suggestion.scss"; //프레젠테이션 컴포넌트라 할 수 있다 export default function Suggestion({ suggestionUser, onFollowUser }) { const { username, avatar, is_follow } = suggestionUser; return ( <div className="suggestion"> <div className="avatar"> <Avatar icon={<img src={avatar} alt={`${username}'s avatar`} />} /> {/* <UserAddOutlined /> */} </div> <div className="usesrname">{username}</div> <div className="action"> {is_follow && "팔로잉 중"} {!is_follow && ( <Button size="small" onClick={() => onFollowUser(username)}> Follow </Button> )} </div> </div> ); } import React, { useEffect, useState } from "react"; import "./SuggestionList.scss"; import { Card } from "antd"; import Suggestion from "./Suggestion"; import { useAppContext } from "store"; import Axios from "axios"; import useAxios from "axios-hooks"; export default function SuggestionList({ style }) { const { store: { jwtAccessToken }, } = useAppContext(); const [userList, setUserList] = useState([]); //axios을 좀더 일반적으로 쓰기위한 훅을 이용 useAxios hook //useEffect자체가 필요없다 요청자체를 useAxios가 보내게 되니까? //useAxios는 조회를 할때는 유용한다 post을 할때는 코드가 복잡해진다? const headers = { Authorization: `Bearer ${jwtAccessToken}` }; const [{ data: origUserList, loading, error }, refetch] = useAxios({ url: "http://127.0.0.1:8000/accounts/suggestions/", headers, }); useEffect(() => { if (!origUserList) setUserList([]); else setUserList(origUserList.map((user) => ({ ...user, if_follow: false }))); }, [origUserList]); const onFollowUser = (username) => { console.log("성공"); try { Axios.post( "http://127.0.0.1:8000/accounts/follow/", { username }, { headers } ) .then((response) => { setUserList((prevUserList) => { return prevUserList.map((user) => { if (user.username === username) { return { ...user, is_follow: true }; } else return user; }); }); }) .catch((error) => { console.log(error); }); } catch (error) { console.log("여기 에러야 :", error); } }; return ( <div style={style}> {/* 정말 빠르게 지나갈 것이다 */} {loading && <div>Loading...</div>} {error && <div>로딩중에 에러가 발생했습니다.</div>} {/* <button onClick={() => refetch()}>Reload</button> */} <Card size="small" title="Suggestions for you" // extra={<a href="#">More</a>} style={{ width: 300, }} > {userList.map((suggestionUser) => ( <Suggestion key={suggestionUser.username} suggestionUser={suggestionUser} onFollowUser={onFollowUser} //속성값으로 주입함 /> ))} </Card> </div> ); } 첫번째 블럭이 Suggestion.js이고 두번째 블럭은 SuggestionList.js입니다. follow 버튼을 눌렀을때 이러한 에러가 뜨기 시작했는데 왜 그런걸까요ㅠㅠ 분명 원래는 잘 되었는데 학습진도를 더 나가다 보니 어느순간 작동하지 않던데 그 이유를 잘 모르겠습니다 서버쪽으로 요청도 가지 않는거 같은데 서버쪽의 문제일 수 있을까요??

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

self

해결됨

코딩테스트 [ ALL IN ONE ]

- 학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! - 먼저 유사한 질문이 있었는지 검색해보세요. - 서로 예의를 지키며 존중하는 문화를 만들어가요. - 잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요. 노드를 구현할때, 함수의 변수안에 self가 있는데 이게 어떤 역할을 하는지 궁금합니다.

  • python
  • algorithm
  • 코테 준비 같이 해요!
kyle3444 댓글 1 좋아요 2 조회수 650

하이퍼 파라미터 튜닝 범위

미해결

[개정판] 파이썬 머신러닝 완벽 가이드

안녕하세요! 수업 잘 듣고 있습니다. 제가 지금 질문이 생긴 범위는 xgboost나 lightgbm들 하이퍼 파라미터 튜닝시 max_depth나 min_child_weigh등 각각의 범위를 지정해주는데 (ex) 학습률이나, hp.quniform('max_depth',5,20,1) 이런 범위들은 문제마다 다르게 설정해주어야 하는건 알겠는데 제가 나중에 새로운 문제를 혼자 풀 때 어떤수치를 보고 파라미터 범위들을 설정해주어야하는 걸까요??

  • 머신러닝 배워볼래요?
  • 통계
  • python
kd03100 댓글 1 좋아요 0 조회수 626

멜론편 진행하고 있는데 배너 닫는 버튼이 안보이네요.

미해결

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

멜론편 진행하고 있는데 저는 상단에 배너가 떠서 강의 중 알려주신 대로 배너 닫는 버튼 클릭 추가하려고 하는데, 배너 닫는 버튼이 안보이네요. 이런 경우는 어떻게 해야될까요?

  • selenium
  • 웹-크롤링
  • python
  • beautifulsoup
Learner 댓글 2 좋아요 0 조회수 663

인기 태그

인프런 TOP Writers

주간 인기글