Skip to content
  • About Me

charlie笔记

A programmer’s note boke for work and life

月份:2016年6月

一步步教你理解python装饰器

20 6月01 1月 by test31297505

或许你已经用过装饰器,它的使用方式非常简单但理解起来困难(其实真正理解的也很简单),想要理解装饰器,你需要懂点 […]

Continue reading
Posted in 未分类 · Leave a comment

在python中添加自定义模块

20 6月01 1月 by test31297505

一般来说,我们会将自己写的python模块与python自带的模块分开存放以达到便于维护的目的。那么如何在py […]

Continue reading
Posted in 未分类 · Leave a comment

python设计模式之"外观模式"实例讲解

20 6月01 1月 by test31297505

python中设计模式之外观模式主张以分多模块进行代码管理而减少耦合,下面用实例来进行说明。 应用特性: 在很 […]

Continue reading
Posted in 未分类 · Leave a comment

python列表排序方法reverse、sort、sorted详解

20 6月01 1月 by test31297505

python语言中的列表排序方法有三个:reverse反转/倒序排序、sort正序排序、sorted可以获取排 […]

Continue reading
Posted in 未分类 · Leave a comment

提高你的python能力:理解单元测试

20 6月01 1月 by test31297505

对于程序开发新手来说,一个最常见的困惑是测试的主题。他们隐约觉得“单元测试”是很好的,而且他们也应该做单元测试 […]

Continue reading
Posted in 未分类 · Leave a comment

python字符串连接的三种方法及其效率、适用场景详解

20 6月01 1月 by test31297505

python字符串连接的方法,一般有以下三种: 方法1:直接通过加号(+)操作符连接 website = &# […]

Continue reading
Posted in 未分类 · Leave a comment

python准确判断文件类型

20 6月01 1月 by test31297505

判断文件类型在开发中非常常见的需求,怎样才能准确的判断文件类型呢?首先大家想到的是文件的后缀,但是非常遗憾的是 […]

Continue reading
Posted in 未分类 · Leave a comment

如何让你的python代码更加pythonic?

20 6月01 1月 by test31297505

pythonic如果翻译成中文的话就是很python。很+名词结构的用法在中国不少,比如:很娘,很国足,很cc […]

Continue reading
Posted in 未分类 · Leave a comment

详解python包管理器pip安装

20 6月01 1月 by test31297505

pip对于使用python的朋友并不陌生,当你想安装python模块的时候一定会首先想到它。pip 是一个安装 […]

Continue reading
Posted in 未分类 · Leave a comment

深刻理解python中的元类(metaclass)

20 6月01 1月 by test31297505

译注:这是一篇在stack overflow上很热的帖子。提问者自称已经掌握了有关python oop编程中的 […]

Continue reading
Posted in 未分类 · Leave a comment

python的名字绑定

20 6月01 1月 by test31297505

python的名字绑定 在python中,对象是通过名字进行关联和引用的。python通过名字绑定操作来引入名 […]

Continue reading
Posted in 未分类 · Leave a comment

python代码规范利器flake8

20 6月01 1月 by test31297505

写代码其实是需要规范的,团队中更是如此;不然 google 也不会发布各种编码规范,耳熟能详的有google […]

Continue reading
Posted in 未分类 · Leave a comment

pythonurllib2详解及实例

20 6月01 1月 by test31297505

urllib2是python的一个获取urls(uniform resource locators)的组件。他 […]

Continue reading
Posted in 未分类 · Leave a comment

python解析配置模块之configparser详解

20 6月01 1月 by test31297505

1.基本的读取配置文件 -read(filename) 直接读取ini文件内容 -sections() 得到所 […]

Continue reading
Posted in 未分类 · Leave a comment

python序列与映射的解包操作

20 6月01 1月 by test31297505

解包就是把序列或映射中每个元素单独提取出来,序列解包的一种简单用法就是把首个或前几个元素与后面几个元素分别提取 […]

Continue reading
Posted in 未分类 · Leave a comment

使用python进行汉语分词

20 6月01 1月 by test31297505

目前我常常使用的分词有结巴分词、nlpir分词等等 最近是在使用结巴分词,稍微做一下推荐,还是蛮好用的。 一、 […]

Continue reading
Posted in 未分类 · Leave a comment

程序模拟浏览器请求及会话保持

20 6月01 1月 by test31297505

python下读取一个页面的数据可以通过urllib2轻松实现请求 import urllib2 print […]

Continue reading
Posted in 未分类 · Leave a comment

python中readline和readlines的区别

20 6月01 1月 by test31297505

1.readline 场景 f0=file(“readline.txt”,r) whi […]

Continue reading
Posted in 未分类 · Leave a comment

python监控日志程序

20 6月01 1月 by test31297505

一个简易的日志监控的脚本,功能如下:1.windows环境2.当匹配日志关键字时会发出声音,匹配的关键字不同, […]

Continue reading
Posted in 未分类 · Leave a comment

python正则表达式的七个使用范例

20 6月01 1月 by test31297505

作为一个概念而言,正则表达式对于python来说并不是独有的。但是,python中的正则表达式在实际使用过程中 […]

Continue reading
Posted in 未分类 · Leave a comment

python创建单例模式的5种常用方法

20 6月01 1月 by test31297505

所谓单例,是指一个类的实例从始至终只能被创建一次。 方法1 如果想使得某个类从始至终最多只有一个实例,使用__ […]

Continue reading
Posted in 未分类 · Leave a comment

python2中的

20 6月01 1月 by test31297505

在python2.x中,从object继承得来的类称为新式类(如class a(object))不从objec […]

Continue reading
Posted in 未分类 · Leave a comment

python代码制作configure文件

20 6月01 1月 by test31297505

在lua中,一直用lua作为config文件,或承载数据的文件 – 好处是lua本身就很好阅读,然 […]

Continue reading
Posted in 未分类 · Leave a comment

python2.7跨文件全局变量的方法

20 6月01 1月 by test31297505

在使用python编写的应用的过程中,有时会遇到多个文件之间传递同一个全局变量的情况。 文件1:globalv […]

Continue reading
Posted in 未分类 · Leave a comment

python用sqlite3模块操作sqlite数据库

20 6月01 1月 by test31297505

sqlite是一个包含在c库中的轻量级数据库。它并不需要独立的维护进程,并且允许使用非标准变体(nonstan […]

Continue reading
Posted in 未分类 · Leave a comment

python守护进程(多线程开发)

20 6月01 1月 by test31297505

#!/usr/bin/python import sys,time,json,logging import q […]

Continue reading
Posted in 未分类 · Leave a comment

python与javascript比较

20 6月01 1月 by test31297505

最近由于工作的需要开始开发一些python的东西,由于之前一直在使用javascript,所以会不自觉的使用一 […]

Continue reading
Posted in 未分类 · Leave a comment

python调用外部子进程,通过管道实现异步标准输入和输出的

20 6月01 1月 by test31297505

我们通常会遇到这样的需求:通过c++或其他较底层的语言实现了一个复杂的功能模块,需要搭建一个基于web的dem […]

Continue reading
Posted in 未分类 · Leave a comment

python调用浏览器,实现刷网页小程序

20 6月01 1月 by test31297505

python 打开浏览器,可以做简单的刷网页的小程序 and 其他有想象力的程序。不过仅供学习,勿用非法用途。 […]

Continue reading
Posted in 未分类 · Leave a comment

python程序员经常犯的10个错误

20 6月01 1月 by test31297505

关于python python是一种解释性、面向对象并具有动态语义的高级程序语言。它内建了高级的数据结构,结合 […]

Continue reading
Posted in 未分类 · 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笔记 ·