Heroku Dash App 배포 - Windows 10

개요 Windows와 Virtualenv를 활용하여 빠르게 App 배포를 해본다. 1. 프로그램 다운로드 설치파일 주소: https://devcenter.heroku.com/articles/getting-started-with-python#set-up 설치할 때, 다음과 같은 에러가 발생할 수 있다. 이럴 경우에는 환경변수를 강제로 잡는다. C:\Program Files\heroku\bin Heroku가 제대로 환경설정이 되어 있는지 확인하려면, 터미널에서 다음 명령어를 입력해 확인한다. $ heroku -v heroku/7.53.0 win32-x64 node-v12.21.0 (base) Github 설치: https://git-scm.com/ 아나콘다 설치: https://www.anaconda.com/products/individual 각각의 환경설정은 모두 해둬야 한다. 2. Getting Started Heroku 회원가입을 한다. (https://signup.heroku.com/) 그리고 로그인을 한다. $ heroku login heroku: Press any key to open up the browser to login or q to exit: Opening browser to https://cli-auth.

Hexo Blog 재연결

문제점 몇몇 수강생이 노트북과 데스트탑 자리 모두에서 깃헙 블로그를 운영하고 싶어함. 또한, 기존에 올라간 블로그 소스를 그대로 사용하고 싶어함. 그런데, 제대로 반영이 안되는 경우가 있음. 해결책 그런 경우 아래와 같이 순차적으로 진행하면 된다. $ hexo init your_blog_repo # 여기는 각자 소스 레포 확인 $ cd myblog $ git init $ git remote add origin https://github.com/your_name/your_blog_repo.git # 각자 소스 레포 주소 아래 명령어에서 에러가 발생이 있다. $ git pull --set-upstream origin main # 에러 발생 그런 경우, 아래 명령어를 추가한다.

Kaggle Survey Data Transformation Tip

Intro Data Transformation is always important to visualise. Here, I just introduced to get value counts in different dataset. If you are newbie, please be aware of this code before you dive into visualization. # This Python 3 environment comes with many helpful analytics libraries installed # It is defined by the kaggle/python Docker image: https://github.com/kaggle/docker-python # For example, here's several helpful packages to load import numpy as np # linear algebra import pandas as pd # data processing, CSV file I/O (e.

M1 Mac Tensorflow Installation in R

개요 M1 Mac에서 텐서플로를 설치 한다. 필자의 현재 M1 환경은 아래와 같다. sessionInfo() R version 4.1.2 (2021-11-01) Platform: aarch64-apple-darwin20 (64-bit) Running under: macOS Big Sur 11.6 Matrix products: default LAPACK: /Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/lib/libRlapack.dylib locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8 attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] ggplot2_3.3.5 dplyr_1.0.7 tfdatasets_2.7.0 keras_2.7.0 [5] reticulate_1.22 tensorflow_2.7.0 loaded via a namespace (and not attached): [1] Rcpp_1.0.7 compiler_4.1.2 pillar_1.6.4 prettyunits_1.1.1 [5] base64enc_0.1-3 tools_4.

Matplotlib 한글 폰트 추가 (Mac)

개요 Mac 유저를 위해 한글 폰트 추가하는 방법을 설명한다. 기본 코드는 Windows에서도 동작한다. 폰트 추가 방법은 생략한다. 한글 폰트 깨진 시각화 간단하게 깨진 한글이 들어간 시각화를 구현한다. import matplotlib.font_manager as fm import matplotlib.pyplot as plt import matplotlib as mpl plt.plot([1, 2, 3, 4, 5]) plt.title("테스트") plt.show() /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/matplotlib/backends/backend_agg.py:238: RuntimeWarning: Glyph 53580 missing from current font. font.set_text(s, 0.0, flags=flags) /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/matplotlib/backends/backend_agg.py:238: RuntimeWarning: Glyph 49828 missing from current font. font.set_text(s, 0.0, flags=flags) /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/matplotlib/backends/backend_agg.py:238: RuntimeWarning: Glyph 53944 missing from current font.

RcppMeCab 패키지 설치 (Windows)

