Skip to content
  • About Me

charlie笔记

A programmer’s note boke for work and life

分类:Python

python笔记,python案例,python学习

python实现随机密码字典生成器示例

12 9月10 11月 by helenadmin

本来想穷举所有密码,算法要么就嵌套太深,要么就特别耗内存(会溢出).后来选了一个简单重复概率很低的算法.代码如 […]

Continue reading
Posted in Python · Leave a comment

python将字符串转换成字典dict

12 9月10 11月 by helenadmin

代码如下: json到字典转化:dictinfo = simplejson.loads(json_str) 输 […]

Continue reading
Posted in Python · Leave a comment

python从ftp下载数据保存实例

12 9月10 11月 by helenadmin

《hadoop权威指南》的天气数据可以在ftp://ftp3.ncdc.noaa.gov/pub/data/n […]

Continue reading
Posted in Python · Leave a comment

python高并发异步服务器核心库forkcore使用方法

12 9月10 11月 by helenadmin

1 拷贝下面的代码到一个文件,并命名为forkcore.py 代码如下: import osimport th […]

Continue reading
Posted in Python · Leave a comment

树莓派中python获取gy

12 9月10 11月 by helenadmin

先看效果图

Continue reading
Posted in Python · Leave a comment

python模拟新浪微博登陆功能(新浪微博爬虫)

12 9月10 11月 by helenadmin

1、主函数(weibomain.py): 代码如下: import urllib2import cookiel […]

Continue reading
Posted in Python · Leave a comment

python中for循环详解

12 9月10 11月 by helenadmin

与其它大多数语言一样,python 也拥有 for 循环。你到现在还未曾看到它们的唯一原因就是,python […]

Continue reading
Posted in Python · Leave a comment

python基础教程之实现石头剪刀布游戏示例

12 9月10 11月 by helenadmin

下面是规则.你和你的对手,在同一时间做出特定的手势,必须是下面一种手势:石头,剪子,布.胜利者从下面的规则中产 […]

Continue reading
Posted in Python · Leave a comment

python定时器使用示例分享

12 9月10 11月 by helenadmin

代码如下: class sltimer(multiprocessing.process): #from dat […]

Continue reading
Posted in Python · Leave a comment

python抓取网页中的图片示例

12 9月10 11月 by helenadmin

代码如下: #coding:utf8import reimport urllibdef gethtml(url […]

Continue reading
Posted in Python · Leave a comment

python实现保存网页到本地示例

12 9月10 11月 by helenadmin

学习python示例:实现保存网页到本地 代码如下: #coding=utf-8__auther__ = &# […]

Continue reading
Posted in Python · Leave a comment

python读取html中指定元素生成excle文件示例

12 9月10 11月 by helenadmin

python2.7编写的读取html中指定元素,并生成excle文件 代码如下: #coding=gbkimp […]

Continue reading
Posted in Python · Leave a comment

python删除指定目录下过期文件的2个脚本分享

12 9月10 11月 by helenadmin

脚本1: 这两天用python写了一个删除指定目录下过期时间的脚本。也可能是我初学python,对python […]

Continue reading
Posted in Python · Leave a comment

python实现的一只从百度开始不断搜索的小爬虫

12 9月10 11月 by helenadmin

文中用到了beautifulsoup这个库, 目的是处理html文档分析的, 因为我只是提取了title的关键 […]

Continue reading
Posted in Python · Leave a comment

教你安装pythondjango(图文)

12 9月10 11月 by helenadmin

安装环境:python版本2.7.5 ,win7系统安装djangohttps://www.djangopro […]

Continue reading
Posted in Python · Leave a comment

python翻译软件实现代码(使用googleapi完成)

12 9月10 11月 by helenadmin

代码如下: # -*- coding: utf-8 -*- import httplibfrom urllib […]

Continue reading
Posted in Python · Leave a comment

python使用xmlrpc实例讲解

12 9月10 11月 by helenadmin

rpc是remote procedure call的缩写,翻译成中文就是远程方法调用,是一种在本地的机器上调用 […]

Continue reading
Posted in Python · Leave a comment

python正则匹配查询港澳通行证办理进度示例分享

12 9月10 11月 by helenadmin

代码如下: import socketimport re ”’广东省公安厅出入境政务服 […]

Continue reading
Posted in Python · Leave a comment

python的urllib模块显示下载进度示例

12 9月10 11月 by helenadmin

代码如下: def report_hook(count, block_size, total_size):&# […]

Continue reading
Posted in Python · Leave a comment

python网络爬虫采集联想词示例

12 9月10 11月 by helenadmin

python爬虫_采集联想词代码 代码如下: #coding:utf-8import urllib2impor […]

Continue reading
Posted in Python · Leave a comment

python动态监控日志内容的示例

12 9月10 11月 by helenadmin

日志文件一般是按天产生,则通过在程序中判断文件的产生日期与当前时间,更换监控的日志文件程序只是简单的示例一下, […]

Continue reading
Posted in Python · Leave a comment

python连接mysql调用存储过程示例

12 9月10 11月 by helenadmin

代码如下: #!/usr/bin/env python# -*- coding: utf8 -*-import […]

Continue reading
Posted in Python · Leave a comment

python基础教程之元组操作使用详解

