읽을거리

2021-07-04 읽을거리

scjung 2021. 7. 4. 17:21

python

1. iterable 과 iterator 차이

python에서 이런 세세한 함수들의 차이를 알고 사용하면 좀더 효율적인 코드를 작성할 수 있는 토대가 된다.

https://twpower.github.io/267-python-iterable-and-iterator

 

[Python] Iterable과 Iterator

Practice makes perfect!

twpower.github.io

 

2. python 코드를 더 효율적이고 가독성 있게 짜는 4가지 방법

이전에도 소개했던 글들에서 크게 다른 점은 없지만, built-in 함수인 enumerate 와 f-string이 추가적으로 소개되어 있다.

https://betterprogramming.pub/4-ways-to-level-up-your-python-code-f148a50efeea

 

4 Ways To Level Up Your Python Code

Avoid unnecessary for loops, access dictionary items more effectively, and more

betterprogramming.pub

 

3. python 코드를 올바르게 짜는 10가지 방법

흔히 속도를 저하시키고 가독성을 낮추는 코드들에 대해 지적하고 이를 개선하는 방법을 제시한다.

https://levelup.gitconnected.com/10-python-tricks-for-speed-up-your-code-8c189d8c99b6

 

10 Python Tricks For Speed Up Your Code

Tricks To Let Your Python Code Run 10 Times Faster

levelup.gitconnected.com

 

4. 매우 유용한 10가지 decorator 함수들

흔히들 많이 보고 쓰는 decorator 함수도 있지만 모르던 decorator들이 더 많을 것으로 생각된다.

https://towardsdatascience.com/10-fabulous-python-decorators-ab674a732871

 

10 Fabulous Python Decorators

A great thing about the Python programming language is all of the features that it packs into a small package that are incredibly useful. A lot of said features can completely alter the functionality…

towardsdatascience.com

 


 

ML/DL

1. one-hot encoding을 사용하지 마라

해당 글에서는 categorical variables에서 one-hot encoding 대신 사용하는 encoding에 대한 3가지 방법에 대해 설명하고 있다.

모든 카테고리에서 one-hot encoding을 하면 차원의 저주가 걸릴 확률이 높기 때문에 해당 encoding들을 사용하는 것이 더 적합한 경우가 있을 것으로 생각된다.

https://medium.com/swlh/stop-one-hot-encoding-your-categorical-features-avoid-curse-of-dimensionality-16743c32cea4

 

Stop One-Hot Encoding your Categorical Features — Avoid Curse of Dimensionality

Techniques to Encode Categorical Features with many Levels/Categories

medium.com

 

2. raySGD 라이브러리

이전에 소개하였던 ray에서 병렬로 학습하는 부분에 대한 예제와 이점들을 소개하고 있다.

https://medium.com/distributed-computing-with-ray/faster-and-cheaper-pytorch-with-raysgd-a5a44d4fd220

 

Faster and Cheaper Pytorch with RaySGD

Distributed training is annoying to set up and expensive to run. Here’s a library to make distributed Pytorch training simple and cheap.

medium.com

 

3. plotly 라이브러리

interactive visualization 라이브러리로 소개되는 plotly 이다. 그래프를 그리는 코드가 matplotlib 보다 단순하고 interactive하기 때문에 그래프를 그리는 용도로 주로 사용하면 좋을 것으로 생각된다.

https://pub.towardsai.net/matplotlib-is-dead-long-life-to-plotly-express-e1671dce0d18

https://medium.com/swlh/plotly-python-an-introduction-8cd8e41bb53e

 

Plotly Python: An Introduction

While learning Python, I found countless articles going over the two core graphing libraries — Matplotlib and Seaborn. However, I found…

medium.com

 

Plotly Express: Interprete data through interactive visualization

It’s the right moment to move forward to other tools to visualize your data. Do you know Matplotlib? Forget it. Maybe it can be easy to apply and doesn't occupy much memory, but it’s hard to observe…

pub.towardsai.net

 

4. pandas plotly 설정 및 사용 예제

pandas에서 plot을 그리는 backend를 별도로 설정하고 이를 사용하는 방법들에 대한 예제를 준다.

https://towardsdatascience.com/plotting-in-pandas-just-got-prettier-289d0e0fe5c0

 

Plotting in Pandas Just Got Prettier

Create rich visualisations and dashboards with the Pandas plotting backend for Plotly and Bokeh

towardsdatascience.com

 

5. 재밌어 보이는 2020년의 10가지 머신러닝 프로젝트들

총 10가지 머신러닝 프로젝트들에 대해 간략하게 소개되어 있다. 알고리즘이 아닌 머신러닝을 적용하여 유용하고 재밌어보이게 만든 프로젝트들이어서 한번 훑어보는 것을 추천

https://betterprogramming.pub/the-top-10-trending-machine-learning-projects-of-2020-d923bf31abb7

 

The Top 10 Trending Machine Learning Projects of 2020

Background matting, GAN models, and more

betterprogramming.pub