Python
-
2021-07-06 읽을거리읽을거리 2021. 7. 6. 17:26
python 1. 잘못 이해할 수 있는 파이썬 컨셉 5가지 파이썬의 기본 문법들이지만 컨셉을 왜 적용했는지에 대한 내용이다. 코드의 효율화 관점으로 보면 될 것이다. https://betterprogramming.pub/5-python-concepts-that-are-misunderstood-by-beginners-dc8347682a24 5 Python Concepts That Are Misunderstood by Beginners Python is easy — but it can still be tricky when you are starting out betterprogramming.pub 2. python에서의 singleton 패턴 python에서 singleton 패턴을 어떻게 사용하는지, 어떨..
-
2021-07-04 읽을거리읽을거리 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-py..
-
2021-06-30 읽을거리읽을거리 2021. 6. 30. 17:56
python 1. 8가지 데이터 구조들에 대한 python 코드들 list, hash tables 등 다양한 데이터 구조들에 대한 설명과 python 코드 예제들을 보여준다 https://python.plainenglish.io/8-data-structures-every-python-programmer-should-know-acafd46f479b 8 Data Structures Every Python Programmer Should Know Knowing the ideal data structure will boost performance and slash your coding time. Learn how and when to use these 8 top data structures. python.pla..
-
2021-06-27 읽을거리읽을거리 2021. 6. 27. 22:44
python 1. python의 8가지 built-in 함수 이전에 공유한 built-in 함수 글들과 겹치는 부분들도 있지만 새로운 함수들도 있어서 볼 만 하다 https://levelup.gitconnected.com/8-built-in-functions-every-python-programmer-should-know-3552eb768894 8 Built-in Functions Every Python Programmer Should Know Python functions that are amazing and useful levelup.gitconnected.com 2. python 에서 큰 데이터셋을 효과적으로 읽는 방법 주요 키워드는 yield 를 사용한 generator이다. for 문에 open..
-
2021-06-25 읽을거리읽을거리 2021. 6. 25. 22:13
python 1. python에서 사용하는 메모리 확인하는 방법 및 코드 https://pythonspeed.com/articles/measuring-memory-python/ Measuring memory usage in Python: it’s tricky! If you want your program to use less memory, you will need to measure memory usage. You’ll want to measure the current usage, and then you’ll need to ensure it’s using less memory once you make some improvements. It turns out, however, that measuring p..
-
2021-06-24 읽을거리읽을거리 2021. 6. 24. 16:33
python 1. 간단하지만 유용한 pandas 사용 방법 3가지 https://towardsdatascience.com/3-pandas-functions-that-will-make-your-life-easier-4d0ce57775a1 3 Pandas Functions That Will Make Your Life Easier A practical guide with worked through examples towardsdatascience.com 2. 유용한 built-in 함수 10가지 https://medium.com/pythoneers/10-must-known-built-in-functions-in-python-2f196b9c0359 10 Must Known Built-In Functions in..
-
[tensorflow/pytorch] random seed 설정딥러닝 2021. 3. 15. 15:53
프로젝트 끝나고도 너무 바빴고 많은 것들을 해서 한동안은 정리하는 시간을 가지려고 한다. 그리고 velog로 옮길까 했지만 여기가 더 편해서 velog에 작성한 것을 여기로 옮긴다. DL 을 설계하고 재현성에서 문제가 생기는 경우가 많다. 대회에서는 다시 학습했을 때, 동일한 성능이 나와야 스코어를 인정해주는데 해당 부분에서 탈락하는 팀을 간혹 봤다. pytorch의 경우 [해당 링크](https://hoya012.github.io/blog/reproducible_pytorch/)에서 보고 따라하면 된다. 짧게 정리하자면 아래와 같다. # pytorch random seed import torch import numpy as np import random random_seed = 42 torch.manu..