![](https://img-blog.csdnimg.cn/20201014180756926.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python
文章平均质量分 71
自我拯救的朔哥哥
区块链技术爱好者
展开
-
python脚本实现rikirobot追寻红线功能,并实时保存数据的代码
import paramikoimport timefrom threading import Threaddef ssh1(): sum = 1 sshClient = paramiko.SSHClient() sshClient.set_missing_host_key_policy(paramiko.AutoAddPolicy()) sshClient.connect(hostname = "192.168.123.213", port = 22, user原创 2020-11-19 11:01:44 · 243 阅读 · 0 评论 -
rikirobot一个python文件实现小车跟随功能,并实时保存信息
import paramikoimport timefrom threading import Thread#这是跟随人模式def ssh1():sum = 1sshClient = paramiko.SSHClient()sshClient.set_missing_host_key_policy(paramiko.AutoAddPolicy())sshClient.connect(hostname = “192.168.123.213”, port = 22, username = “fi原创 2020-11-19 10:59:10 · 309 阅读 · 1 评论 -
使用清华源镜像安装TensorFlow(换版本的话把后面的2.0.0换掉就可以)
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple tensorflow==2.0.0-rc # 使用清华园镜像 飞快!pip install -i https://pypi.douban.com/simple tensorflow==2.0.0-rc #使用豆瓣镜像安装...原创 2020-04-17 23:12:50 · 3850 阅读 · 1 评论 -
安装pytorch(一次点亮)
在Anaconda prompt中输入命令行:第一步: conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/第二步:conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/第三步:conda config --set show_channel_urls yes第四步原创 2020-09-16 19:52:39 · 99 阅读 · 0 评论 -
python,pip配置镜像源(方便以后装别的库)
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple永久配置镜像源,以后比如说你想装一个模块TensorFlowpip install tensorflow就直接在镜像源中下载了,下载速度很快。原创 2020-09-11 13:51:13 · 129 阅读 · 0 评论 -
RNN循环神经网络与LSTM长短期人工神经网络
这是最基础的多输入单输出的Rnn吧。比如讲了一段话,然后发现重点。Rnn中最明显的缺点就是共享了一组U,W,b,都是不变的,看这个输出y和hi,其中这个图中hi就是h1,h2,h3,还可以发现h2依赖于h1的结果,h3依赖于h2的结果,等等。Rnn可以是多个并且有序,比如像人物说话,或者做事一样,都是有时间序列的,就可以模仿真实人物一样,一个接着一个。而不是比如单纯的线性预测一样,给定一个文档数据,直接用梯度下降拟合就可以了。Rnn是有时间控制的,相当于一个记忆能力,因为比如说你这个话就连接着下一句话.原创 2020-07-17 17:13:11 · 511 阅读 · 0 评论 -
基于Tensorflow基础的线性回归代码
# --*coding -- :utf-8import tensorflow.compat.v1 as tftf.disable_v2_behavior()import osos.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'import numpyimport matplotlib.pyplot as pltrng = numpy.random#设定参数learning_rate=0.01 #学习率training_epochs=1000#训练数量dis原创 2020-06-25 16:40:37 · 146 阅读 · 0 评论 -
朴素贝叶斯思想的拼写检查器
#encoding=utf-8import re,collections#把语料中的单词都抽取出来,变成小写a-z,去掉特殊符号def words(text): return re.findall('[a-z]+',text.lower())def train(features): model=collections.defaultdict(lambda: 1) for f in features: model[f] += 1 return m原创 2020-06-25 16:37:19 · 155 阅读 · 0 评论 -
python安装dlib库(超级方便)
打开Anaconda Prompt,先安装cmake输入命令:pip install cmake再安装Boost输入命令:pip install Boost下载VS2017或者VS2019,百度去官网下载最后输入命令:pip install -i https://pypi.tuna.tsinghua.edu.cn/simple dlib完事了!...原创 2020-05-25 17:58:39 · 820 阅读 · 0 评论 -
用python调用url存储网络图片
def getjpg(url): try: path='D://软件/code.jpg' r=requests.get(url) print(r.status_code) with open(path,'wb') as f: f.write(r.content) f.close(...原创 2020-04-21 21:01:05 · 622 阅读 · 0 评论