自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(12)
  • 问答 (4)
  • 收藏
  • 关注

原创 项目中配置多个Servlet,注意web.xml和自动生成的@WebServlet("/Servlet")之间的冲突

TestServletA com.wechat.TestServletA TestServletA /TestServletA <servlet><servlet-name>TestServletB</servlet-name><servlet-class>com.wechat.TestSer...

2019-04-01 16:29:39 1546

原创 jupyter中加载虚拟环境选择

首先进入相应的虚拟环境:activate tensorflow-gpu然后输入以下:python -m ipykernel install --user --name tensorflow-gpu --display-name “Python3(tf-gpu)”

2019-02-20 17:07:29 653

原创 余弦相似度计算

def cosine_similarity(vector1, vector2): dot_product = 0.0 normA = 0.0 normB = 0.0 for a, b in zip(vector1, vector2): dot_product += a * b normA += a ** 2 normB...

2018-11-13 21:55:16 250

原创 网络的构建关键代码,词与下一个词实现连接

edges=[]edge=[0]*2for text in cut_list: words=text.lower().split() if len(words)&gt;1: for j in range(0,len(words)-1): edge[0]=neg_dict.get(words[j]) edge[1]=...

2018-11-13 21:05:33 134

原创 对每句话根据,。!分段

def cut_sentence(a): symbol = '/,/./!' cut_list=[] j=0 for i in range(len(a)): if a[i] in symbol: cut_list.append(a[j:i]) j=i+1;# print(cut_list) ...

2018-11-13 21:04:33 112

原创 pandas 将数组格式保存为csv(txt)

np_data = np.array(data_arr)##写入文件pd_data = pd.DataFrame(np_data,columns=['filename','gender'])print(pd_data)pd_data.to_csv('pd_data.csv')

2018-11-13 21:02:36 3399

原创 Python 读取文件夹下所有文件

# 遍历指定目录,显示目录下的所有文件名def eachFile(filepath): pathDir = os.listdir(filepath) file_list=[] for allDir in pathDir: child = os.path.join('%s%s' % (filepath, allDir)) file_list...

2018-11-07 17:17:15 495

转载 词典的保存与读取

#保存 dict_name = {1:{1:2,3:4},2:{3:4,4:5}} f = open('temp.txt','w') f.write(str(dict_name)) f.close() #读取 f = open('temp.txt','r') ...

2018-11-07 16:18:32 270

原创 'Series' object has no attribute 'sort'

data = pd.read_excel(dish_profit, index_col = u'菜品名')data = data[u'盈利'].copy()data.sort_values(ascending = False)将data.sort()改为data.sort_values()

2018-09-20 14:40:07 2786

原创 No module named 'sklearn.liner_model'问题

from sklearn.liner_model import LinearRegression #导入线性回归模型model = LinearRegression()print(model)报错:ModuleNotFoundError Traceback (most recent call last)&lt;ipython-input-24...

2018-09-20 10:12:20 10851 5

转载 Git的使用(一)

ZhaoXishi@LAPTOP-IV341QJL MINGW64 /d/gitsave$ initbash: init: command not foundZhaoXishi@LAPTOP-IV341QJL MINGW64 /d/gitsave$ git initInitialized empty Git repository in D:/gitsave/.git/ZhaoXis...

2018-09-19 23:09:26 104

原创 第一次尝试写博了

希望能在学习的路上勇敢前进

2018-09-19 21:52:16 111

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除