Python
rjswsq1998
这个作者很懒,什么都没留下…
展开
-
plotly使用过程中遇到的问题记录
plotly.graph_objs.FigureWidget是plotly==3.0.0版本引入的,在最新的plotly版本中,又把plotly删了,为3.0.0又没有plotly.io,建议使用3.5.0版本pip install ipywidgetspip install psutil在安装plotly后安装这两个库后基本上不需要再安装其他库了,可以正常使用plotly了...原创 2022-02-16 15:16:08 · 592 阅读 · 0 评论 -
单位四元数轨迹对齐
import osimport numpy as npimport argparseimport mathdef quat2dcm(quaternion): """Returns direct cosine matrix from quaternion (Hamiltonian, [x y z w]) """ q = np.array(quaternion[:4], dtype=np.float64, copy=True) nq = np.dot(q, q) .原创 2022-01-13 23:32:09 · 553 阅读 · 0 评论 -
Element is not clickable at point,Other element would receive the click: xxx 遇到某个对象Click()不能正常使用?
遇到的问题与以下博客类似,可以参考以下博客https://blog.csdn.net/fengqiaoxian/article/details/81104173主要是以上问题的分析,我在代码中对下面保存按钮进行操作时,提示无法直接对保存按钮进行点击,原因是这个网页比较大,保存按钮在底部,会被遮挡住,需要对网页进行翻页操作,然后才能进行点击解决办法self.driver.find_element_by_xpath('/html').send_keys(Keys.PAGE_DOWN)bu原创 2020-07-21 11:25:15 · 1126 阅读 · 1 评论 -
python实现一个链表
class Node(object): # 创造结点类 def __init__(self, val, next=None): self.val = val self.next = nextclass LinkList(object): # 链表的操作 def __init__(self): self.head = Node(None) # 链表的开头,创造一个空结点 def init_list(self, data):.原创 2020-07-21 01:28:50 · 102 阅读 · 0 评论 -
python习题集3、for循环的使用
1.打印以下图形* * * * ** * * ** * ** **for i in range(5, 0, -1): print('*' * i)2.打印以下图形* * * * * * * * * * * * * * *for i in range(5, 0, -1): print(('*' * i).rjust(5, ' '))3.打印以下图形 * * * * * * * * * .原创 2020-07-16 03:32:08 · 1737 阅读 · 0 评论 -
python作业习题集1、数据类型练习
1、数据类型练习题1.1、将以下变量转换为其它数据类型,并观察结果a = 123b = 12.34c = "123"d = 'abcd'e = Truef = False# 转化为intprint(int(c))# 转化为strprint(str(a))print(str(b))print(str(e))print(str(f))# 转化为boolprint(bool(a))print(bool(b))print(bool(c))print(bool(d))1原创 2020-07-15 14:35:26 · 1294 阅读 · 0 评论 -
python作业习题集2、if条件判断
2.1、用户输入年龄,请大于25岁的站到右边去!age = int(input('年龄:'))if age > 25: print('请大于25岁的站到右边去')2.2、用户输入一个数,判断这个数是偶数还是奇数?将结果打印出来number = int(input('偶数还是奇数:'))if number % 2 == 0: print(f"{number}是偶数")else: print(f"{number}是奇数")特殊写法,合并if和else,if和原创 2020-07-15 14:59:52 · 1274 阅读 · 0 评论