
Python
Hi洛一
Talk is cheap.Show me the code
展开
-
python中的[:,-1]与[:,:,-1]
python切片转载 2022-10-24 10:57:27 · 1275 阅读 · 0 评论 -
自动训练Embedding词向量和手动训练Embedding词向量
训练词向量Embedding的两种方式原创 2022-07-08 11:26:40 · 809 阅读 · 0 评论 -
python列表,元组,字典集合对比
https://blog.youkuaiyun.com/Theahe/article/details/104042603传送门转载 2021-08-10 11:28:21 · 303 阅读 · 0 评论 -
python打印三角形详细分析后心得(为弄懂神经网络内层机制一点点积累)
打印5行5列*j=0while j<5: i = 0 while i < 5: print("*", end='') i += 1 j+=1 print()输出效果:打印5行三角形形状的*j=0while j<5:#决定行数 i = 0 while i <= j: print("*", end='') #第一行循环一次('*') i<=j 0<=0 内层原创 2021-08-07 17:01:35 · 1034 阅读 · 0 评论 -
python中的常用函数及用法
快捷键Markdown 图标 快捷键撤销 Ctrl /⌘+Z重做 Ctrl /⌘+Y加粗 Ctrl /⌘+B斜体 Ctrl /⌘+I标题 Ctrl /⌘+Shift +H有序列表 Ctrl /⌘+Shift +O无序列表 Ctrl /⌘+Shift +U待办列表 Ctrl /⌘+Shift +C插入代码 Ctrl /⌘+Shift +K插入链接 Ctrl /⌘+Shift +L插入图片 Ctrl /⌘+Shift +G查找 Ctrl /⌘+F替换 Ct原创 2021-08-04 17:29:31 · 2460 阅读 · 0 评论 -
Python自动化办公
https://tangxing.blog.youkuaiyun.com/article/details/106791043这个算是花钱交了智商税了 订阅了这个栏目 没帮上什么忙 公开出来看能帮到自动化办公的你们吧https://tangxing.blog.youkuaiyun.com/article/details/106791043转载 2021-06-23 11:22:00 · 164 阅读 · 1 评论 -
python实现局域网内传输文件
转发的这位朋友的博客:https://blog.youkuaiyun.com/sinat_31206523/article/details/89076964转载 2021-04-21 11:16:42 · 643 阅读 · 1 评论 -
用 Python 自动生成 Word 文档并在指定位置插入图片
用Python生成Word文档在指定位置插入图片首先当然需要第三方库啦(▽)天才第一步,第三方的库O(∩_∩)O哈哈~使用以下命令安装:pip install python-docx那么重点来了:使用该库的基本步骤为:1.建立一个文档对象2.设置文档的格式(默认字体,页面边距等)3.在文档对象中加入段落文本,表格,图像等,并指定其样式4.保存文档注:本库仅支持生成Word2007以后版本的文档类型,即扩展名为.docx(ps:我用的WPS和word2019亲测也是阔以滴)第一部分转载 2021-02-22 17:09:34 · 14140 阅读 · 0 评论 -
pycharm选的区域实现部分字符替换
参考文档:https://blog.youkuaiyun.com/weixin_43582372/article/details/107743115?utm_medium=distribute.pc_relevant.none-task-blog-baidujs_baidulandingword-7&spm=1001.2101.3001.4242第一步:Ctrl+r弹窗替换界面第二步:选择需要替换的区域第三步:或者:点击这个按钮实现替换替换后结果:...原创 2021-02-03 18:10:17 · 2076 阅读 · 1 评论 -
运用Python将图片写入到word中
Talk is cheap,show me the code!(我英语好我来翻译一哈o( ̄︶ ̄)o:不bb上代码!)from docx import Documentfrom docx.shared import Inchesfrom PIL import Imagestring = '文字内容'images = '0.jpg' # 保存在本地的图片doc = Document()doc.add_paragraph(string) # 添加文字try: doc.add_pi原创 2020-12-28 15:34:06 · 7363 阅读 · 3 评论 -
Could not find a version that satisfies the requirement PIL (from versions: ) No matching distributi
问题:用Python将图片写入word时报错Could not find a version that satisfies the requirement PIL (from versions: ) No matching distributi解决方案:参考这一篇博文https://blog.youkuaiyun.com/yushuangping/article/details/82963839注意:其中会遇到这样两个问题问题一:安装PIL麻烦需要去官网下载安装包问题一解决方案:可以安装Pil原创 2020-12-28 15:24:31 · 424 阅读 · 0 评论 -
python转义字符
Talking is cheap show me the ~picture~原创 2020-12-13 15:22:59 · 494 阅读 · 0 评论 -
利用python向word文档模板中写入内容
第一部分:先看成果Talk is cheap show me the code!(我来翻译一哈:不bb上代码)import osos.chdir('D:\\python_major\\auto_office14')import datetimefrom docx import Documentfrom docx.enum.text import WD_ALIGN_PARAGRAPHfrom docx.shared import Pt, RGBColorfrom docx.oxml.ns im原创 2020-12-10 17:53:24 · 4620 阅读 · 7 评论 -
反爬虫
爬虫的具体介绍就不说了,这里想对自己多年的爬虫中遇到的情况进行一个总结1.模拟浏览器2.Ip3.登录4.验证码5.各种信息加密6.请求频率1.模拟浏览器目前度娘一搜一大把,最集中的就是ua了,搭建一个随机ua池,不断的变化ua,很普遍的方法, 这里推荐一个大神写的开源库 fake-useragenthttps://github.com/hellysmile/...转载 2020-04-08 23:16:37 · 223 阅读 · 0 评论 -
python写入excel(xlswriter)--生成图表
一、折线图:# -*- coding:utf-8 -*-import xlsxwriter# 创建一个excelworkbook = xlsxwriter.Workbook("chart_line.xlsx")# 创建一个sheetworksheet = workbook.add_worksheet()# worksheet = workbook.add_worksheet(...转载 2020-02-10 11:29:33 · 984 阅读 · 0 评论