Tech이야기~!
welcom 자세히보기

Computer 74

[Python][Listt] 2차원 리스트를 1차원 리스트로

파이썬의 다양한 기능을 사용하면, for 문을 사용하지 않고도 리스트를 이어붙일 수 있습니다. my_list = [[1, 2], [3, 4], [5, 6]] # 방법 1 - sum 함수 answer = sum(my_list, []) # 방법 2 - itertools.chain import itertools list(itertools.chain.from_iterable(my_list)) # 방법 3 - itertools와 unpacking import itertools list(itertools.chain(*my_list)) # 방법4 - list comprehension 이용 [element for array in my_list for element in array] # 방법 5 - reduce 함수 이..

Computer/Python 2020.02.13

matplotlib 테마 바꾸기

matplotlib 테마 바꾸기Permalink 최근에 jupyter notebook에서 jupyter lab으로 변경했습니다. 그리고 jupyter lab의 까만 화면으로 변경했는데, 바꾸고 보니까, matplotlib에서 그림을 그릴 때, tick이 잘 안보이는 문제가 있어요. 기본적으로 matplotlib는 그림이 하얀색 배경에 그려진다고 가정합니다. 따라서, tick이 모두 검은색으로 되어 있죠. dark theme을 적용했을 때는 이게 겹쳐서 잘 안 보이는데, 이를 어떻게 해결할 수 있을까? 하는 생각이 들어서 정리해봤습니다. plt.style.use()Permalink plt.style.use()에 넣으면 됩니다. argument로는 다음을 넣을 수 있어요. ‘default’ ‘dark_bac..

Computer/Python 2020.02.03

[파이썬] python matplotlib animation ffmpeg error

파이썬/각종 오류 [파이썬] python matplotlib animation ffmpeg error by 사용자 데디엘 2018. 12. 9. 파이썬에서 matplotlib의 animation을 이용하려면 ffmpeg 설치가 필수인데요, 윈도우 OS에서 설치방법은 https://m.blog.naver.com/chandong83/221165275268 https://www.wikihow.com/Install-FFmpeg-on-Windows https://github.com/adaptlearning/adapt_authoring/wiki/Installing-FFmpeg 위 3 주소로 들어가시면 충분히 설치하실 수 있을 것입니다. 여기서 꼭 주의해야하는것!!! OS와 버전을 정확히 확인해서 ffmpeg를 설치..

Computer/Python 2020.01.31

우한바이러스 발생 전세계 발생지역? 실시간 사이트

우한바이러스 발생 전세계 발생지역? 실시간 사이트 Wuhan coronavirus outbreak Map A deadly virus is spreading across the world. Here's where cases have been confirmed. Wuhan coronavirus (2019-nCoV) Middle East respiratory syndrome (MERS) Severe acute respiratory syndrome (SARS) Common cold caused by coronavirus Origin First reported in December 2019 in Wuhan, China. First reported in 2012 in Saudi Arabia. First report..

Computer 2020.01.28

cannot resolve symbol ~ 에러 해결하기

cannot resolve symbol ~ 에러 해결하기 프로젝트를 진행 중에 모든 변수 코드가 빨갛게 변하는 에러를 맞이했습니다. 스탠다드 라이브러리에 포함된 변수들에서 에러가 발생하는 것 처럼 보였습니다. 오늘은 프로젝트 중 한 번씩은 발생하는 'Cannot resolve symbol ~' 에러를 다양한 방법으로 해결해보도록 하겠습니다. 아래와 같은 몇개의 타입 오류가 아닌, '모든' java 코드에 타입 에러가 발생하는 경우입니다. 1번째 방법, Clean Project -> Rebuild Project 1번째 방법은 'Build' 카테고리에서 Clean Project와 Rebuild Project를 순차적으로 시행하여 빌드를 초기화하고 재정의하는 방법입니다. 논리적으로나 알고리즘상으로 코드가 올바..

Computer 2020.01.26

[Unity]01.ARCore 사용 - ARCore 시작하기

오늘 시간에는 구글에서 제공하는 ARCore를 사용해 보겠습니다. Vuforia말고도 AR 구현에 사용되는 기능이니 알아볼게요. 1. ARCore ARCore는 조명을 인식가능하고, 오브젝트를 쉽게 배치할 수 있다는 점이 매력적입니다. 게다가 실내 네비게이션으로도 사용중이라고 하는데 튜토리얼을 통해서 ARCore에 대해 알아보도록 하겠습니다. 1-1) 프로젝트 생성 및 설정 프로젝트 이름과 저장할 위치를 지정 후 프로젝트를 생성한다. 상단 메뉴 File => Build Settings에서 안드로이트 플랫폼으로 변경하자. ARCore 설정과 안드로이드 빌드를 위해 패키지 이름을 바꿔주자. ARCore는 Andndroid 7.0 이상에서 동작하며, XR Settins => AR Core Supported를 ..

Computer 2020.01.25

pip 이용한 설치중 Cannot uninstall 'pyserial' 에러발생

서버를 다시 세팅하고 pwntools 를 설치중에 다음과 같은 에러가 발생했다. Cannot uninstall 'pyserial'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall. Cannot uninstall 'pyserial'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall. s..

Computer 2020.01.24