728x90 전체 글43 TypeError: sub_process() takes 1 positional argument but 11 were given 멀티 프로세싱 관련, 초기 작업 중 발생한 error 코드는 아래와 같다. # 메인 프로세스 if __name__ == "__main__": print("[main] start") p = mp.Process(target=sub_process, args=("startcoding")) p.start() print("[main] end") error 수정 코드는 아래와 같다. # 메인 프로세스 if __name__ == "__main__": print("[main] start") p = mp.Process(target=sub_process, args=("startcoding",)) p.start() print("[main] end") 차이점은 mp.Process 내 args (튜플 형태) 설정 시 1개만 부여.. Python 2024. 1. 25. re.error: look-behind requires fixed-width pattern 아래는 정규표현식에서 '후방 탐색(look-behind)' 시도하다 발생한 error 코드이다. # 2. Substitution (교체) str3 = "010-2343-4444" result = re.sub("(? Python 2024. 1. 24. [Visual Studio Code] 현재 사용 중인 확장들 (Extensions) 처음 Visual Studio Code (이하, VSCode) 설치 시 기본으로 설치되는 확장 (Extension) 이외에 본인이 새로 추가한 확장들을 기억나는 대로 이 글에 계속 덧붙일 예정이며 'Using'과 'Not using'으로 글 수정 시점마다 변동 가능성은 있다. Using AICodeHelper AICodeHelper - Visual Studio Marketplace Extension for Visual Studio Code - AI-based coding assistant marketplace.visualstudio.com Auto Close Tag Auto Close Tag - Visual Studio Marketplace Extension for Visual Studio Code - .. Novice Developer 2024. 1. 23. [Visual Studio Code] 단어(변수) 다중 선택 구글링하면 바로 알 수 있는 정보이긴 하나 정보 획득 절차를 조금이나마 간소화하기 위해서 요약하면, 다음과 같다. 모든 동일 단어(변수) 동시 선택 선택하고자 하는 변수에 커서를 위치한 후 Ctrl + Shift + L 선택적 동일 단어(변수) 동시 선택 선택하고자 하는 변수에 커서를 위치한 후 Ctrl + D 클릭 시마다 커서 이후에 있는 동일한 단어(변수)가 차례로 선택 Novice Developer 2024. 1. 18. 파이썬 코딩 High Level vs. Low Level 파이썬으로 '로또 번호 추출기'라는 프로그램을 직접 코딩한 후 강의 강사가 직접 작성한 코드와 비교한 결과 느낀 점을 제목에 반영했다. 이 프로그램의 특징은 모두가 알다시피 다음과 같다. 1~45 숫자들 중에서 서로 다른 6개의 숫자 추출 코드 영역은 ①공통 영역과 ②Main 영역, 그리고 ③결과 확인 영역 순서의 총 3 영역으로 분류하는데 이 영역들 중 Main 영역에서 차이점이 드러난다. 일단, 차이가 없는 공통 영역과 결과 확인 영역은 다음과 같다. ※ 공통 영역 # 로또 번호 추출기 import random def get_random_number(): number = random.randint(1, 45) return number lotto_numbers = [] # 로또 번호를 저장할 리스트 ※.. Python 2023. 1. 18. 파이썬 코딩 스타일 아래 링크들을 참조해서 코딩하면 된다. PEP (Python Enhancement Proposals) 8 – Style Guide for Python Code PEP 8 – Style Guide for Python Code | peps.python.org PEP 8 – Style Guide for Python Code Author: Guido van Rossum , Barry Warsaw , Nick Coghlan Status: Active Type: Process Created: 05-Jul-2001 Post-History: 05-Jul-2001, 01-Aug-2013 Table of Contents This document gives coding conventions for the Python co .. Python 2023. 1. 17. 개발 Language 별 .gitignore 파일 쉽게 생성하는 법 처음 알게 된 글은 아래의 글이다. Python 프로젝트 Git Ignore 쉽게 설정하기 Python 프로젝트 Git Ignore 쉽게 설정하기 .gitignore 파일 쉽게 생성하기 프로젝트를 만들다 보면 깃에다가 푸쉬를 해야하는데, 로컬에서 명령어로 깔 수 있는 venv폴더 안의 내용 등, 깃에 푸쉬하지 않아도 되는 내용 들을 따로 .gitignore로 engineer-m.tistory.com 그런데 상기 글에서 알려준 링크로 들어가 보니 Python에만 해당하지 않다는 것을 알게 되었다. 그래서 아래 사이트를 방문한 후 개발에 사용할 언어를 검색하면, 그 언어에 맞는 .gitignore 파일 내용을 생성해주니 해당 파일을 활용하면 된다. gitignore.io gitignore.io Create .. Novice Developer 2023. 1. 6. GitHub 홈페이지에서 repository 처음 생성 시 GitHub가 알려주는 command 제목 그대로 GiHub 홈페이지에서 repository (private 또는 public) 생성한 후 해당 repository 클릭하면 GitHub에서 알려주는 3가지 방법이다. …or create a new repository on the command line echo "# " >> README.md git init git add README.md git commit -m "first commit" git branch -M main git remote add origin https://github.com//.git git push -u origin main …or push an existing repository from the command line git remote add origin https.. Novice Developer 2022. 12. 26. Windows 11 상에서 PyQt5 & Qt Designer 사용하기 위한 절차 PyQt5 & Qt Designer 설치를 하기 전 환경은 다음과 같다. OS: Windows 11 Pro Python 버전: 3.11.0 pip 버전: 22.3.1 연관 사이트는 아래와 같다. PyQt5 PyQt5 Python bindings for the Qt cross platform application toolkit pypi.org PyQt5Designer PyQt5Designer PyQt5 Designer pypi.org 아래처럼 차례로 명령어를 입력하여 설치가 제대로 되었는지를 확인한다. C:\Users\[사용자명]>pip install PyQt5 Collecting PyQt5 Using cached PyQt5-5.15.7-cp37-abi3-win_amd64.whl (6.8 MB) Colle.. Novice Developer 2022. 12. 15. SpartaCodingClub - 직장인을 위한 실전 데이터 분석4기 ◎ 0주차 강의명: 직장인을 위한 실전 데이터 분석4기 기간: 2022년 12월 5일 (월) ~ 2023년 1월 9일 (월), 총 5주 완주할 수 있기를... ◎ 1주차 kaggle Kaggle: Your Machine Learning and Data Science Community Kaggle is the world’s largest data science community with powerful tools and resources to help you achieve your data science goals. www.kaggle.com Google Spread Sheet Google Sheets: 로그인 이메일 또는 휴대전화 accounts.google.com XLMiner Analysis Tool.. Novice Developer 2022. 12. 12. [Jupyter Notebook] TypeError: 'method' object is not subscriptable 마주하게 된 오류 메시지이다. --------------------------------------------------------------------------- TypeError Traceback (most recent call last) Cell In [53], line 1 ----> 1 sum_of_students_by_class = sum_of_students_by_class.drop['user_id'] 2 sum_of_students_by_class TypeError: 'method' object is not subscriptable 그리고 상기 오류를 유발한 코드 위치가 오류 메시지에 보면 1행이라고 나와 있다. 이에 대한 오류를 잡은 정상 코드는 다음과 같다. sum_of_students.. Python 2022. 12. 9. [Jupyter Notebook] UserWarning: Glyph 49688 (\N{HANGUL SYLLABLE SU}) missing from current font. matplotlib 사용 중 나타나는 경고 메시지를 제목으로 잡았는데, 제목 내 HANGUL이란 단어에서 유추 가능하듯이 한글이 깨지는 경우(==네모 '□'로 나타나는 경우) 발생하는 경고이다. 해당 경고를 없애기 위해 가열찬 구글링으로 찾아서 참고한 글은 아래의 글이다. Ubuntu에서 Matplotlib 한글 폰트 설정 Ubuntu에서 Matplotlib 한글 폰트 설정 | Hooni's Playground 안적어두니 매번 까먹는다. 방법만 알면 간단하지만, 방법을 조금이라도 까먹으면 바로 삽질을 하게된다. Ubuntu 환경에서 나눔 폰트를 사용한다는 가정하에 다음의 방법을 따르면 된다. 나눔 폰 hooni-playground.com 경고를 없애기 전, 일단 맞닥트린 전체 경고 메시지 중 하나는 다음.. Python 2022. 12. 7. 이전 1 2 3 4 다음 💲 추천 글 반응형 SMALL