摘要: 尝试用百度云做broker进行连接,但是一直连接不上 打印错误代码是"1", 即“ incorrect protocol version”错误。 错误代码打印: 后来查明,是因为百度云提供了三个连接,分别是: TCP, SSL, WSS, 三者对应不同的端口号。只有使用TCP对应的端口号不会报错。 阅读全文
posted @ 2018-08-01 16:25 下划线是我 阅读(695) 评论(0) 推荐(0)
摘要: 参考: eval/exec/compile的区别:https://stackoverflow.com/questions/2220699/whats-the-difference-between-eval-exec-and-compile-in-python pickle的使用: https://p 阅读全文
posted @ 2018-08-01 09:35 下划线是我 阅读(148) 评论(0) 推荐(0)
摘要: 参考文献: https://www.cnblogs.com/zhengxingpeng/p/6679280.html https://www.kdnuggets.com/2016/04/association-rules-apriori-algorithm-tutorial.html 代码: Apr 阅读全文
posted @ 2018-07-31 14:40 下划线是我 阅读(494) 评论(0) 推荐(0)
摘要: 常见聚类算法比较:(One-class SVM versus Elliptic Envelope versus Isolation Forest versus LOF) http://scikit-learn.org/stable/modules/outlier_detection.html 为了实 阅读全文
posted @ 2018-07-31 14:24 下划线是我 阅读(941) 评论(0) 推荐(0)
摘要: 可迭代对象的定义 可以直接作用于for循环的数据类型有以下几种: 一类是集合数据类型,如list、tuple、dict、set、str等; 一类是generator,包括生成器和带yield的generator function。 这些可以直接作用于for循环的对象统称为可迭代对象:Iterable 阅读全文
posted @ 2018-07-31 13:50 下划线是我 阅读(167) 评论(0) 推荐(0)
摘要: 报错:E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpk 阅读全文
posted @ 2018-07-24 08:59 下划线是我 阅读(387) 评论(0) 推荐(0)
摘要: %s和%r的区别 __str__ 返回的%s: easy to read __repr__返回的%r: unambiguous: 获取对象各个属性的标准字符串表示形式 __str__ 返回的%s: easy to read __repr__返回的%r: unambiguous: 获取对象各个属性的标 阅读全文
posted @ 2018-07-22 11:09 下划线是我 阅读(164) 评论(0) 推荐(0)
摘要: 1.1 一摞python风格的纸牌 类的定义&双下划线特殊方法: 特殊方法的使用: 特殊方法是由Python解释器调用的, 自己并不需要调用他们。不存在my_object.__len__()这种写法,而应该使用(len(my_object))。如果my_object是一个自己定义的类对象, 那么py 阅读全文
posted @ 2018-07-22 11:05 下划线是我 阅读(302) 评论(0) 推荐(0)
摘要: Two client: Pub_1.py import paho.mqtt.client as mqtt import time import sys import random def on_connect(client, userdata, flags, rc): print("connecte 阅读全文
posted @ 2018-07-21 20:26 下划线是我 阅读(250) 评论(0) 推荐(0)
摘要: 借鉴的文献: https://blog.csdn.net/flyfish111222/article/details/51893096 https://blog.csdn.net/wangjia55/article/details/53160679 创建sudo用户 进入/退出 sudo 调整屏幕分 阅读全文
posted @ 2018-07-18 09:48 下划线是我 阅读(1402) 评论(0) 推荐(0)