自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(20)
  • 资源 (11)
  • 收藏
  • 关注

原创 在迷宫环境中使用图像目标导向深度强化学习笔记(一)

新一年新收获,预祝大家2020年工作顺利,身体健康。此部分作为一个节点,下面大部分时间用于期末复习,打算考完试再继续这一块的工作。之前接触过一部分这方面知识,当时感觉用到的机会不是很大,所以就没好好学,真的后悔了,对莫烦博客经过一个星期左右的学习就仓促的下手实践,对于很专业的知识我也不是有太深的理解,如果有错误,望大家积极指正批评。进入正题:这里我打算复现一下李飞飞老师指导的一位博...

2019-12-31 20:30:57 716

原创 截取屏幕指定位置大小并把数据处理成np.arr类型数据

我这里使用的截图是莫烦DQN迷宫环境的图像如下:截图是一个动态环境,但是这里出现了一个尴尬的问题先附上一下代码:import timeimport numpy as npimport pandas as pdimport tensorflow as tfimport numpyfrom skimage import io, transform # skimage模块下的i...

2019-12-29 21:30:30 215

原创 深度强化学习之三维数据hstack()叠加以后进行取值分离

import timeimport numpy as npimport pandas as pdimport tensorflow as tfimport numpymon = np.zeros((2000, 100,300,3))memory = np.zeros((100,100,3))memory1 = np.zeros((100,100,3))memory1[0][0][...

2019-12-29 20:04:20 357 1

原创 ubuntu升级pip后, ImportError: cannot import name ‘main‘

原因是升级以后,路径变了,导致出错。提示报错的是/usr/bin/pip,用which pip获取到的路径是~/.local/bin/pip Traceback (most recent call last): File "/usr/bin/pip", line 9, in <module> from pip import main I...

2019-12-26 22:11:52 144

原创 aise ImportError(str(msg) + ', please install the python3-tk package') ImportError: No module named

1. 进入超级管理员权限sudo su2. 安装apt-get install python3-tk但是:可能遇到ubuntu提示E: 无法获得锁 /var/lib/dpkg/lock-frontend - open (11: 资源暂时不可用)解决办法:方法1:ps -e | grep apt 显示:11669 ? 00:00:02 ap...

2019-12-26 16:15:34 222

原创 sudo python下import caffe出错然而python下没有问题

打开命令行输入python导包import sys查看路径sys.path出现一串路径其中会出现一条这样的路径“/home/your name/caffe/python”第二:输入sudo python导包import sys查看路径sys.path出现一串路径并缺少上面关键一条路任意地方新建一个文件---lujing.pth打开文件,将缺少的路劲加进去...

2019-12-22 14:14:08 270

原创 安装TensorFlow时出现Cannot uninstall 'enum34'等问题

Cannot uninstall 'enum34'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.你需要卸载enum34输入以下命令即可:su...

2019-12-22 11:41:14 311

转载 基于ubuntu16.04安装python2 opencv与python3 opencv

Ubuntu 16.04: How to install OpenCVbyAdrian RosebrockonOctober 24, 2016inOpenCV,TutorialsOver the past two years running the PyImageSearch blog, I’ve authored two tutorials detailing the r...

2019-12-22 11:35:40 950

原创 smtp协议——邮件发送

根据自己使用的邮件服务器,完成smtp协议的服务开启 给特定邮箱发送图文并茂的邮件,邮件正文包含的表格如下所示,显示的图片自己确定。 给特定邮箱发送邮件,邮件附件为“实验报告7 smtp协议# -*- coding: utf-8 -*-"""Created on Wed Nov 6 15:57:44 2019@author: Administrator"""import ...

2019-12-21 20:41:19 1710

原创 http协议-数据提交

编写程序实现通过有道或百度翻译url对用户输入数据进行翻译: 进入有道翻译或者百度翻译页面,找出页面向服务器提交待翻译数据使用的url; 使用浏览器分析工具分析相关需要提交的数据字段以及值,主要包括:(1)待翻译词语或句子使用的字段数据;(2)待翻译数据使用的语言;(3)翻译结果使用的语言;(4)返回的翻译结果使用的数据类型;(5)其他需要的数据字段 获取使用requests库post方法提交数据...

2019-12-21 20:35:19 248

原创 http协议-数据请求

编写程序实现新闻网页数据的请求和获取数据的保存: 进入一个学校的新闻首页,分析各不同新闻网页url之间的区别和联系,并根据得到的规律通过程序生成所要请求的网页的url(前30个页面)。 使用requests库通过http协议的get方法向web server 请求30个页面的数据,要求:(1)30个请求分别由5个线程实现,每个线程负责6个url页面的请求;(2)每个线程中的不同页面请求的时间间隔是...

2019-12-21 20:32:08 333

原创 服务器架构

编写程序分别实现服务端和客户端要求功能 服务器能够使用TCP协议同时为多台客户端主机提供部分电影的演员信息查询服务(基于多线程或者异步通信): 服务端启动后,需先建立数据结构来存储从movieResult.csv文件中读入的电影数据,并建立socket对象监听客户端的TCP连接请求,如有请求便同意与客户端建立tcp连接 客户端运行时能够提示并接收用户输入的电影名称,并将电影名称数据传递给服务器(需...

2019-12-21 20:25:35 436

原创 网络数据与网络错误

服务器端和客户端IP:当前主机IP分析给定通信程序中的client端和server端代码,对出现的粘包问题进行简单描述并分析出现的原因设计一个方案解决通信中的粘包问题对client端和server端程序进行修改,并验证方案的正确性# -*- coding: utf-8 -*-"""Created on Sat Sep 28 15:03:38 2019@author: c...

2019-12-21 20:19:11 367

原创 文件传输

服务器端和客户端IP:当前主机IP(192.168.?.?)n服务器启动时默认端口为1060,当TCP连接建立后,等待接收客户端传输过来的sheet1.xlsx文件的数据内容,在服务器当前路径下建立sheet1.xlsx文件并写入接收到的文件内容,文件接收完成后在屏幕上输出”文件已接收完毕.”n客户端启动后使用TCP协议与服务端建立连接,连接建立后在屏幕上输出“与192.168.X.X主...

2019-12-21 12:50:49 277

原创 扫描主机端口状态

建立程序能够对本机的常用接口状态进行检测,并将扫描到的活动端口信息写入到scanResult.txt文件中常用的端口列表portLs=[21, 22, 23, 25, 80, 135, 137, 139, 445, 1433, 1502, 3306, 3389, 8080, 9015]# -*- coding: utf-8 -*-"""Created on Tue Aug 13 11...

2019-12-21 12:42:05 573

原创 UDP c/s结构通信

服务器端和客户端IP:当前主机IP(192.168.?.?) 服务器监听端口:服务器启动时默认侦听端口为1060,当客户端有udp数据传过来时,可以对数据进行解码(utf-8)并打印出客户端传输的字符串数据,同时给发送数据的客户端传输字符串数据“你好,我是服务器+(ip,port),有事情可以随时联系我!”客户端端口:系统随机选定(范围为10000-20000)。要求客户端启动后给服...

2019-12-21 12:38:03 464

原创 MFC文件载入失败

※尽量不适用中文,各种未知错误,嘿嘿此方法临时解决问题,可以使程序运行,后续是否还有错误是未知数需要修改3处位置:1.资源文件中.rc右键,点击“查看代码”,找到带中文的资源ID,把中文修改掉2.资源头文件中Resource.h找到带中文的资源ID,把中文修改掉3.DialogEx派生类的cpp文件中.cpp找到构造函数,将初始化列表中的中文改掉3处修改的...

2019-12-21 10:55:36 1114

原创 网络编程——基于TCP协议的远程图书查询和下载系统

目录结构:from tkinter import *import timeimport tkinterimport tkinter.messageboximport tkinter as tkimport datetimeimport socketfrom tkinter import filedialogADDR = ('127.0.0.1', 1060)sk =...

2019-12-20 23:20:58 268

原创 数据结构课程设计——鲁东大学

题目: 从下列6个题目中选择4个: (1)表达式求值问题:给定一个四则运算的中缀表达式、前缀表达式和后缀表达式,编程计算表达式的值。(2)看病排队候诊问题:根据病人的病情规定不同的优先级别。医生在诊断治疗时,选择优先级别高的病人进行诊治,如果遇到两个优先级别相同的病人,则选择优先来排队的病人进行诊治。 (3)计算哈夫曼树的WPL值:根据给定的n个权值(非负值...

2019-12-20 23:13:00 1482 1

原创 致命错误 RC1015: 无法打开包含文件 'afxres.h'.

最近做课程设计是出现了这个问题,以下提供解决方法确保自己的路径没有问题;如果路径没有问题的话,就是缺少文件链接:https://pan.baidu.com/s/19mZgcPiexREq1R72XnSVrA提取码:duai下载文件覆盖掉自己文件夹下边的文件,问题解决...

2019-12-20 20:52:17 323

时钟,指南针,水平仪表盘

时钟,指南针,水平仪表盘

2022-04-13

数据结构第一章重要代码.zip

顺序表的删除插入合并算法

2020-08-19

python实验报告7 smtp协议.zip

根据自己使用的邮件服务器,完成smtp协议的服务开启 给特定邮箱发送图文并茂的邮件,邮件正文包含的表格如下所示,显示的图片自己确定。 给特定邮箱发送邮件,邮件附件为“实验报告7 smtp协议

2019-12-21

python网络编程之http协议-数据提交

编写程序实现通过有道或百度翻译url对用户输入数据进行翻译: 进入有道翻译或者百度翻译页面,找出页面向服务器提交待翻译数据使用的url; 使用浏览器分析工具分析相关需要提交的数据字段以及值,主要包括:(1)待翻译词语或句子使用的字段数据;(2)待翻译数据使用的语言;(3)翻译结果使用的语言;(4)返回的翻译结果使用的数据类型;(5)其他需要的数据字段 获取使用requests库post方法提交数据所需其他数据,如headers中使用的数据信息(如User-Agent,cookies等) 实现完整的程序,并运行程序,对输入的待翻译的内容的返回结果进行验证;如果出现返回为空值等问题,请对可能的原因进行分析,并给出可行的解决方案。

2019-12-21

python网络编程之http协议-数据请求

编写程序实现新闻网页数据的请求和获取数据的保存: 进入一个学校的新闻首页,分析各不同新闻网页url之间的区别和联系,并根据得到的规律通过程序生成所要请求的网页的url(前30个页面)。 使用requests库通过http协议的get方法向web server 请求30个页面的数据,要求:(1)30个请求分别由5个线程实现,每个线程负责6个url页面的请求;(2)每个线程中的不同页面请求的时间间隔是3秒;(3)当线程中成功获取某一个新闻网页数据后,需要在屏幕上输出相应的状态信息(如。。。网页请求成功) 对于每个获取的网页数据,分别将其写入到本地相应的html文件中,要求本地网页数据文件的文件名为pageXXX(XXX为请求页面的编号) 对生成的文件进行验证,如果出现中文乱码的问题,请对可能的原因进行分析,并给出可行的解决方案。

2019-12-21

python网络编程之服务器架构

编写程序分别实现服务端和客户端要求功能 服务器能够使用TCP协议同时为多台客户端主机提供部分电影的演员信息查询服务(基于多线程或者异步通信): 服务端启动后,需先建立数据结构来存储从movieResult.csv文件中读入的电影数据,并建立socket对象监听客户端的TCP连接请求,如有请求便同意与客户端建立tcp连接 客户端运行时能够提示并接收用户输入的电影名称,并将电影名称数据传递给服务器(需与服务器建立tcp连接) 服务器接收到客户端传递的电影名称后,查询读入的电影数据,如果没有该电影的演员信息则返回没有该电影数据!,如果有该电影的演员信息则返回该电影的主演信息 客户端接收到返回的查询结果后在屏幕上输出相应的结果 服务器为同一客户端提供连续查询服务的时间间隔为5秒

2019-12-21

python网络编程之网络数据与网络错误

服务器端和客户端IP:当前主机IP 分析给定通信程序中的client端和server端代码,对出现的粘包问题进行简单描述并分析出现的原因 设计一个方案解决通信中的粘包问题 对client端和server端程序进行修改,并验证方案的正确性

2019-12-21

UDP c/s结构通信 扫描主机端口状态

UDP c/s结构通信 服务器端和客户端IP:当前主机IP(192.168.?.?) 服务器监听端口:服务器启动时默认侦听端口为1060,当客户端有udp数据传过来时,可以对数据进行解码(utf-8)并打印出客户端传输的字符串数据,同时给发送数据的客户端传输字符串数据“你好,我是服务器+(ip,port),有事情可以随时联系我!” 客户端端口:系统随机选定(范围为10000-20000)。 要求客户端启动后给服务器发送一个字符串数据“服务器你好,我是客户端+(ip,port)”,发送完数据后客户端便处于等待服务器端使用udp协议回复信息状态,接收到回复信息后,在屏幕上输出解码后的数据。 扫描主机端口状态 建立程序能够对本机的常用接口状态进行检测,并将扫描到的活动端口信息写入到scanResult.txt文件中 常用的端口列表portLs=[21, 22, 23, 25, 80, 135, 137, 139, 445, 1433, 1502, 3306, 3389, 8080, 9015]

2019-12-21

Library.zip

以下提供数据库建立文件 /* Navicat MySQL Data Transfer Source Server : localhost_3306 Source Server Version : 80013 Source Host : localhost:3306 Source Database : db_books Target Server Type : MYSQL Target Server Version : 80013 File Encoding : 65001 Date: 2018-12-21 12:55:28 */ SET FOREIGN_KEY_CHECKS=0; -- ---------------------------- -- Table structure for tb_books- -- ---------------------------- DROP TABLE IF EXISTS `tb_books`; CREATE TABLE `tb_books` ( `ID` int(255) unsigned NOT NULL AUTO_INCREMENT, `ISBN` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL, `book_name` varchar(255) DEFAULT NULL, `book_price` decimal(10,2) DEFAULT NULL, `book_author` varchar(255) DEFAULT NULL, `published_house` varchar(255) DEFAULT NULL, `book_category` varchar(255) DEFAULT NULL, `borrower_name` varchar(255) DEFAULT NULL, `borrower_phone` varchar(255) DEFAULT NULL, PRIMARY KEY (`ID`) ) ENGINE=InnoDB AUTO_INCREMENT=33 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci; -- ---------------------------- -- Records of tb_books -- ---------------------------- INSERT INTO `tb_books` VALUES ('1', '978-7-100-10618-4', 'Othello', '56.00', 'W. William Shakespeare', 'Shanghai World Book Publishing Company', 'G792', 'Mark', '13503383632'); INSERT INTO `tb_books` VALUES ('2', '978-7-111-29544-0', 'BBC Doctor Who: 12 Doctors, 12 Stories ,12 Postcards', '69.00', ' BBC', ' BBC', 'TP312', 'Mark', '13503383632'); INSERT INTO `tb_books` VALUES ('3', '978-7-115-21687-8', 'The Poetry of Pablo Neruda', '59.00', 'Pablo Neruda,Ilan Stavans,Firuz Kazemzadeh', ' FSG BOOKS', 'TP311.5', null, null); INSERT INTO `tb_books` VALUES ('5', '978-7-300-11134-6', 'Cereal City Guide PARIS CITY GUIDE', '59.00', 'Rich Stapleton', ' Cereal Magazine', 'F830', null, null); INSERT INTO `tb_books` VALUES ('6', '978-7-302-23755-6', 'Cereal City Guide Copenhagen CITY GUIDE', '36.00', ' Rich Stapleton', ' Cereal Magazine', 'TP312', null, null); INSERT INTO `tb_books` VALUES ('7', '978-7-302-27544-2', 'George W. Bush And the Southern Takeover of American Politics', '29.00', 'Michael Lind', 'New America Books', 'TP312', null, null); INSERT INTO `tb_books` VALUES ('8', '978-7-302-29391-0', 'How Liberals Hurt Those They Claim to Help', '34.50', 'Mona Charen', ' Sentinel', 'TP393.0', 'Mark', '13503383632'); INSERT INTO `tb_books` VALUES ('9', '978-7-5117-0157-2', 'Lincoln in the Bardo', '16.00', 'George Saunders', 'Bloomsbury Publishing PLC','I', null, null); INSERT INTO `tb_books` VALUES ('10', '978-7-5327-5110-5', 'A Song of Ice and Fire Box Set', '58.00', 'George R. R. Martin',' HarperCollins UK','I', null, null); INSERT INTO `tb_books` VALUES ('11', '978-7-5399-3321-4', 'The New World Champion Paper Airplane Book','28.50', 'John M. Collins',' Ten Speed Press', 'I207.23', null, null); INSERT INTO `tb_books` VALUES ('23', '978-7-5399-5488-2', 'Introduction to Linear Algebra', '34.00', 'Gilbert Strang', ' Wellesley College', 'I', null, null); -- ---------------------------- -- Table structure for tb_user -- ---------------------------- DROP TABLE IF EXISTS `tb_user`; CREATE TABLE `tb_user` ( `id` int(255) unsigned NOT NULL AUTO_INCREMENT, `user` varchar(255) DEFAULT NULL, `passwd` varchar(255) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci; -- ---------------------------- -- Records of tb_user -- ---------------------------- INSERT INTO `tb_user` VALUES ('1', 'root', 'root');

2019-12-20

cp201x资源启动程序

Install driver for USB-UART bridge converter on Linux Ubuntu12.04 Ubuntu下USB转串口芯片驱动程序安装,支持cp210x,pl2303等 Reference: Fixing the cp210x open - Unable to enable UART Error When you plugin your USB-UART converter, and run "> ls /dev/tty*", if you don't see the /dev/ttyUSB0 (or similar), your Linux does not detect your USB-UART device. We need to install the driver for your device. Here we use Ubuntu12.04, and Updated the source to 3.2.0 version. If there is difference about version Number from your OS platform, please try to modify it into yours. 1.Download the Linux Source Code Open a terminal and execute the following commands. Note that your version of Linux may differ slightly -- adjust accordingly. $ cd ~ $ sudo apt-get install build-essential linux-source $ cp /usr/src/linux-source-3.2.0.tar.bz2 . $ bunzip2 linux-source-3.2.0.tar.bz2 $ tar xf linux-source-3.2.0.tar $ cd ~/linux-source-3.2.0 2.Recompile and Reinstall the cp210x Driver From within a terminal, execute: $ cd ~/linux-source-3.2.0 $ make oldconfig $ make prepare $ make scripts $ cp /usr/src/linux-headers-3.2.0-34-generic-pae/Module.symvers . Here, I have the "3.2.0-29" version also, I launched the command above, but not the below: "cp /usr/src/linux-headers-3.2.0-29-generic-pae/Module.symvers ." Recompile and Reinstall the cp210x Driver Here, We can actually install many kinds of USB-UART converter drivers. We take cp210x as the example. From within a terminal, execute: $ make M=drivers/usb/serial $ sudo mv /lib/modules/$(uname -r)/kernel/drivers/usb/serial/cp210x.ko /lib/modules/$(uname -r)/kernel/drivers/usb/serial/cp210x.ko.old $ sudo cp drivers/usb/serial/cp210x.ko /lib/modules/$(uname -r)/kernel/drivers/usb/serial/ $ sudo modprobe -r cp210x $ sudo modprobe cp210x Reboot Linux system. Run Terminal: $ ls /dev/tty* The we can see the device is detected by Linux Host OS: 【技术】Ubuntu下USB转串口芯片驱动程序安装cp210x,pl2303 Reference: http://pharos.ece.utexas.edu/wiki/index.php/Fixing_the_cp210x_open_-_Unable_to_enable_UART_Error_-_04/17/2011 Then, We can configure the minicom to communicate with our target board. ====================================================== Here is an example of configure the parameters of minicom for TLL6527M PAL board: I just copied it here hardly without any font editing. Sorry about that. Serial Communications from Host-PC to TLL6527M Target Hardware The TLL System Design Environment (SDE) running on the host PC comes pre-configured with the required settings for serial-UART communications between the host PC and the TLL6527M base module. Generally, for use with TLL6527M the settings need not to be changed (Note: From the SDE OS version 0.3.2, the serial terminal program Minicom is set to open /dev/ttyUSB0 with the needed configuration as mentioned above.). To start serial communication from host to the TLL6527M, open the serial communication terminal program Minicom. Just open a terminal window on your Linux SDE running on the host PC and type the command "minicom" at the command prompt on your host PC terminal console. The TLL6527M on power-up is set by default to the following serial-UART communication settings: Bits per second = 115200 Data bits = 8 Parity = None Stop Bits = 1 Flow control = None Make sure that the TLL6527M's USB-UART port has been mapped to a ttyUSBx device node in the /dev folder on the host PC SDE. See following example: 【技术】Ubuntu下USB转串口芯片驱动程序安装cp210x,pl2303 Now make sure that this "ttyUSBx" is set as the destination port, baud rate is 115200, and 8N1 mode for minicom, by running the command 'minicom -s'. Note that running the "minicom -s" command as a normal user will only apply the settings for the current session. In order to make the settings permanent, these commands need to be run with root privileges.See example below: 【技术】Ubuntu下USB转串口芯片驱动程序安装cp210x,pl2303 The following window will appear on your host PC terminal window: 【技术】Ubuntu下USB转串口芯片驱动程序安装cp210x,pl2303 Go to ‘Serial port setup’, following screen will appear, make sure that serial device is set to ‘/dev/ttyUSB0’ and bps/par/bits is set to 115200 8N1: 【技术】Ubuntu下USB转串口芯片驱动程序安装cp210x,pl2303 Now go back to the main menu and choose ‘save setup as dfl’. This will save the configuration settings and from next time onwards user can directly run ‘minicom’ command without the option ‘–s’ and it will load settings from the saved file. 【技术】Ubuntu下USB转串口芯片驱动程序安装cp210x,pl2303 RESET the target by using the SDE's TLL6527M reset utility or by pressing the RESET button on the target. Following messages will be displayed on the terminal. By default, U-Boot is setup to automatically start booting the OS after waiting for a few seconds for the user to interrupt the automatic launch by pressing any key. So to stop U-Boot from loading uClinux and provide U-Boot command prompt, just hit any key. (This is assuming TLL6527M is flashed with u-boot and uClinux. TLL6527Ms are pre-flashed with firmware before shipping).

2018-05-20

c++学习

C++学习 实验题目

2018-05-20

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除