摘要:
with open('DATA.txt') as reader, open('newfile.txt', 'w') as writer: for index, line in enumerate(reader): if index % 20 == 0: writer.write(line) 阅读全文
摘要:
from sklearn.externals import joblib from sklearn.model_selection import train_test_split import numpy as np import cv2 import pylab as pl path = u'testingData16.txt' data0 = np.loadtxt(path,dtype =... 阅读全文
摘要:
# -*- coding: utf-8 -*- import numpy as np from sklearn import svm from sklearn.model_selection import train_test_split from sklearn.externals import joblib from sklearn.tree import DecisionTreeClas... 阅读全文
摘要:
# -*- coding: utf-8 -*- """ 将图片转换生成的txt文件进行格式化处理 """ import os import re import sys def txtChange(): ifn = r"extract.txt"#待处理的txt文件 ofn = r"testingData.txt"#处理好后生成的txt文件 infile = o... 阅读全文
摘要:
# -*- coding: utf-8 -*- #2018-2-19 14:30:30#Author:Fourmi_gsj import cv2 import numpy as np import pylab as pl from PIL import Image import skimage.io as io from skimage import data_dir,data,filters,... 阅读全文