pip install xlrd==1.2.0
xlrd-2.0.1只支持读取xls,不支持读取xlsx, xlrd-1.2.0版本同时支持xlsx和xls格式。
All posts by ht
vector calculation in numpy
# show vector calculation in numpy function
import numpy as np
# new vec
vec_1 = np.array([1,1,0])
vec_2 = np.array([2,3,1])
# mode of the vec
vec_mode = np.linalg.norm(vec_1)
# dot:a.b=|a|*|b|*cos(theta)
vec_dot = np.dot(vec_1, vec_2)
# cross: a*b = c, |a*b|=|a|*|b|*sin(theta)
vec_cross = np.cross(vec_1, vec_2)
print(' mode for vev_1:', vec_mode, '\n dot:', vec_dot, '\n cross:', vec_cross)
在 Ubuntu 20.04 LTS 桌面版上安装 MS 字体
使用命令行安装
$ sudo apt update$ sudo apt install ttf-mscorefonts-installer$ sudo fc-cache -f -v
将所有的 Windows 字体复制到 /usr/share/fonts 目录下并使用一下命令安装字体:
$ mkdir /usr/share/fonts/WindowsFonts$ cp /Windowsdrive/Windows/Fonts/* /usr/share/fonts/WindowsFonts$ chmod 755 /usr/share/fonts/WindowsFonts/*fc-cache
ubuntu wps 不能输入中文
sudo vim /usr/bin/wps (et, wpp)
在 #!/bin/bash 下面输入(搜狗基于fcitx,系统内可能是ibus)
export XMODIFIERS=”@im=fcitx”`
export QT_IM_MODULE=”fcitx”
Ubuntu18.04下解决Qt出现qt.qpa.plugin:Could not load the Qt platform plugin “xcb“问题
sudo apt-get install libxcb-xinerama0
from:
https://cloud.tencent.com/developer/article/1726400
photoshop loadlibrary failed with error 87
Windows 10上运行photoshop、nextcloud等软件的时候出现错误提示“loadlibrary failed with error 87”,网上有很多同样的错误,总结如下:
1、此问题从Windows 8就开始出现了,发生问题的软件都是 CAD、PS 之类,其实是AMD显卡的问题,将驱动恢复到2013年之前即可。
2、简单粗暴有效的一个方法是进入C:\Windows\System32 ,搜索atig6pxx.dll 全部删除,为了以防万一,请提前备份。
注意:在删除文件时,可能会提示你需要管理员权限。这时,点击“继续”即可。
3、删除完毕问题解决,可重启软件,不再出现错误提示。
Matplotlib 001
import matplotlib.pyplot as plt
import numpy as np
import csv
column1=[]
column2=[]
with open('book1.csv','r',encoding='utf-8') as data_input:
reader= csv.reader(data_input)
for row in reader:
try:
data1=float(row[0])
data2=float(row[1])
column1.append(data1)
column2.append(data2)
except ValueError:
continue
'''
x=np.linspace(0,10,100)
y=np.sin(x)
y1=np.random.randn(100)
plt.scatter(x,y1,label="scatter figure")
'''
plt.plot(column1,column2,ls='-',lw=2,label="plot figure")
plt.legend()
#plt.xlim(0,10)
#plt.ylim(0,1)
plt.xlabel("x axis")
plt.ylabel("y axis")
#plt.axhline(y=0.5,ls='--')
plt.show()
Navicat for MySQL
下载Navicat for MySQl中文版
链接: https://pan.baidu.com/s/19BlJRx7tLnDPIM4U6DNWvA 提取码: d9ci
CAD 标注插入特殊字符
度数:%%d;正负:%%p;直径:%%c;角度:\U+2220;标识:\U+2261;不相等:\U+2260;欧姆:\U+2126;欧米伽:\U+03A9;下标n:\U+208n(n为数字);上标2/3:\U+00B2/3;微米:\U+00B4;希腊字母:增加一种使用symbol字体的字体样式;
R410网络唤醒
看过51CTO一篇帖子写道R410服务器开启WOL只需在自检时按下CTRL+S即可进入网卡设置,但并未说明前提。
R410服务器在开启PXE的情况下,才能在自检时出现Ctrl+S选项,进而进入网卡设置开启WOL。
详细设置如下: Continue reading R410网络唤醒