• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
奚政
博客园 | 首页 | 新随笔 | 新文章 | 联系 | 订阅 订阅 | 管理

2017年3月21日

python筛选特定文件的信息按照格式输出到txt
摘要: 最近搞数据库,为了把图片文件的信息导入数据库表中,我开始研究python列出图片文件,其中发现因为IE临时文件里有非常多的不需要的图片,就需要筛选掉一些文件。 最终用python输出了所有需要的图片文件的路径、文件名、时间到一个txt 阅读全文
posted @ 2017-03-21 23:09 奚政 阅读(4001) 评论(0) 推荐(0)
 
python time模块使用笔记(更新)
摘要: 添加time模块 关于时间和时间戳: 时间是指日常生活中用的,如某年某月某日 时间戳是一个时间长度,是时间关于一个初始时间(好像是1970.1.1)的秒数 localtime方法: time.localtime( timeStamp ) timeStamp是一个浮点数形式的时间戳 生成一个时间元组 阅读全文
posted @ 2017-03-21 22:37 奚政 阅读(388) 评论(0) 推荐(0)
 
使用python查询某目录下所有‘jpg’结尾的图片文件
摘要: 调用os模块,先建立一个对目标目录的walk迭代器。 然后再对迭代器进行遍历,判断每个文件是否以'jpg'结尾。 若是,则输出。 阅读全文
posted @ 2017-03-21 03:06 奚政 阅读(11824) 评论(0) 推荐(0)
 
python str使用笔记(更新)
摘要: 判断字符串是否以某个串为结尾: str.endswith(strtmp) 返回True/False 检查某字符串是否为另一字符串的子串: str.find(strtmp)方法 返回首次出现的下标位置,不存在则返回-1 in使用 strtmp in str 返回True/False 阅读全文
posted @ 2017-03-21 03:03 奚政 阅读(250) 评论(0) 推荐(0)
 
python os模块使用笔记(更新)
摘要: 添加os模块 walk方法: os.walk(path) path是string形式的目标目录 生成一个某目录下递归树形目录迭代器,方便递归访问子目录,访问目录就能够轻松访问子文件。 该迭代器是一个三元组迭代器: dirpath是目录的路径,dirnames是该目录下的子目录的列表,filename 阅读全文
posted @ 2017-03-21 02:56 奚政 阅读(186) 评论(0) 推荐(0)
 
hdu3974 Assign the task dfs序+线段树
摘要: There is a company that has N employees(numbered from 1 to N),every employee in the company has a immediate boss (except for the leader of whole compa 阅读全文
posted @ 2017-03-21 02:19 奚政 阅读(335) 评论(0) 推荐(0)
 
hdu3746 Cyclic Nacklace KMP
摘要: CC always becomes very depressed at the end of this month, he has checked his credit card yesterday, without any surprise, there are only 99.9 yuan le 阅读全文
posted @ 2017-03-21 02:12 奚政 阅读(145) 评论(0) 推荐(0)
 
hdu3642 Get The Treasury 线段树--扫描线
摘要: Jack knows that there is a great underground treasury in a secret region. And he has a special device that can be used to detect treasury under the su 阅读全文
posted @ 2017-03-21 02:07 奚政 阅读(250) 评论(0) 推荐(0)
 
hdu3613 Best Reward manacher+贪心+前缀和
摘要: After an uphill battle, General Li won a great victory. Now the head of state decide to reward him with honor and treasures for his great exploit. One 阅读全文
posted @ 2017-03-21 02:04 奚政 阅读(678) 评论(0) 推荐(0)
 
hdu3605 Escape 二分图多重匹配/最大流
摘要: 2012 If this is the end of the world how to do? I do not know how. But now scientists have found that some stars, who can live, but some people do not 阅读全文
posted @ 2017-03-21 01:54 奚政 阅读(438) 评论(0) 推荐(0)
 
hdu3488 Tour 拆点+二分图最佳匹配
摘要: In the kingdom of Henryy, there are N (2 <= N <= 200) cities, with M (M <= 30000) one-way roads connecting them. You are lucky enough to have a chance 阅读全文
posted @ 2017-03-21 01:43 奚政 阅读(239) 评论(0) 推荐(0)
 
hdu3374 String Problem KMP+最大最小表示法
摘要: Give you a string with length N, you can generate N strings by left shifts. For example let consider the string “SKYLONG”, we can generate seven strin 阅读全文
posted @ 2017-03-21 01:40 奚政 阅读(193) 评论(0) 推荐(0)
 
hdu3338 Kakuro Extension 最大流
摘要: If you solved problem like this, forget it.Because you need to use a completely different algorithm to solve the following one.Kakuro puzzle is played 阅读全文
posted @ 2017-03-21 01:31 奚政 阅读(265) 评论(0) 推荐(0)
 
hdu3336 Count the string 扩展KMP
摘要: It is well known that AekdyCoin is good at string problems as well as number theory problems. When given a string s, we can write down all the non-emp 阅读全文
posted @ 2017-03-21 01:27 奚政 阅读(218) 评论(0) 推荐(0)
 
hdu3294 Girls' research manacher
摘要: One day, sailormoon girls are so delighted that they intend to research about palindromic strings. Operation contains two steps:First step: girls will 阅读全文
posted @ 2017-03-21 01:23 奚政 阅读(169) 评论(0) 推荐(0)
 
hdu3068 最长回文 manacher
摘要: 给出一个只由小写英文字符a,b,c...y,z组成的字符串S,求S中最长回文串的长度.回文就是正反读都是一样的字符串,如aba, abba等 manacher裸题 1 #include<stdio.h> 2 #include<string.h> 3 #include<algorithm> 4 usi 阅读全文
posted @ 2017-03-21 01:19 奚政 阅读(104) 评论(0) 推荐(0)
 
hdu2886 Lou 1 Zhuang 数学/快速幂
摘要: All members of Hulafly love playing the famous network game called 'Lou 1 Zhuang' so much that Super Da Lord got mad with them. So he thought over and 阅读全文
posted @ 2017-03-21 01:16 奚政 阅读(226) 评论(0) 推荐(0)
 
hdu2841 Visible Trees 容斥原理
摘要: There are many trees forming a m * n grid, the grid starts from (1,1). Farmer Sherlock is standing at (0,0) point. He wonders how many trees he can se 阅读全文
posted @ 2017-03-21 01:05 奚政 阅读(158) 评论(0) 推荐(0)
 
hdu2819 Swap 二分图匹配
摘要: Given an N*N matrix with each entry equal to 0 or 1. You can swap any two rows or any two columns. Can you find a way to make all the diagonal entries 阅读全文
posted @ 2017-03-21 01:03 奚政 阅读(296) 评论(0) 推荐(0)
 
hdu2732 Leapin' Lizards 最大流+拆点
摘要: Your platoon of wandering lizards has entered a strange room in the labyrinth you are exploring. As you are looking around for hidden treasures, one o 阅读全文
posted @ 2017-03-21 00:56 奚政 阅读(183) 评论(0) 推荐(0)
 
 

公告


博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3