This file contains 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 numpy as np | |
def plot_confusion_matrix(cm, | |
target_names, | |
title='Confusion matrix', | |
cmap=None, | |
normalize=True): | |
""" | |
given a sklearn confusion matrix (cm), make a nice plot |
This file contains 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
1. Two computers install `Python` and `virtualenv` of same version. | |
2. On source computer: | |
pip freeze > requirements.txt | |
pip download -d your_offline_packages_folder_dir -r requirements.txt | |
3. On target computer: | |
pip install --no-index --find-links=your_offline_packages_folder_dir -r requirements.txt |
This file contains 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
uTools Win Extension of Everything | |
mackup Lnx Keep your application settings in sync | |
Blender Lnx 三维动画制作 |
This file contains 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
% Description: | |
% Allow user to output audio from HDMI or other audio devices. | |
% Reference: | |
% https://www.linuxidc.com/Linux/2019-02/156865.htm | |
$ sudo apt install pulseaudio | |
% Reboot | |
$ sudo apt install pavucontrol |
This file contains 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
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
% - This snip is for ext4 partition. | |
% - Do this operation immediately after you deleting the files. | |
% - There is a possibility that some files are not recoverable. | |
% - Reference: | |
% https://blog.csdn.net/q1302182594/article/details/47315177 | |
% https://blog.csdn.net/fjb2080/article/details/5604103 | |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
% Install extundelete. |
This file contains 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
filename = os.path.join(data_dir, trainfilename) | |
row_img = [] | |
with open(filename) as fid: | |
content = fid.read() | |
content = content.split('\n') | |
content = content[:-1] | |
for i in content: | |
img = skimage.io.imread(fname, as_grey=False, plugin=None, flatten=None, **plugin_args) | |
row_img.append(img) | |