전체 글
-
2021-07-02 읽을거리읽을거리 2021. 7. 2. 12:31
python 1. flask 예제 flask에 DB, jinja 템플릿을 연동하여 구성한 예제이다. flask로 웹 페이지를 시작하려는 사람들이 볼만하다고 생각한다. https://blog.miguelgrinberg.com/post/beautiful-interactive-tables-for-your-flask-templates Beautiful Interactive Tables for your Flask Templates Rendering a table with data in a Flask template is a relatively simple task when the table is short, but can be incredibly hard for larger tables that require f..
-
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..
-
GPU 연산 잘 사용하기딥러닝/딥러닝 etc 2021. 4. 2. 17:45
이전에 어디선가 포스팅한 글을 읽었는데 (아마 velog일 것이다) 내가 생각하는 최적화와 딥러닝에서 돌아가는 최적화의 갭이 매우 크다라는 것을 느꼈다. 딥러닝하는 사람들이라면 모두 "GPU는 행렬 연산에 최적화되어 있다" 라는 말을 많이 봤을 것이다. 딥러닝에서 사용하는 연산은 행렬에 최적화되어 있지만 프로그래밍으로 접하는 사람들은 단순히 반복문을 적게 쓰고 Big-O 을 줄이는 방식으로 많이들 생각하겠지만 GPU의 최적화는 무조건 행렬이다. import torch import random import time RANGE = 10000 device = 'cuda' data = torch.Tensor([random.random() for _ in range(RANGE)]).to(device) mul_to..
-
[tensorflow] dacon 운동 동작 분류 AI 경진대회딥러닝/tensorflow 2021. 4. 2. 15:54
dacon에서 주최한 월간 데이콘 11 인 운동 동작 분류 AI 경진대회에 참가하였다. (dacon.io/competitions/official/235689/overview/description/) 결과적으로 public 22등 / private 27 등으로 아쉽지만 동메달을 땄다. 한동안 미루던 코드를 정리해서 올리려고 한다. 일단 사용한 환경은 jupyterlab이고 실험 관리는 neptune.ai 를 사용하였다. neptune.ai 가 매우 편하니 읽어보시는 분은 neptune.ai 사용해보시는 걸 추천 (mlflow도 있지만 이건 직접 설치, 관리해야하기 때문에 대회에서는 약간 비추) 코드 아래 코드들은 모두 하나의 .py 안에 들어있으니 필요하다면 각 블럭을 모두 복붙해서 하나의 파일에 순서대로..
-
[linux] firewall-cmd 폐쇄망 설정linux 2021. 3. 15. 18:29
최근 회사 일로 인해서 방화벽 설정을 많이 건드릴 수 밖에 없었다. 그 중에서 외부로 데이터를 유출할 수 없는 상태로 ssh만 사용 가능하도록 설정하는 법이다 ssh 설정 /etc/ssh/sshd_config UsePAM no # ssh 접속 인증 오류 제거 X11Forwarding no # 포트포워딩 제거 Subsystem sftp /bin/false # sftp 제거 ForceCommand /bin/bash # scp 제거 AllowTcpForwarding no # 포트포워딩 제거 PermitTunnel no PermitUserEnvironment no PermitRootLogin yes 언급하지 설정들은 제대로 찾아보지 않은 것들이다. firewall-cmd 설정 OUTBOUND 차단 설정 fire..