12 9月10 11月 by helenadmin

简介 tuple 1.元组是以圆括号“()”包围的数据集合,不同成员以“,”分隔。通过下标进行访问 2.不可变 […]

Continue reading
Posted in Python · Leave a comment

python爬虫框架scrapy安装使用步骤

12 9月10 11月 by helenadmin

一、爬虫框架scarpy简介scrapy 是一个快速的高层次的屏幕抓取和网页爬虫框架,爬取网站,从网站页面得到 […]

Continue reading
Posted in Python · Leave a comment

python和php通信乱码问题解决方法

12 9月10 11月 by helenadmin

即使在urlencode之前str.decode(“cp936″).encode(“utf-8″)做了编码转换 […]

Continue reading
Posted in Python · Leave a comment

python代理抓取并验证使用多线程实现

12 9月10 11月 by helenadmin

没有使用队列,也没有线程池还在学习只是多线程 代码如下: #coding:utf8 import urllib […]

Continue reading
Posted in Python · Leave a comment

python连接mysql、mongodb、redis、memcache等数据库的方法

12 9月10 11月 by helenadmin

用python写脚本也有一段时间了,经常操作数据库(mysql),现在就整理下对各类数据库的操作,如后面有新的 […]

Continue reading
Posted in Python · Leave a comment

python自动化工具日志查询分析脚本代码实现

12 9月10 11月 by helenadmin

受控节点slave.py 代码如下: import socketimport reclass log(obje […]

Continue reading
Posted in Python · Leave a comment

python使用urllib2模块获取gravatar头像实例

12 9月10 11月 by helenadmin

gravatar注册地址: https://en.gravatar.com/ 代码如下: “&#8 […]

Continue reading
Posted in Python · Leave a comment

python发送伪造的arp请求

12 9月10 11月 by helenadmin

代码如下: #!/usr/bin/env pythonimport socket s = socket.soc […]

Continue reading
Posted in Python · Leave a comment

文章导航

先前文章
较新文章

近期文章

  • 15款互联网人必备的AI工具,效率提升2倍
  • 多个ChatGPT通用指令
  • Python采集biaozhun政府文件
  • TensorFlow库:Python中的深度学习
  • python 本地密码管理应用

近期评论

  • helenadmin发表在《Python采集biaozhun政府文件》
  • helenadmin发表在《写给程序员的一封公开信》
  • Google发表在《About Me》
  • helenadmin发表在《ES(ElasticSearch)分布式全文搜索引擎及使用方式》
  • buy viagra发表在《About Me》

文章归档

  • 2024年12月
  • 2024年9月
  • 2024年6月
  • 2024年5月
  • 2024年3月
  • 2024年2月
  • 2024年1月
  • 2023年12月
  • 2023年11月
  • 2023年10月
  • 2023年9月
  • 2023年8月
  • 2023年7月
  • 2023年6月
  • 2023年5月
  • 2023年4月
  • 2023年3月
  • 2023年2月
  • 2023年1月
  • 2022年12月
  • 2022年8月
  • 2022年7月
  • 2022年6月
  • 2022年5月
  • 2022年4月
  • 2022年3月
  • 2022年2月
  • 2022年1月
  • 2021年12月
  • 2021年11月
  • 2021年10月
  • 2021年9月
  • 2021年8月
  • 2021年7月
  • 2021年6月
  • 2021年5月
  • 2021年4月
  • 2021年3月
  • 2021年1月
  • 2020年12月
  • 2020年11月
  • 2020年10月
  • 2020年9月
  • 2020年8月
  • 2020年7月
  • 2020年6月
  • 2020年5月
  • 2020年4月
  • 2020年3月
  • 2020年2月
  • 2020年1月
  • 2019年12月
  • 2019年11月
  • 2019年10月
  • 2019年9月
  • 2019年8月
  • 2019年7月
  • 2019年6月
  • 2019年5月
  • 2019年4月
  • 2019年3月
  • 2019年2月
  • 2019年1月
  • 2018年12月
  • 2018年11月
  • 2018年10月
  • 2018年9月
  • 2018年7月
  • 2018年6月
  • 2018年3月
  • 2018年2月
  • 2018年1月
  • 2017年12月
  • 2017年11月
  • 2017年10月
  • 2017年9月
  • 2017年8月
  • 2017年7月
  • 2017年6月
  • 2017年5月
  • 2017年4月
  • 2017年3月
  • 2017年1月
  • 2016年12月
  • 2016年11月
  • 2016年10月
  • 2016年9月
  • 2016年8月
  • 2016年7月
  • 2016年6月
  • 2016年5月
  • 2016年4月
  • 2016年3月
  • 2016年2月
  • 2015年8月
  • 2015年7月
  • 2015年6月
  • 2015年5月
  • 2014年7月
  • 2014年6月
  • 2014年5月
  • 1970年1月

分类目录

  • Database
  • focus—-实时热搜
  • IC设计
  • js&jquery
  • PHP
  • Python
  • 新技术研习
  • 服务器相关技术
  • 算法
  • 缓存技术
  • 随笔

功能

  • 注册
  • 登录
  • 文章RSS
  • 评论RSS
  • WordPress.org
© 2025 charlie笔记 ·