-
2021-07-09 읽을거리읽을거리 2021. 7. 9. 17:22
python
1. sourcedefender
python 코드를 암호화하는 라이브러리이다. 다른 암호화 라이브러리들도 마찬가지로 언제나 코드 상의 몇가지 제약이 존재하는 것으로 보인다.
https://somjang.tistory.com/entry/Python-sourcedefender를-활용하여-코드를-암호화-하는-방법
[Python] sourcedefender를 활용하여 코드를 암호화 하는 방법
최근 python 코드를 암호화해야할 일이 생겨 sourcedefender를 활용하여 진행해보았습니다. 다음은 sourcedefender를 활용하여 암호화를 진행하는 방법입니다. 상업적으로 사용할때에는 라이센스 문제가
somjang.tistory.com
2. python profiling
python 코드를 얼마나 효율적으로 짰는지, overhead가 어디서 생기는 지 등에 대한 피드백의 용도로 profiling을 많이 쓴다.
해당 글은 profiling을 하는 라이브러리들에 대한 예제를 보여주고 있다.
https://somjang.tistory.com/entry/Python-내-코드의-성적표를-받아보자-프로파일링-하는-방법-feat-lineprofiler
[Python] 내 코드의 성적표를 받아보자! 프로파일링 하는 방법! ( feat. line_profiler)
최근에 업무를 하면서 제가 작성했던 코드의 성능을 높이는 작업이 필요하여 어떻게 할까 고민하던 차에 회사 동기가 알려주어 프로파일링이라는 것을 알게되었고 프로파일링을 통하여 제 코
somjang.tistory.com
3. opencv를 사용하여 도형 그리기
opencv의 기초적인 방법인 도형 그리기에 대한 예제와 함수에 대한 자세한 설명을 하고 있다.
https://somjang.tistory.com/entry/Python-OpenCV를-활용하여-도형을-그리는-다양한-방법
[Python] OpenCV를 활용하여 도형을 그리는 다양한 방법!
이 글에서는 opencv를 활용하여 도형을 그리는 방법에 대해서 적어보려합니다. 0. opencv 설치하고 import 하기 $ pip install opencv-python import cv2 1. 선 그릴 이미지 불러오기 or 흰 바탕 만들기 1-1. 이..
somjang.tistory.com
4. dataclasses, marshmallow, desert 라이브러리
dictionary 데이터를 안전하고 확실한 방법으로 저장하는 방법으로 dataclasses, marshmallow, desert 라이브러리들을 연동하는 예제를 소개하고 있다.
해당 방법은 데이터를 검증되게 저장하지만 코드가 좀 더 방대해지므로
데이터의 확실성과 코드를 짜는 overhead 간의 상관 관계에서 고민하게 될 것이다.
Tame your Python dictionaries with dataclasses, marshmallow and desert
People who write python like dictionaries. People who write a lot of python hate dictionaries. And it’s easy to see why! It’s tempting and…
python.plainenglish.io
5. python의 9가지 built-in functions
거의 매번 built-in function들에 대해 소개하는 글을 올리고 있는데 해당 글의 경우 function이 6글자를 넘어가지 않는 심플한 것들만 소개하고 있다.
보면 한 번쯤은 보고 뭔지는 알고 있겠지만 다시 한 번 상기시키는 용도로 보는 것을 추천
9 Built-in Functions Every Python Programmer Should Know (Part 2)
Handy python functions that are very useful
levelup.gitconnected.com
6. pip 명령어 12가지
pip의 명령어만 12가지를 소개하고 있다.
pip은 python의 라이브러리 등의 환경을 담당하고 있기 때문에 알아두면 언젠가 한 번쯤은 쓸 일이 있을 것이다.
https://medium.com/daily-programming-tips/12-pip-commands-for-python-developers-6e73ea927971
12 Pip Commands for Python Developers
A list of common pip commands that you might find useful
medium.com
7. __init__.py 사용법
python에서 __init__.py를 사용하는 방법에 대해 기술되어 있다.
__init__.py를 간단하게만 잘 사용해도 코드가 심플해지기 때문에 __init__.py를 쓰지 않는 개발자면 읽어보고 사용해보는 것을 추천
https://codeburst.io/creating-local-python-packages-with-init-py-aa19f1e9e80f
Creating Local Python Packages with __init__.py
Packages for code reuse and distribution
codeburst.io
8. Pathlib 라이브러리
경로에 관련된 함수들이 내장되어 있는 Pathlib 라이브러리이다.
일반적으로 쓰는 os 라이브러리보다 더 코드가 심플하므로 os 대신 사용하는 방법을 익혀놓는 것을 추천한다.
https://medium.com/swlh/five-most-useful-pathlib-operations-77f9c96790b3
Five Most Useful Pathlib Operations
Are you still using os.path?
medium.com
9. API-first 원칙
API first 로 개발을 할 때의 장점과 어떤 원칙을 가지고 API를 작성해야하는 지 등에 대한 글들이 많이 있다.
그 중 2가지를 공유한다.
API-first software development for modern organizations
As more organizations move to the cloud, they implement processes to deal with new microservices architectures, containerization, and…
medium.com
https://medium.com/pragmatic-programmers/adopting-the-api-first-principle-9114a55d8db2
Adopting the API-First Principle
Design and Build Great Web APIs — by Mike Amundsen (12 / 127)
medium.com
10. 2021년 5월에 가장 인기있는 파이썬 라이브러리들
생각보다 심플하고 유명한 라이브러리들이 많고, 이런 것도 포함되어 있어? 라는 라이브러리도 있으니 재미삼아 한 번 쯤 훑어보는 것을 추천
https://preettheman.medium.com/most-popular-python-packages-from-last-month-5473232d1806
Most Popular Python Packages From Last Month
Welcome back! A few days ago I talked about the the most popular Python packages for this year, now let’s talk about some of the most…
preettheman.medium.com
11. jupyter notebook 함수들을 unit test 하는 라이브러리 : testbook 라이브러리
jupyter notebook에서 작성한 함수에 대해 unit test를 할 수 있는 라이브러리이다.
해당 라이브러리를 사용한다면 더 이상 함수를 무조건 py 파일로 작성할 이유가 줄어든다.
https://preettheman.medium.com/most-popular-python-packages-from-last-month-5473232d1806
Most Popular Python Packages From Last Month
Welcome back! A few days ago I talked about the the most popular Python packages for this year, now let’s talk about some of the most…
preettheman.medium.com
ML / DL
1. Dask, Vaex 라이브러리
pandas 라이브러리를 base로 더 빠르게 big data를 다룰 수 있게 만든 라이브러리이다.
Dask는 병렬처리, Vaex는 out-of-core 방식을 사용한다.
https://towardsdatascience.com/are-you-still-using-pandas-to-process-big-data-in-2021-850ab26ad919
Are You Still Using Pandas to Process Big Data in 2021?
Pandas doesn’t handle well Big Data. These two libraries do! Which one is better? Faster?
towardsdatascience.com
2. outliers 확인하는 5가지 방법
해당 글에서는 이상치를 탐지하는 5가지 방법에 대해 설명하고 있다. 기존에 많이 알려진 IQR부터 unsupervised learning 방식인 isolation forest 알고리즘까지 다양한 방법을 소개하고 있다.
https://medium.com/swlh/top-five-methods-to-identify-outliers-in-data-2777a87dd7fe
Top Five Methods to Identify Outliers in Data
Identifying outliers is important for every data scientist. It helps detect abnormal data points or data that do not fit in the right…
medium.com
3. luigi, pandas, SQLAlchemy를 사용하여 ETL 파이프라인 구성하기
요즘 airflow에 많이 밀려서 luigi가 생소하게 들릴 수 있지만 파이프라인을 구성하는데 나름 많이 쓰이는 라이브러리이다.
그래서 해당 글에서는 luigi, pandas, SQLAlchemy 라이브러리를 사용하여 ETL 파이프라인을 구성하는 예제를 소개하고 있다.
코드의 심플함은 luigi가 좀 더 좋아보이지만, 반복 작업과 프로세스 유연함은 airflow가 더 좋은 것으로 보인다.
각각의 장단점은 뚜렷하기 때문에 필요한 곳의 요구점을 잘 파악하여 어떤 것을 쓸지 판단하면 되겠다.
https://kpatronas.medium.com/python-create-an-etl-with-luigi-pandas-and-sqlalchemy-d3cdc9292bc7
Python: Create an ETL with Luigi, Pandas and SQLAlchemy
What is ETL?
kpatronas.medium.com
4. jupyter notebook으로 workflow 만들기 : papermill 라이브러리
해당 글은 jupyter notebook으로 workflow를 만드는 방법이다.
위에서 소개한 luigi나 airflow보다는 좀 더 프로토타입에 가까운 라이브러리이기 때문에 사용법도 간단하고, 코드를 만드는데 overhead도 적다.
하지만 파라미터나 결과에 대한 정리는 포함되어 있지 않기 때문에 이를 잘 숙지하고 사용해야 한다.
https://www.wrighters.io/parameters-jupyter-notebooks-with-papermill/
Parameterizing and automating Jupyter notebooks with papermill - wrighters.io
Jupyter notebooks are often run with different parameters, and the best way to automate setting parameters and running them is papermill.
www.wrighters.io
5. parallel big data processing framework : tuplex 라이브러리
파이썬에서 big data를 병렬처리하는 라이브러리이다.
내장 함수들이 low level에 가까워서 빠르게 사용할 수 있지만, db 쿼리 등과 같이 프로그래밍에 깊게 아는 사람들이 사용하는 것이 적합해보인다.
https://github.com/tuplex/tuplex
tuplex/tuplex
Tuplex is a parallel big data processing framework that runs data science pipelines written in Python at the speed of compiled code. Tuplex has similar Python APIs to Apache Spark or Dask, but rath...
github.com
6. multi-agent 기반 강화 학습 라이브러리 : Mava 라이브러리
multi-agent 기반으로 강화 학습을 할 수 있도록 환경을 제공하는 라이브러리로 보인다.
아키텍처는 어느정도 유동적으로 가능해보이지만 사용자가 직접 코드를 작성하여 넣는 것은 예제에서는 나와있지 않다.
https://github.com/instadeepai/Mava
instadeepai/Mava
A library of multi-agent reinforcement learning components and systems - instadeepai/Mava
github.com
7. 데이터 분석에서 사용하는 10가지 파이썬 라이브러리
필자가 데이터 분석에서 가장 많이 쓰는 10가지 라이브러리에 대해서 소개하였다.
예제나 코드가 존재하지는 않고, 라이브러리에 대한 장점에 대해 나열하고 있어서 사용하는 방법은 직접 찾아봐야한다.
https://towardsdatascience.com/10-of-my-favorite-python-libraries-for-data-analysis-597e09cca026
10 Of My Favorite Python Libraries For Data Analysis
A quick rundown of some great analytical packages you should be using in Python.
towardsdatascience.com
8. hugging face hub에서 sentence transformer를 사용하는 법
라이브러리를 사용하여 sentence transformer를 사용하는 것 뿐만 아니라 api를 사용하는 방법도 소개하고 있다.
https://huggingface.co/blog/sentence-transformers-in-the-hub
Sentence Transformers in the Hugging Face Hub
Sentence Transformers in the Hugging Face Hub Over the past few weeks, we've built collaborations with many Open Source frameworks in the machine learning ecosystem. One that gets us particularly excited is Sentence Transformers. Sentence Transformers is a
huggingface.co
9. pytorch 에서 사용하는 class activation map 라이브러리 : TorchCAM
pytorch에서 사용하는 class activation map 라이브러리이다.
CAM 함수뿐만 아니라, CAM을 적용하는 더 많은 범위를 함수로 구현해놓았다.
https://github.com/frgfm/torch-cam
frgfm/torch-cam
Class activation maps for your PyTorch models (CAM, Grad-CAM, Grad-CAM++, Smooth Grad-CAM++, Score-CAM, SS-CAM, IS-CAM, XGrad-CAM) - frgfm/torch-cam
github.com
10. time series 데이터에서의 feature extraction 라이브러리 : tsfresh 라이브러리
time series 데이터에서 feature extraction을 사용하여 feature set을 자동으로 구해주는 라이브러리이다.
https://github.com/blue-yonder/tsfresh
blue-yonder/tsfresh
Automatic extraction of relevant features from time series: - blue-yonder/tsfresh
github.com
11. apache submarine
아파치에서 만든 end-to-end machine learning platform이라고 한다.
작성되어 있는 기능들을 보면 workflow를 관리하는 라이브러리로 보이지만 airflow와 kubeflow 등 여러 툴들과 모든 기능이 일치하지 않는 것으로 보인다.
버전이 아직 0.5.0이어서 완벽하지 않으니 1 버전으로 올라오면 한 번 쯤 써봐야겠다 싶다.
https://github.com/apache/submarine
apache/submarine
Submarine is Cloud Native Machine Learning Platform. - apache/submarine
github.com
12. MLOps 의 단계
MLOps를 어떤 식으로 적용해야하는 지 단계별로 추천하는 툴과 함께 소개하고 있다.
MLOps — Building a Production Ready Data Science Workflow management
In this article, we will be looking at some of the best practices which can be incorporated within a data science practice to make the data
medium.com
UI / UX
1. visualpython 라이브러리
python 코드를 GUI로 구성하는 라이브러리이다.
각 코드가 block으로 구성되어 있고, chart 등의 기능들도 GUI로 구성되어 있기 때문에 데이터 분석용 스크래치 같은 느낌이다.
Visual Python
GUI solution for Data Science
visualpython.ai
2. plotext 라이브러리
plot을 terminal에서 보는 라이브러리이다.
GUI를 사용할 수 없는 환경이라면 해당 라이브러리를 사용하여 데이터 분석을 진행하면 좀 나을 것으로 생각된다.
https://github.com/piccolomo/plotext
piccolomo/plotext
plotting on terminal. Contribute to piccolomo/plotext development by creating an account on GitHub.
github.com
3. text 기반 function graph visualization 라이브러리 : box 라이브러리
함수들 간 연결 그래프를 텍스트로 보여주는 라이브러리이다.
함수들을 파악하는데 유용할 것으로 보인다. 다만, 클래스를 보여주는지는 미지수
https://github.com/p-ranav/box
p-ranav/box
box is a text-based visual programming language inspired by Unreal Engine Blueprint function graphs. - p-ranav/box
github.com
논문
1. R-Drop
논문에서 Normalization layer가 많이 나옴에 따라 dropout을 쓰는 아키텍처를 거의 못보았다.
해당 논문에서는 regularized dropout을 NLP 아키텍쳐에 사용해서 성능을 비교한다.
다른 normalization layer와 비교하여 성능을 뽑는 글이나 논문이 나오지 않을까 싶다.
https://arxiv.org/abs/2106.14448v1
R-Drop: Regularized Dropout for Neural Networks
Dropout is a powerful and widely used technique to regularize the training of deep neural networks. In this paper, we introduce a simple regularization strategy upon dropout in model training, namely R-Drop, which forces the output distributions of differe
arxiv.org
ETC
1. 소프트웨어 개발에 대한 원칙
소프트웨어 개발과 관련된 원칙과 base 개념들에 대해 이야기하고 있다.
Software Development Is Misunderstood ; Quality Is Fastest Way to Get Code Into Production
Shortcuts feel fast but slow you down in the long term
thehosk.medium.com
'읽을거리' 카테고리의 다른 글
2021-07-15 읽을거리 (0) 2021.07.16 2021-07-12 읽을거리 (0) 2021.07.12 2021-07-06 읽을거리 (0) 2021.07.06 2021-07-04 읽을거리 (0) 2021.07.04 2021-07-02 읽을거리 (0) 2021.07.02