2021. 7. 15. 18:22 [Go]
vscode에서 golang 자동완성이 안될 때
1. ctrl + shipft +p => Go:Install/Update Tools => 전체 설치
2. settins.json을 아래와 같이 설정
'[Go]' 카테고리의 다른 글
time.Time 에서 minute 빼기 (0) | 2021.03.05 |
---|---|
Binary Dump (0) | 2021.03.05 |
2021. 7. 15. 18:22 [Go]
1. ctrl + shipft +p => Go:Install/Update Tools => 전체 설치
2. settins.json을 아래와 같이 설정
time.Time 에서 minute 빼기 (0) | 2021.03.05 |
---|---|
Binary Dump (0) | 2021.03.05 |
2021. 3. 29. 11:43 [딥러닝]
0. Import
import tensorflow as tf
from tensorflow import keras
from keras.layers import Dense
from keras.models import Sequential
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
import warnings
from IPython.display import Image
warnings.filterwarnings('ignore')
%matplotlib inline
SEED = 34
1. mnist 데이터 살펴보기
mnist = keras.datasets.mnist
((train_images, train_labels), (test_images, test_labels)) = mnist.load_data()
2. 데이터의 shape을 출력
print(f"train_imgaes: {train_images.shape}")
print(f"train_labels: {train_labels.shape}")
print(f"test_imgaes: {test_images.shape}")
print(f"test_labels: {test_labels.shape}")
3. (28, 28) 형태의 이미지를 plt을 이용하여 출력
plt.figure()
plt.imshow(train_images[0])
plt.colorbar()
plt.grid()
plt.show()
print(train_labels[0])
4. train_images에서 0이 아닌 값들을 출력
print(list(filter(lambda x: x != 0 , train_images[0].reshape(-1)))[:10])
5. train_images의 dtype을 출력
print(train_images.dtype)
print(train_labels.dtype)
print(test_images.dtype)
print(test_labels.dtype)
6. train/test 이미지 데이터의 범위 확인
print(list(filter(lambda x: x != 0, train_images[0].reshape(-1)))[:10])
print(list(filter(lambda x: x != 0, train_labels.reshape(-1)))[:10])
print(list(filter(lambda x: x != 0, test_images[0].reshape(-1)))[:10])
print(list(filter(lambda x: x != 0, test_labels.reshape(-1)))[:10])
7. train/test 이미지 데이터의 최소/최대값을 출력
print(max(train_images.reshape(-1)), min(train_images.reshape(-1)))
print(max(test_images.reshape(-1)), min(test_images.reshape(-1)))
8. 정수형을 실수형으로 변경 후 dtype으로 비교
train_images = train_images.astype(np.float64)
test_images = test_images.astype(np.float64)
9. 데이터 0-1 노말라이즈 수행
train_images = train_images / 255
test_images = test_images / 255
10. 0-1 노말라이즈 후 데이터의 값이 변경되었는지 문제 6, 7의 방법을 이용하여 확인
print(list(filter(lambda x: x != 0, train_images[0].reshape(-1)))[:10])
print(list(filter(lambda x: x != 0, train_labels.reshape(-1)))[:10])
print(list(filter(lambda x: x != 0, test_images[0].reshape(-1)))[:10])
print(list(filter(lambda x: x != 0, test_labels.reshape(-1)))[:10])
print(train_images.shape, train_labels.shape, test_images.shape, test_labels.shape)
print(train_images.dtype, train_labels.dtype, test_images.dtype, test_labels.dtype)
2021. 3. 5. 17:37 [Go]
ymdHM := "202006011522"
ts, _ := time.Parse("200601021504", ymdHM)
min := time.Duration(-ts.Minute() / 10) * time.Minute
new := ts.Add(min)
fmt.Println(new)
vscode에서 golang 자동완성이 안될 때 (0) | 2021.07.15 |
---|---|
Binary Dump (0) | 2021.03.05 |
2021. 3. 5. 09:42 [Go]
f, _ := os.Create(path)
binary.Write(f, binary.LittleEndian, binary_data)
vscode에서 golang 자동완성이 안될 때 (0) | 2021.07.15 |
---|---|
time.Time 에서 minute 빼기 (0) | 2021.03.05 |
2020. 4. 11. 14:40 카테고리 없음
.symfix path(C:\tmp) : 심볼 다운로드 경로 지정.
.reload : 심볼 로드.
k : 스택 트레이스의 정확성 여부 확인.
.logopen path(c:\temp\a.log) : console 로그저장.
.logclose : 로그파일 닫음.
lmv : 모듈 정보
lmt: 모듈 목록 및 타임스태프
!lmi address : 세부 모듈 정보
dc address L100 : address의 100byte를 덤프.
!dh address : PE 헤더 덤프.
!dh -i address : IMAGE_IMPORT_DESCRIPTOR.
!address : 메모리 맵
!address -summary : 메모리 맵 요약
dps address L100/8 : 32bit, 64bit 환경에 맞게 메모리를 보여줌.
u address : address 이후의 assembly 코드를 보여줌.
ub address : address 이전의 assembly 코드를 보여줌.
!chkimg -v -d PE_PATH : PE파일의 무결성 검사.
.exepath+ path : 파일을 찾기 위해 경로를 명시해줌
2020. 4. 4. 15:10 [Git]