摘要: 参考文章来源 https://segmentfault.com/a/1190000015678751 https://blog.csdn.net/Tong_zhi/article/details/84716210 https://blog.csdn.net/qq_32786873/article/d 阅读全文
posted @ 2019-10-14 16:47 萧白白 阅读(581) 评论(0) 推荐(0) 编辑
摘要: <!doctype html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Document</title> <style> body{ background:cyan; } a{ text-decoration:none; } div 阅读全文
posted @ 2019-06-10 07:59 萧白白 阅读(262) 评论(0) 推荐(0) 编辑
摘要: 笔者遇到的问题如何设置jupyter notebook 打开chrome 浏览器 1、打开anaconda prompt 2、输入jupyter notebook --generate-config 3、显示出jupyter_notebook_config.py 文件所在目录。找到这个文件,用记事本 阅读全文
posted @ 2018-12-15 20:20 萧白白 阅读(4780) 评论(0) 推荐(0) 编辑
摘要: 我试着进入/admin/ 结果它的/static/ 能够正常找到目标文件…真是日了哈*奇了。 我的link标签href=/static/…. 并没有什么问题 试着在urls中加入下面代码,但是没什么用 最后使用以下注释的代码后解决问题 不清楚为什么在app下的static无法被直接加载。所以要在BA 阅读全文
posted @ 2018-12-15 17:53 萧白白 阅读(3939) 评论(0) 推荐(0) 编辑
摘要: #使用{}的方法 s1 = 'Hello {}! My name is {}.'.format('World', 'Python猫') print(s1) s2 = 'Hello {0} My name is {1}.'.format('world','Python 猫') print(s2) s3 = 'Hello {name1}! My name is {name2}.'.format(... 阅读全文
posted @ 2018-12-14 23:02 萧白白 阅读(32208) 评论(0) 推荐(0) 编辑
摘要: >>> list1 = [1,2] >>> id(list1) 50081032 >>> list2 = list1.copy() >>> print(list1 == list2) True >>> id(list2) 50081352#几种字符串复制方法,id相同 >>> s0 ='Python猫' >>> s1 = s0 >>> s2 = str(s0) >>> s3 = s0[:] >>... 阅读全文
posted @ 2018-12-14 21:06 萧白白 阅读(13851) 评论(0) 推荐(0) 编辑
摘要: import numpy as np A = np.arange(12).reshape(3,4) print(A) print(np.split(A,2,axis=1)) print(np.split(A,3,axis=0)) #split不能进行不等分割 #print(np.split(A,3,axis=1)) print(np.array_split(A,3,axis=1)) #纵向分... 阅读全文
posted @ 2018-12-09 22:10 萧白白 阅读(1436) 评论(0) 推荐(0) 编辑
摘要: import numpy as np A = np.array([1,1,1])[:,np.newaxis] B = np.array([2,2,2])[:,np.newaxis] #合并 C = np.vstack((A,B)) D = np.hstack((A,B)) #0,1纵横 E =np.concatenate((A,B,B,A),axis=0) print(E) print(C... 阅读全文
posted @ 2018-12-09 19:56 萧白白 阅读(237) 评论(0) 推荐(0) 编辑
摘要: import numpy as np from pylab import * from matplotlib import pyplot as plt x = [1, 2, 3, 4] y = [3, 5, 10, 25] #创建Figure fig = plt.figure() #创建一个或多个子图(subplot绘图区才能绘图) ax1 = fig.add_subplot(231... 阅读全文
posted @ 2018-12-08 17:46 萧白白 阅读(191) 评论(0) 推荐(0) 编辑
摘要: import numpy as np A =np.arange(3,15).reshape(3,4) print(A) #第一行 print(A[2]) #返回元素 print(A[1][2]) print(A[1,2]) #返回列 print(A[:,1]) #返回行 print(A[2,:]) #返回一段元素 print(A[1,1:2]) #迭代每一行 for row in A: ... 阅读全文
posted @ 2018-12-08 13:48 萧白白 阅读(377) 评论(0) 推荐(0) 编辑