码迷,mamicode.com
首页 >  
搜索关键字:decode    ( 2985个结果
python-Arduino串口传输数据到电脑并保存至excel表格
起因:学校运河杯报了个项目,制作一个天气预测的装置。我用arduino跑了BME280模块,用蓝牙模块实现两块arduino主从机透传。但是为了分析,还需要提取出数据。因此我用python写了个上位机程序,用pyserial模块实现arduiho和电脑的串口通讯,再用xlwt模块写入excel表格, ...
分类:编程语言   时间:2019-10-14 14:35:05    阅读次数:99
爬虫页面
9.31 爬取百度 import urllib.request response=urllib.request.urlopen('http://www.baidu.com')print(response.read().decode('utf-8')) 爬取 10.1 10.2 Python 爬虫架构 ...
分类:其他好文   时间:2019-10-12 20:24:21    阅读次数:146
php数组转json中文乱码解决办法
为数组里的每个元素进行urlencode() 转码 后再用json_encode() 转为json即可, 解码使用json_decode() 示例: foreach ( $result as $keys => $value ) //包含中文的二维数组$result转json,数组内部元素一一使用ur ...
分类:编程语言   时间:2019-10-11 18:03:13    阅读次数:99
处理 Unicode转汉字编码问题
第一种a=b'\u6279\u53d1\u548c\u96f6\u552e\u4e1a'print(a.decode('unicode_escape'))第二种(建议用)a="u'"+'\\u6279\\u53d1\\u548c\\u96f6\\u552e\\u4e1a'+"'"print(eval ...
分类:其他好文   时间:2019-10-11 14:05:28    阅读次数:87
文件处理
打开文件的方式 方式一: 方式二: 打开文件的模式 操作文件的方式 文件的光标问题 修改文件的方式 二进制方式操作文件 读出二进制文件的方法: with open('aa','rb') as f: print(f.read()) f.seek(0) print(f.read().decode('gb ...
分类:其他好文   时间:2019-10-10 15:30:52    阅读次数:72
cpu相关信息查看
查看CPU型号:grep "model name" /proc/cpuinfo | uniqdmidecode -s processor-version | uniq 查看物理CPU个数grep "physical id" /proc/cpuinfo | sort -u | wc -lgrep "p ...
分类:其他好文   时间:2019-10-09 15:17:54    阅读次数:106
requests的基本使用
1. requests相对比urllib优点requests的底层实现就是urllibrequests在python2 和python3中通用,方法完全一样requests简单易用Requests能够自动帮助我们解压(gzip压缩的等)网页内容2.requests的作用作用:发送网络请求,返回响应数 ...
分类:其他好文   时间:2019-10-09 12:05:36    阅读次数:118
微信小程序跳转页面时参数过长导致参数丢失
问题描述: 微信小程序:跳转页面时传参,参数过长导致参数丢失 跳转到文章详情页时,使用的文章链接 过长导致参数丢失 解决方案: 调用微信的API,将参数编码传送,解码接收,即可。 完整的写法如下: 这样就解决问题了。 ...
分类:微信   时间:2019-10-08 14:38:55    阅读次数:523
1153.Decode Registration Card of PAT(unordered_map)
A registration card number of PAT consists of 4 parts: the 1st letter represents the test level, namely, T for the top level, A for advance and B for ...
分类:其他好文   时间:2019-10-07 23:41:01    阅读次数:141
(转) UnicodeDecodeError: 'ascii' codec can't decode byte 0xe5 in position 4: ordinal not in range(128)
我用的方法: UnicodeDecodeError: 'ascii' codec can't decode byte 0xe5 in position 4: ordinal not in range(128) 如果出现编码问题:类似错误如下UnicodeDecodeError: 'ascii' co ...
分类:其他好文   时间:2019-10-05 20:42:45    阅读次数:71
2985条   上一页 1 ... 38 39 40 41 42 ... 299 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!