- 博客(843)
- 收藏
- 关注
原创 sns.clustermap 的col_colors如何赋值?(python中所有的color)
sns.clustermap 的col_colors如何赋值?https://en.wikipedia.org/wiki/List_of_Crayola_crayon_colors以上的都不是,以下的才是答案:
2021-01-26 16:54:56
4
原创 pandas 向量拼接 (一定要用上ignore_index = True)
oneVector2 = pd.DataFrame(data =np.random.random((1,3)))oneVector1 = pd.DataFrame(data =np.random.random((1,3)))按照“行”进行拼接:ccc = pd.concat([oneVector1,oneVector2],axis =0,ignore_index = True)如何对列进行拼接呢?ccc = pd.concat([oneVector1,...
2021-01-25 22:54:42
6
原创 永久修改pip 安装地址
%HOMEPATH%\pip\pip.ini[global]timeout = 300index-url = https://mirrors.aliyun.com/pypi/simple[install]trusted-host=mirrors.aliyun.com
2021-01-23 14:44:40
14
原创 Python 时间戳怎么用
time.strftimetime.strftime("%Y-%m-%d%H:%M:%S",time.localtime())
2021-01-23 14:14:10
24
原创 Python listdir只展示指定类型的文件
def formPMStrgetOldName(PMStr): rootPath = r'D:\x\s\d\d' dirs = os.listdir(rootPath) for i in dirs: # 循环读取路径下的文件并筛选输出 if os.path.splitext(i)[1] == ".csv" and (PMStr in i): # 筛选csv文件 return i...
2021-01-21 16:39:42
27
原创 sql语句查询重复的字符串
select id, name, memofrom Awhere id in (select id from A group by id having count(1) >= 2)有点点复杂,不如用excel来的快=COUNTIF(A:A,A1)
2021-01-20 16:41:54
20
原创 sql 结果唯一性 计数 sql查询唯一值的数量
select COUNT(DISTINCT concat(concat(aaa,'-'),bbbb)) from cccc.dddd where ddd= 9999
2021-01-20 16:20:59
36
原创 sql 语句 两列结果拼在一起
select concat(concat(aaa,'-'),bbb) as results111 from cccc where pid = 999
2021-01-20 16:15:50
18
原创 latex如何设置页面边框
\usepackage{geometry} %调整页面边框\geometry{a4paper,scale=0.8}%调整到80%
2021-01-20 11:27:21
33
原创 numpy 点乘
直接用*不是点乘。是对应位置直接相乘;aaa[0][0]*bbb[0][0]0.26414606106052124ccc = aaa*bbbccc[0][0]0.26414606106052124如果要用矩阵乘法,则需要这样做:ddd = aaa.dot(bbb)ddd[0][0]2.304917982640458aaa[0,:].dot(bbb[:,0])2.3049179826404576...
2021-01-14 19:41:51
18
原创 ip地址、子网掩码、默认网关和DNS服务器是什么含义
ip地址、子网掩码、默认网关和DNS服务器是什么含义我觉这个写的非常详细。也很生动。。但是有个问题:为什么我的局域网的路由器给我分配的ip会冲突呢?导致我上网,速度很慢
2021-01-14 17:01:43
24
原创 HEXO post里的图片无法正常显示
有好几种解决方案:https://hexo.io/zh-cn/docs/asset-folders先试试配置yml的方式;确实解决了问题
2021-01-14 13:58:00
30
原创 Unable to merge unrelated histories in this repository.
Unable to merge unrelated histories in this repository.git pull --allow-unrelated-histories
2021-01-13 23:50:05
38
原创 PYQT设置完layout之后,无法正常展示。
PYQT设置完layout之后,无法正常展示。可能的原因是,使用的控件不是mainWindow。更换为mainWindow就可以了
2021-01-13 16:45:11
21
原创 pyqtgraph 取消右键菜单
self.graphicsView.getView().setMenuEnabled(False) # 取消右键菜单
2021-01-12 16:08:18
38
原创 pyqtgraph如何使imageView的直方图不可见(以及ROI BUTTON 和 menubutton)
pyqtgraph如何使imageView的直方图不可见(以及ROI BUTTON 和 menubutton)self.gViewProjectVideo.getHistogramWidget().setVisible(False)self.gViewProjectVideo.ui.menuBtn.setVisible(False)self.gViewProjectVideo.ui.roiBtn.setVisible(False)...
2021-01-12 16:07:42
26
原创 plt.figure() 能不能加图注
plt.title('Interesting Graph',fontsize='large',fontweight='bold') 设置字体大小与格式plt.title('Interesting Graph',color='blue') 设置字体颜色plt.title('Interesting Graph',loc ='left') 设置字体位置plt.title('Interesting Graph',verticalalignment='bottom') 设置垂直对齐方式plt.t...
2021-01-12 12:49:25
26
原创 hog图片的可视化
hog图片的可视化from skimage.feature import hogimage = mpimg.imread(rootPath + r'crop-delete-images/0.03 s.jpg')pixelsPerCell = 32kwargs = dict(orientations=8, pixels_per_cell=(pixelsPerCell, pixelsPerCell), cells_per_block=(1, 1), transform_sqrt=True)nor
2021-01-12 12:45:40
29
原创 如何对imagePy进行汉化
第一步:Fork原始仓库imagePy1. fork ImagePy仓库 #将父仓库fork到自己账户下,XXXX/.git(A仓库)2. conda create imagePy #在本地创建虚拟环境3. pip install -r requirements.txt4. python __main__.py #运行程序第二步:汉化(以Edit为例)1. 在lang/Chinese/Plugins下创...
2021-01-12 12:25:59
22
原创 java字符串
String s= "12345678";a = s.substring(0,s.length()-5)1234b = s.substring(s.length()-5, s.length())56789
2021-01-08 23:41:30
19
空空如也
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人 TA的粉丝