随笔分类 - python
摘要:#coding=utf-8 import matplotlib.pyplot as pltx_data = ['2011','2012','2013','2014','2015','2016','2017']y_data = [58000,60200,63000,71000,84000,90500,
阅读全文
摘要:#!/usr/bin/env python import numpy as npfrom geometry_msgs.msg import Pose, Point, Quaternion, Twistfrom tf.transformations import quaternion_from_eul
阅读全文
摘要:import sysimport math w = -0.99114048481x = -0.00530699081719y = 0.00178255140781z = -0.133612662554 r = math.atan2(2*(w*x+y*z),1-2*(x*x+y*y))p = math
阅读全文
摘要:https://www.programcreek.com/python/example/70252/geometry_msgs.msg.PoseStampedhttps://programtalk.com/python-examples/
阅读全文
摘要:1.打开配置文件 打开以下选项 ctrl + o 保存 ctrl + x 退出 2.刷新配置文件 3.打开 I2c选项 4.重启 5.再次运行 参考: https://www.raspberrypi.org/forums/viewtopic.php?t=100189
阅读全文
摘要:1.看官方文档 https://docs.python.org/3/search.html?q=os&check_keywords=yes&area=default 2.看源码 3.dir() import requests,os,randomprint(dir(random))
阅读全文
摘要:# -*- coding:utf-8 -*- from collections import deque # 引入队列 maze = [ [1,1,1,1,1,1,1,1,1,1], [1,0,0,1,0,0,0,1,0,1], [1,0,0,1,0,0,0,1,0,1], [1,0,0,0,0,1,1,0,0,1], [1,0,1,1,1...
阅读全文
摘要:demo1 demo2 参考:https://blog.csdn.net/Hanging_Gardens/article/details/79014160
阅读全文
摘要:>>>x = 7 >>> eval( '3 * x' ) 21 >>> eval('pow(2,2)') 4 >>> eval('2 + 2') 4 >>> n=81 >>> eval("n + 4") 85 参考: https://www.runoob.com/python/python-func-eval.html
阅读全文
摘要:demo1 demo2 参考:https://blog.csdn.net/caobin0825/article/details/80338438
阅读全文
摘要:print("当前时间: ",time.strftime('%Y.%m.%d %H:%M:%S ',time.localtime(time.time()))) import time import datetime t = time.time() print (t) #原始时间数据 print (int(t)) ...
阅读全文
摘要:import sysprint(sys.path) orwhich pythonwhich python3
阅读全文
摘要:输出
阅读全文
摘要:#coding=utf-8 import...
阅读全文
摘要:from multiprocessing import Process import time def print_time(threadName, delay, iterations): start = int(time.time()) for i in range(0,iterations): time.sleep(delay) seco...
阅读全文
摘要:python 2.7 输出
阅读全文

浙公网安备 33010602011771号