welcome


  • 首页

  • 归档

  • 标签

  • 关于

  • 周易

  • 修仙

  • 搜索

《微习惯》

发表于 2018-04-14

很亲切。
1与0的差距远大于n与1的差距。

《头号玩家》

发表于 2018-04-14

彩蛋的确多,237,那就顺其自然吧!哈哈哈。
随便玩玩就可以了,有点意思。

《我有故事,你有酒吗》

发表于 2018-04-13

文笔清新自然,故事细腻煽情。

我希望世间有这般温雅的人,看山花烂漫时带上一包葵花子。

《必须找到阿历克斯》

发表于 2018-04-13

翻译好差!
情节有点意思。
很残暴。

KNN

发表于 2018-04-09
1
2
3
4
from sklearn.neighbors import  KNeighborsClassifier
knn = KNeighborsClassifier(k_neighbors=2)
nn.fit(iris_X_train,iris_Y_train)
knn.predict(iris_X_test)

Matplotlib

发表于 2018-04-05
1
2
3
4
5
6
7
8
9
10
11
import matplotlib.pyplot as plt

x=[]
for i in range(len(math_score)):
x.append(i)

plt.plot(x,math_score,label='math',color='r')
plt.plot(x,physical_score,label='physic',color='b')
plt.plot(x,chemistry_score,label='chemistry',color='g')
plt.legend()
plt.show()

Pandas

发表于 2018-04-04

相关性分析:

1
2
3
4
s1 = pd.Series(math_score) #转为series类型
s2 = pd.Series(physical_score)
corr = s1.corr(s2) #计算相关系数
print (corr)

SVM

发表于 2018-04-03

SVM
1、分类

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
from sklearn import svm

X = [[0, 0], [1, 1], [1, 0]] # training samples
y = [0, 1, 1] # training target
clf = svm.SVC() # class
clf.fit(X, y) # training the svc model

result = clf.predict([2, 2]) # predict the target of testing samples
print result # target

print clf.support_vectors_ #support vectors

print clf.support_ # indeices of support vectors

print clf.n_support_ # number of support vectors for each class

2、回归

1
2
3
4
5
6
X = [[0, 0], [1, 1]]
y = [0.5, 1.5]
clf = svm.SVR()
clf.fit(X, y)
result = clf.predict([2, 2])
print result

python处理excel

发表于 2018-04-01
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import xlrd

data = xlrd.open_workbook('2017下学期成绩1.xlsx'); #打开excel文件
table = data.sheets()[0]; #获取工作表方式1
table = data.sheets_by_index(0); #获取工作表方式2
table = data.sheet_by_name(u'Sheet1'); #获取工作表方式3

ncols = table.cols #获取列数
nrows = table.nrows #获取行数
#for i in range(nrows): #输出所有内容
#print(table.row_values(B))

cell_A = table.cell(2,2).value #获取单元格值方式1
cell_B = table.row(0)[0].value
cell_ = table.col(0)[0].value
col = table2.col_values(10,1) #第十列,第二个开始
print(cell_A)

row = 0
col = 0
ctype = 1 # 类型 0 empty,1 string, 2 number, 3 date, 4 boolean, 5 error
value = 'liluo'
xf = 0 # 扩展的格式化 (默认是0)
table.put_cell(row, col, ctype, value, xf) #写入数据

《许三观卖血记》

发表于 2018-03-14

在余华的作品里,没有多余的人物,没有多余的话语,字字皆露真情,催人深思。

随着故事情节的发展,对许三观,从开始的嫌弃演变为后期的同情。和《活着》一样,人民贫苦,遭遇感人。当时官僚主义作风盛行,二乐的队长压榨民脂民膏,还强行令虚落的许三观陪酒,“喝酒,喝坏了身体不打紧,交情最重要!”。文革,大字报,批斗…搞得整个社会乌烟瘴气。徐玉兰被诬陷,被剃了个阴阳头,惋惜。书中一些客串人物形象也蛮丰满的,比如根龙、阿方,同是天涯沦落人,相逢何必曾相识。

许三观卖了好多次血:
第一次:盖房娶媳妇
第二次:偿还医药费
第三次、第四次:请二乐队长吃饭。
第五、六、七次:为一乐凑集医药费。
第八次:年轻血头不接受卖血。

总体来说,本书有点意思。

1…3456
weihuan

weihuan

55 日志
11 标签
© 2026 weihuan
由 Hexo 强力驱动
主题 - NexT.Muse