인프런 강의와 2025 시나공 빅데이터 분석기사 실기 책 같이 보면서 공부중입니다. 작업형2 연습문제를 풀고 있는데, 성능개선을 위해 하이퍼파라미터 튜닝 시 문제마다 적용되는 max_depth, n_estimators 값 범위가 다르더라구요. 혹시 파라미터 값 범위를 지정하는 어떤 기준이 있는건지... 어떤 식으로 값을 조정해야하는건지 궁금합니다.
sql을 설치하고 Mysql configurator를 통해서 마지막에 execute를 시도하는데 계속 Database initialization failed. 에러가 발생합니다 ㅠㅠ 처음엔 한글경로 문제인가 싶어서 이름도 모두 영어로 바꾸고 재설치도 10번은 해본거 같은데 해결이 안되네요 ㅠㅠ 혹시 해결 방법이 있을까요.. 로그 남겨둡니다.. ㅠ Beginning configuration step: Writing configuration file Saving my.ini configuration file... Saved my.ini configuration file. Ended configuration step: Writing configuration file Beginning configuration step: Updating Windows Firewall rules Adding a Windows Firewall rule for MySQL911 on port 3306. Attempting to add a Windows Firewall rule with command: netsh.exe advfirewall firewall add rule name="Port 3306" protocol=TCP localport=3306 dir=in action=allow 확인됨 Successfully added the Windows Firewall rule. Adding a Windows Firewall rule for MySQL911 on port 33060. Attempting to add a Windows Firewall rule with command: netsh.exe advfirewall firewall add rule name="Port 33060" protocol=TCP localport=33060 dir=in action=allow 확인됨 Successfully added the Windows Firewall rule. Ended configuration step: Updating Windows Firewall rules Beginning configuration step: Adjusting Windows service Attempting to grant the required filesystem permissions to the 'NT AUTHORITY\NetworkService' account. Granted permissions to the data directory. Granted permissions to the install directory. Adding new service New service added Ended configuration step: Adjusting Windows service Beginning configuration step: Initializing database (may take a long time) Attempting to run MySQL Server with --initialize-insecure option... Starting process for MySQL Server 9.1.0... Starting process with command: C:\Program Files\MySQL\MySQL Server 9.1\bin\mysqld.exe --defaults-file="C:\ProgramData\MySQL\MySQL Server 9.1\my.ini" --console --initialize-insecure=on --lower-case-table-names=1... Process for mysqld, with ID 14936, was run successfully and exited with code -1073741819. Failed to start process for MySQL Server 9.1.0. Database initialization failed. Ended configuration step: Initializing database (may take a long time)
학습하는 분들께 도움이 되고, 더 좋은 답변을 드릴 수 있도록 질문 전에 다음을 꼭 확인해주세요. 1. 강의 내용과 관련된 질문을 남겨주세요. 2. 인프런의 질문 게시판과 자주 하는 질문(링크)을 먼저 확인해주세요. (자주 하는 질문 링크: https://bit.ly/3fX6ygx) 3. 질문 잘하기 메뉴얼(링크)을 먼저 읽어주세요. (질문 잘하기 메뉴얼 링크: https://bit.ly/2UfeqCG) 질문 시에는 위 내용은 삭제하고 다음 내용을 남겨주세요. ========================================= [질문 템플릿] 1. 강의 내용과 관련된 질문인가요? 예 2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? 예 3. 질문 잘하기 메뉴얼을 읽어보셨나요? 예 [질문 내용] ExecutorService.submit 시점에 디버깅을 걸어서 확인해보니 BlockingQueue 필드인 workQueue 내부에 task가 들어가지 않고 workers라는 HashSet에 들어가지는 것 같습니다 혹시 제가 어디서 놓친건지 모르겠어서 여쭤봅니다 이거 때문에 계속 헷갈려요..ㅜ
화면 왼쪽의 [Q1. 자격증명], [Q2. 암호문] 등의 버튼을 클릭해도 해당 문제가 있는 html페이지로 넘어가지 않습니다 chrome 외에 safari로 해도 마찬가지이고요 url 파라미터로 page=2 넣어서 직접 접속하니 넘어가기는 해서 불편한 대로 쓰고는 있는데요 https://pyalgo.co.kr/?page=2 처음 오는 분들은 이런 부분을 전혀 모르실 거고 애초 명백히 잘못된 버그이니 빨리 고쳐주시기 바랍니다 <li><a href="#" id="q1" class="btn-que success">Q1. 자격 증명</a></li> 보니까 href속성에 값이 제대로 있지 않습니다 임의로 값을 바꾸고 클릭하니 잘 넘어가지네요
학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! 질문과 관련된 영상 위치를 알려주면 더 빠르게 답변할 수 있어요 먼저 유사한 질문이 있었는지 검색해보세요 여기서 처음처럼 20이 출력되도록 초기화?하려면 어떻게 해야 하나요? # 20 = 10 + 10 box = box + box box
학습하는 분들께 도움이 되고, 더 좋은 답변을 드릴 수 있도록 질문전에 다음을 꼭 확인해주세요. 1. 강의 내용과 관련된 질문을 남겨주세요. 2. 인프런의 질문 게시판과 자주 하는 질문(링크)을 먼저 확인해주세요. (자주 하는 질문 링크: https://bit.ly/3fX6ygx) 3. 질문 잘하기 메뉴얼(링크)을 먼저 읽어주세요. (질문 잘하기 메뉴얼 링크: https://bit.ly/2UfeqCG) 질문 시에는 위 내용은 삭제하고 다음 내용을 남겨주세요. ========================================= [질문 템플릿] 1. 강의 내용과 관련된 질문인가요? (예/아니오) 2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예/아니오) 3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예/아니오) [질문 내용] 안녕하세요 ~! 강의 자료에서 처럼 이런 자료들을 draw.io에서 만든다는 정보는 찾았는데요 ! 그 내부에서 어떤 템플릿을 사용하시는지 궁금합니다..! 몇 시간 동안 여러가지 클릭 해봤는데 못 찾아서요 ㅠㅠ 크래파스로 그은듯한 네모와 점선으로 연결된 화살표, dot 네모박스가 궁금합니다 !
내 업무를 대신 할 파이썬(Python) 웹크롤링 & 자동화 (feat. 주식, 부동산 데이터 / 인스타그램)
PackagesNotFoundError: The following packages are not available from current channels: - python=3.8.5* 이런거 나오면서 가상환경 설치가 안되면, conda create -n crawling_class -c conda-forge python=3.8.5 이렇게 하니까 해결되네요. Mt시리즈에서는 3.8.5버전이 기본지원이 안된다고함.
❗ 질문 작성시 꼭 참고해주세요 최대한 상세히 현재 문제(또는 에러)와 코드(또는 github) 를 첨부해주셔야 그만큼 자세히 답변드릴 수 있습니다. 맥/윈도우, 안드로이드/iOS, ReactNative, Node 버전 등의 개발환경 도 함께 적어주시면 도움이 됩니다. 에러메세지는 일부분이 아닌 전체 상황 을 올려주세요. ( 일부만 자르거나 일부만 복사해서 올려주시면 답변이 어렵습니다. ) [2-5]RN Drawer 관련 강의를 들으며, 따라한 이후,,, 빌드도 오류가 나고,,, 하기의 에러 메세지가 나와서, 이후 진도를 따라갈 수가 없습니다... 😂 😂 강사님 강의를 들으며,, 이전에 동일한 오류로 질문을 올려주신 분들의 레퍼런스도 다 해보고,, 구글링한 결과로도 해봤는데,,, 어느 부분이 문제인지,,, 3일째,,, 진도를 못나가고 있습니다...ㅠ 어떤 부분을 수정해야 할 지,,, 도움을 주시면,,,, 감사하겠습니다...! github: https://github.com/SooyeonBack/ReactNative.git 개발환경 윈도우 안드로이드 ReactNative 버전: 0.72.6 에러메세지 > Task :react-native-reanimated:compileDebugJavaWithJavac FAILED Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0. You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins. See https://docs.gradle.org/8.0.1/userguide/command_line_interface.html#sec:command_line_warnings 80 actionable tasks: 69 executed, 11 up-to-date info 💡 Tip: Make sure that you have set up your development environment correctly, by running react-native doctor. To read more about doctor command visit: https://github.com/react-native-community/cli/blob/main/packages/cli-doctor/README.md#doctor Warning: SDK processing. This version only understands SDK XML versions up to 3 but an SDK XML file of version 4 was encountered. This can happen if you use versions of Android Studio and the command-line tools that were released at different times. ``` 37 errors FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':react-native-reanimated:compileDebugJavaWithJavac'. > Compilation failed; see the compiler error output for details. * Try: > Run with --stacktrace option to get the stack trace. > Run with --info or --debug option to get more log output. > Run with --scan to get full insights. * Get more help at https://help.gradle.org BUILD FAILED in 13s info Run CLI with --verbose flag for more details.
package com.example.stock.repository; import org.springframework.data.redis.core.RedisTemplate; import org.springframework.stereotype.Component; import java.time.Duration; @Component public class RedisLockRepository { private RedisTemplate<String, String> redisTemplate; public RedisLockRepository(RedisTemplate<String, String> redisTemplate) { this.redisTemplate = redisTemplate; } public Boolean lock(Long key) { return redisTemplate .opsForValue() .setIfAbsent(generateKey(key), "lock", Duration.ofMillis(3_000)); } public void unlock(Long key) { redisTemplate.delete(generateKey(key)); } private String generateKey(Long key) { return key.toString(); } } package com.example.stock.facade; import com.example.stock.repository.RedisLockRepository; import com.example.stock.service.StockService; import org.springframework.stereotype.Component; @Component public class LettuceLockStockFacade { private final RedisLockRepository redisLockRepository; private final StockService stockService; public LettuceLockStockFacade(RedisLockRepository redisLockRepository, StockService stockService) { this.redisLockRepository = redisLockRepository; this.stockService = stockService; } public void decrease(Long key, Long quantity) throws InterruptedException { while(!redisLockRepository.lock(key)){ Thread.sleep(100); } try{ stockService.decrease(key, quantity); }finally { redisLockRepository.unlock(key); } } } package com.example.stock.facade; import com.example.stock.domain.Stock; import com.example.stock.repository.StockRepository; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import java.util.concurrent.CountDownLatch; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import static org.junit.jupiter.api.Assertions.*; @SpringBootTest class LettuceLockStockFacadeTest { @Autowired private LettuceLockStockFacade lettuceLockStockFacade; @Autowired private StockRepository stockRepository; @BeforeEach public void before(){ stockRepository.saveAndFlush(new Stock(1L, 100L)); } @AfterEach public void after(){ stockRepository.deleteAll(); } @Test public void 동시에_100개의_요청() throws InterruptedException { int threadCount = 100; ExecutorService executorService = Executors.newFixedThreadPool(32); CountDownLatch latch = new CountDownLatch(threadCount); for(int i = 0; i < threadCount; i++){ executorService.submit(() -> { try{ lettuceLockStockFacade.decrease(1L, 1L); } catch (InterruptedException e) { throw new RuntimeException(e); } finally { latch.countDown(); } }); } latch.await(); Stock stock = stockRepository.findById(1L).orElseThrow(); assertEquals(0, stock.getQuantity()); } } 이렇게 코딩했고 dockre에 redis를 설치하고 window Shell에서 데이터가 남아 있을까봐 1번 key 값을 삭제해서 돌렸는데도 오류가 발생했습니다. 또한 레디스가 실행이 되지 않은 채 했을까봐 ping을 입력했는데 pong이라는 응답을 받았습니다. Hibernate: drop table if exists stock 2024-11-03T22:08:40.414+09:00 DEBUG 17108 --- [ Test worker] org.hibernate.SQL : create table stock (id bigint not null auto_increment, product_id bigint, quantity bigint, version bigint, primary key (id)) engine=InnoDB Hibernate: create table stock (id bigint not null auto_increment, product_id bigint, quantity bigint, version bigint, primary key (id)) engine=InnoDB 2024-11-03T22:08:40.439+09:00 INFO 17108 --- [ Test worker] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default' 2024-11-03T22:08:41.136+09:00 INFO 17108 --- [ Test worker] o.s.d.j.r.query.QueryEnhancerFactory : Hibernate is in classpath; If applicable, HQL parser will be used. 2024-11-03T22:08:42.092+09:00 WARN 17108 --- [ Test worker] JpaBaseConfiguration$JpaWebConfiguration : spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning 2024-11-03T22:08:42.990+09:00 INFO 17108 --- [ Test worker] c.e.s.facade.LettuceLockStockFacadeTest : Started LettuceLockStockFacadeTest in 6.21 seconds (process running for 7.345) 2024-11-03T22:08:43.504+09:00 DEBUG 17108 --- [ Test worker] org.hibernate.SQL : insert into stock (product_id,quantity,version) values (?,?,?) Hibernate: insert into stock (product_id,quantity,version) values (?,?,?) 2024-11-03T22:08:44.203+09:00 DEBUG 17108 --- [ Test worker] org.hibernate.SQL : select s1_0.id,s1_0.product_id,s1_0.quantity,s1_0.version from stock s1_0 where s1_0.id=? Hibernate: select s1_0.id,s1_0.product_id,s1_0.quantity,s1_0.version from stock s1_0 where s1_0.id=? 2024-11-03T22:08:44.245+09:00 DEBUG 17108 --- [ Test worker] org.hibernate.SQL : select s1_0.id,s1_0.product_id,s1_0.quantity,s1_0.version from stock s1_0 Hibernate: select s1_0.id,s1_0.product_id,s1_0.quantity,s1_0.version from stock s1_0 2024-11-03T22:08:44.252+09:00 DEBUG 17108 --- [ Test worker] org.hibernate.SQL : delete from stock where id=? and version=? Hibernate: delete from stock where id=? and version=? Expected :0 Actual :100 <Click to see difference> org.opentest4j.AssertionFailedError: expected: <0> but was: <100> at org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:151) at org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:132) at org.junit.jupiter.api.AssertEquals.failNotEqual(AssertEquals.java:197) at org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:182) at org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:177) at org.junit.jupiter.api.Assertions.assertEquals(Assertions.java:639) at com.example.stock.facade.LettuceLockStockFacadeTest.동시에_100개의_요청(LettuceLockStockFacadeTest.java:55) at java.base/java.lang.reflect.Method.invoke(Method.java:568) at java.base/java.util.ArrayList.forEach(ArrayList.java:1511) at java.base/java.util.ArrayList.forEach(ArrayList.java:1511) Java HotSpot(TM) 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended 어디를 더 수정해야 하는지 모르겠습니다..
프로그래밍 시작하기 : 도전! 45가지 파이썬 기초 문법 실습 (Inflearn Original)
def cnt_word1(filepath): with open(filepath,'r') as file: txt = file.read () txt = txt.replace(',',' ') print(txt) print(cnt_word1("../source/22-1.txt")) 이렇게 그대로 사용했는데 아무것도 안뜹니다 오류메세지가 없는걸로 보아 오류는 아닌데 (그대로 입력) 파일 경로가 문제일까요?