pip install tensorflow --ignore-installed six --user
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#-*- coding: utf-8 -*- | |
import os | |
import numpy as np | |
import walkdir as wd | |
prefix = 'pre-' | |
file_info_type = np.dtype({ | |
'names': ['dir','name'], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#-*- coding: utf-8 -*- | |
import os | |
import numpy as np | |
import walkdir as wd | |
file_info_type = np.dtype({ | |
'names': ['dir','name'], | |
'formats':['S100','S100'] | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#-*- coding: utf-8 -*- | |
import os | |
import numpy as np | |
import walkdir as wd | |
file_info_type = np.dtype({ | |
'names': ['dir','name'], | |
'formats':['S100','S100'] | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#-*- coding: utf-8 -*- | |
import os | |
import numpy as np | |
import walkdir as wd | |
file_info_type = np.dtype({ | |
'names': ['dir','name'], | |
'formats':['S100','S100'] | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
# @author linjinhui | |
# @time 2016/08/04 | |
# @version 1.0 | |
import numpy as np | |
from PIL import Image | |
import os | |
import re | |
from tqdm import tqdm |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
# @author linjinhui | |
# @time 2016/04/01 | |
# @version 1.0 | |
# How can I save an image with PIL? | |
# http://stackoverflow.com/questions/14452824/how-can-i-save-an-image-with-pil | |
import numpy as np | |
from PIL import Image | |
import os | |
import re |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fp = fopen('0016.raw','r'); | |
[a,count]=fread(fp); | |
a = reshape(a,row,col)'; | |
figure,imshow(uint8(a)) | |
imwrite(uint8(a),'0016.bmp','bmp'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
from shutil import copyfile | |
# `sudo pip install walkdir` if you don't install walkdir | |
import walkdir as wd | |
import time | |
src_dir = os.environ['HOME']+'/Downloads/' | |
dst_dir = '/Volumes/NUCLEO/' | |
pattern = "*_NUCLEO_F401RE.bin" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Project Structure | |
# [D]src: all source files here | |
# [D]inc: all headers | |
# [D]obj: objects, binary, out | |
# [F]makefile | |
# [D]: derectory | |
# [F]: file | |
# Note:no need to add include directory in any header or source file | |
vpath %.h inc |