python
迈际
这个作者很懒,什么都没留下…
展开
-
leetcode1. Two Sum
1.Two Sum Easy 20038704Add to ListShare Given an array of integersnumsand an integertarget, returnindices of the two numbers such that they add up totarget. You may assume that each input would haveexactlyone solution, and you may not use thes...原创 2021-03-29 20:09:34 · 76 阅读 · 0 评论 -
批量转换office 的docx文件为pdf文件
批量转换office 的docx文件为pdf文件 虽然wps office等软件都集成了一建转换的功能,但是有时我们需要的不仅仅是一个文档的转换, 而是一批文档的转换,这样就可以用这个代码了.代码是在ubuntu下运行的.废话不多说,直接上代码,其中部分代码借鉴了https://blog.csdn.net/qq_44920726/article/details/104652145 特别感谢 需要给定参数原文件的目录名称和保存pdf文件的目录名称 import re import os imp.原创 2021-03-15 11:23:56 · 316 阅读 · 0 评论 -
python sys.argv[]的用法解释
详见:https://www.cnblogs.com/aland-1415/p/6613449.htmlsys.argv[]其实就是个列表,列表的项为用户输入的参数,且这些参数是用户从外部输入的。其中sys.argv[0]项为文件名,例如"sys.py"...转载 2018-06-28 14:25:01 · 526 阅读 · 0 评论 -
python split(",") 解释
描述:python split()通过指定的分隔符对字符串进行切片,若参数num 有指定值,则仅分隔num个子字符串语法:str.split(str="",num=string.count(str))参数:str -- 分隔符,默认为所有的空字符,包括空格、换行(\n)、制表符(\t)等num -- 分割次数返回值:返回分割后的字符串列表注:这个只是个人学习笔记摘抄,内容来自:http://www...转载 2018-06-28 19:45:46 · 374 阅读 · 0 评论 -
np.maximum vs np.minimum
一直按照字面意思理解,以为maxmum取最大值 examples,原来是有广播机制的. np.maximum()取对应位置上的大值,np.minimum 取对应位置上的较小值. import numpy as np >>> np.maximum([1,2,3,4,5],2) array([2, 2, 3, 4, 5]) >>> np.minimum([2,...原创 2019-06-27 11:21:47 · 10122 阅读 · 1 评论