分类目录

链接

2024 年 4 月
1234567
891011121314
15161718192021
22232425262728
2930  

近期文章

热门标签

新人福利,免费薅羊毛

python 四元数 转 欧拉角

  import sys import math w = -0.99114048481 x = -0.00530699081719 y = 0.00178255140781 z = -0.133612662554 r = math.atan2(2*(w*x+y*z),1-2*(x*x+y*y)) p = math.asin(2*(w*y-z*z)) y = math.atan2(2*(w*z+x*y),1-2*(z*z+y*y)) angleR = r*180/math.pi angleP = p*180/math.pi angleY = y*180/math.pi print (angleR)#翻滚 print (angleP)#俯仰 print (angleY)#偏航 输出: 0.575472843396 -2.24876083545 15.3574378019

Python 暂无评论 阅读(131)

曲线(轨迹)相似度算法——LCSS最长公共子序列算法

上一篇,我们用DTW解决两条曲线相似度的算法,但是这个算法有一个明显的BUG,就是: DTW和欧式距离对轨迹的个别点差异性非常敏感,如果两个时间序列在大多数时间段具有相似的形态,仅仅在很短的时间具有一定的差异,(即很小的差异也会对相似度衡量产生影响)欧式距离和DTW无法准确衡量这两个时间序列的相似度。LCSS能处理这种问题 为了解决这个问题,我找到了专注用于轨迹相似度的算法LCSS: 0、LCSS基本介绍以及相关内容 分析移动用户位置的相似性,提取移动用户的相似路径在出行路径预测、兴趣区域发现、轨迹聚...

Python, Unity3D 暂无评论 阅读(410)

python版DTW动态时间规划算法

前言 最近遇到一个问题,就是计算三维空间上两条曲线(一系列的 点(x,y,z))相似度。 最开始使用 豪斯多夫(Hausdorff)距离 可以简易计算出,两条曲线之间的距离。 但是hausdorff有明显的两个BUG: 1)就是不支持回程。比如一个 “V”t型的曲线, 2)两条曲线长度不一致。比如:line1='---^--v---', line2='-----------^------v-',其实两条曲线相似度应该很高的,但是hausdorff算出来就很低。   为了解决这个问题,网上查了很多资料,提出,使用hausdorff+时间(t),来解决回程问题,但是后面我搜索到了DTW算...

Python, Unity3D 暂无评论 阅读(138)

macOS Charles 4.x版本的安装及使用(含破解激活)

下载安装 Charles官网下载安装包,下载成功后根据指示安装即可 官网地址: www.charlesproxy.com   Charles激活码: Registered Name: https://zhile.io License Key: 48891cf209c6d32bf4 (转自CSDN:blog.csdn.net/qq_25821067…) 激活步骤: 打开Charles,help→Registered to,输入账号和key提交破解成功就可以正常使用啦!     设置PC端代理端口号   设置端口号如:8888(也可更改,手机设置代理输入一致即可)   设置手机端代理端口号 查看IP地址 手机连接与Mac相同的无线网...

Game, Python, 前端, 安全, 测试 暂无评论 阅读(128)

centos安装chrome+chromedriver

一、下载对应的版本: driver: https://chromedriver.storage.googleapis.com/index.html?path=103.0.5060.24/ chrome: http://dist.control.lth.se/public/CentOS-7/x86_64/google.x86_64/   二、安装 unzip chromedriver.zip yum install google_chrome...   三、使用python做中转代理 Main.py import os from fastapi importFastAPI,Request import uvicorn from fastapi importFastAPI fromGoogleUtilimportGoogleUtil from fastapi.responses importHTMLResponse app =FastAPI() @app.get("/") d...

LINUX, Python, 大数据 暂无评论 阅读(92)

PyQt5 demo

先说结论: pyqt5生成的 先通过 QT designer.exe 生成UI 保存为qt5demo.ui 通过命令生成.py文件: pyuic5.exe -o qt5demo.py qt5demo.ui 编写主程序py文件, 如下: import sys import os fromPyQt5.QtWidgetsimportQApplication,QMainWindow from qt5demo importUi_MainWindow def click_button(): print('click_button') pass if __name__ =="__main__":     app =QApplication(sys.argv)     w =QMainWindow()# 实例化QMainWindow类     ui =Ui_MainWindow()# 创建主窗体对象,实例化Ui_MainWindow     ui.s...

Python 暂无评论 阅读(114)

python静态变量赋值

使用dir获取所有属性(包含静态),使用Exce赋值   import json     class Article(object):     title = None     link = None     abstract = None     keywords = []     content = None     pub_date = None     xxx = '99999'       def __init__(self):         for p in dir(self):             if not p[0:2] =='__':                 exec('self.'+p+' = Article.'+p)           pass                    a = Article() print(a.__dict__) output:  {'abstract': None, 'content': None, 'keywords': [...

Python 暂无评论 阅读(49)

可在阿里云dataworks直接使用的worldbank data api

代码下载: WorldBankAPI.zip """ wbdata: A wrapper for the World Bank API """ __version__ ="0.3.0" """ wbdata.api: Where all the functions go """ import collections import datetime import re import warnings import tabulate try: import pandas as pd exceptImportError:     pd =None from decorator import decorator BASE_URL ="https://api.worldbank.org/v2" COUNTRIES_URL = f"{BASE_URL}/countries" ILEVEL_URL = f"{BASE_URL}/incomeLevels" INDICATOR_URL = f"{BASE_URL}/indicators" LT...

Python 暂无评论 阅读(61)

利用clash restapi实现节点切换

import random from utils importHttpUtil fromConfigimportConfig import json classProxyUtil:     http =HttpUtil() def __init__(self): pass @staticmethod def get_proxies():         res = json.loads(ProxyUtil.http.getString(Config.proxy_url +"/proxies")) # print(res)         proxies = res["proxies"] print(proxies) return proxies pass @staticmethod def get_nodes():         res = json.loads(ProxyUtil.http.getString(Config.proxy_url +"/proxies")) # print(res)         proxies = ...

Python 暂无评论 阅读(394)

python常用(1)

# encoding: utf-8 from openpyxl.reader.excel import load_workbook  # FOR xlsx import os import openpyxl from decimal import Decimal import shutil import zipfile     path = os.getcwd()   testplan = path + "\\testplan.xlsx"   mapping_path = os.path.join(path, "MUT_Product_Mapping.xlsx") #print(mapping_path) workbook = load_workbook(mapping_path) worksheet = workbook.worksheets[0]   mapping = {}   for index, item in enumerate(worksheet.rows):          # START with  age row ...

Python 暂无评论 阅读(127)