개요 Mecab-ko 형태소 분석기 사용 위해서는 Rcppmecab 패키지를 설치해야 함. RcppMeCab 패키지 설치 앞서서 설치할 파일이 있음. URL: https://github.com/junhewk/RcppMeCab/blob/master/README_kr.md 해당 깃허브에서 설치해야 할 파일을 다운로드 받은 후, “C:\mecab” 경로에 설치한다. 설치 파일 MeCab 프로그램: mecab-ko-0.9.2-msvc-3 MeCab 사전: mecab-ko-dic-2.1.1-20180720-msvc-2 위 파일을 다운로드 받은 후, “C:\mecab"에서 압축을 해제한다. RcppMecab 패키지 불러오기. 이제 패키지를 불러오도록 한다. 해당 패키지는 Github 버전으로 설치해야 하기 때문에 아래와 같이 설치를 한다. library(remotes) install_github("junhewk/RcppMeCab") Downloading GitHub repo junhewk/RcppMeCab@HEAD Installing 3 packages: BH, RcppParallel, Rcpp .

Hexo Blog 이미지 추가

Hexo 이미지 추가 Hexo 블로그 작성 시, 이미지 파일을 추가하는 방법에 대해 배운다. 주요 참고자료 Asset Folders: https://hexo.io/docs/asset-folders Asset Folders | Hexo - Static Site Generator | Tutorial 9: https://youtu.be/feIDVQ2tz0o 방법 1. Global Asset Folder 가장 간편한 방법은 source 폴더 아래 images 폴더를 별도로 만든다. 마크다운에서 아래와 같이 입력을 한다. ![](/images/image.jpg) 실제로 테스트를 해본다. (logo.md) image file: https://upload.wikimedia.org/wikipedia/commons/e/e9/Hexo-logo.png # hexo logo 테스트 - 이미지 ![](/images/Hexo-logo.png) hexo server를 실행한 뒤 결과를 확인한다.

Home Credit Default - Data Visualization

공지 본 포스트는 재직자 교육을 위해 만든 강의안의 일부입니다. Introduction 대회 개요 Many people struggle to get loans due to insufficient or non-existent credit histories. And, unfortunately, this population is often taken advantage of by untrustworthy lenders. Home Credit strives to broaden financial inclusion for the unbanked population by providing a positive and safe borrowing experience. In order to make sure this underserved population has a positive loan experience, Home Credit makes use of a variety of alternative data–including telco and transactional information–to predict their clients’ repayment abilities.

tuber 패키지와 유투브 API를 활용한 Youtube 댓글 수집

공지 본 자료는 아래 책에서 일부 발췌 하였고, 해당 코드를 재응용하기 위해 노력하였습니다. 전체 원 소스 코드를 보시려면 책을 구매하시기를 바랍니다. 실무 예제로 끝내는 R 데이터 분석: 데이터 분석가에게 꼭 필요한 5가지 실무 예제로 분석 프로세스 이해하기 구입처: http://www.yes24.com/Product/Goods/103449758?OzSrank=1 개요 Youtube API에 등록 후, 댓글 수집 및 감성을 분석하는 과정을 담았습니다. 구글 API 프로젝트 생성하기 API 사용을 위해서는 구글 개발자 콘솔에 접속한다. URL: https://console.developers.google.com/ 아래와 같이 새로운 프로젝트 만들기를 클릭 한다.

Classification with Tidymodels

R
개요 새로운 ML 라이브러리인 tidymodels를 활용하여 분류 모델을 개발해본다. 데이터 데이터는 Loan Prediction Practice Problem에서 가져왔다. URL: https://datahack.analyticsvidhya.com/contest/practice-problem-loan-prediction-iii/#ProblemStatement 회원가입 후, 대회 참여를 하면 3개의 파일을 다운로드 받을 수 있다. Train file, Test file, Submission File Data Dictionary Train 파일의 데이터 명세서는 다음과 같다. Test 파일의 데이터 명세서는 다음과 같다. Submission 파일의 데이터 명세서는 다음과 같다. 대회목적 대출 승인 여부를 결정하는 모델을 만드는 것이 대회의 주 목적이며. 평가지표는 분류모형의 Accurarcy로 결정한다. 패키지 및 데이터 불러오기 먼저 필수 패키지를 불러온다.