Code Monkey home page Code Monkey logo

learn-python's Introduction

learn-python

to learn python

记录学习python过程, 学习资源:http://www.liaoxuefeng.com/wiki/0014316089557264a6b348958f449949df42a6d3a2e542c000

including some useful demos 包含一些有用例子

content of demo
目录
1、hello_world:第一个python程序
2、python_template:python程序格式模板
3、primes:埃式筛法求素数,涉及iterator(生成器)的使用
4、log_decorator:给函数调用前后加日志信息等处理,涉及higher-order function(高阶函数)、decorator(装饰器/类型注解)的使用
5、mixin_class:多继承类例子,涉及Mixin设计实现多继承
6、enum_demo:枚举类使用的例子
7、meta_class:元类(metaclass)动态构造类的模板,改变类行为属性,以及元类实现一个简单ORM(Object Relational Mapping)框架
8、exception_demo:异常处理,涉及try...exception...finally使用,及logging模块记录异常日志方便事后排查问题
9、unittest_demo: 单元测试编写例子,u涉及nittest模块使用
10、io_demo:文件io(input/output)操作示例,涉及open打开文件close关闭释放资源,try...finally...或者with...as...确保文件关闭
11、pickle_demo:对象序列化/反序列化,涉及pickle和json模块
12、multiprocessing_demo:多进程示例,涉及fork()、Process、Pool及Queue实现进程间通信
13、threading _demo:多线程示例,使用lock加锁保证线程共享数据修改安全性,ThreadLocal实现多线程间数据传递,线程间数据独立互不影响
14、queue_manager:分布式进程示例,通过manager包中BaseManager类管理Queue对象,暴露网络访问接口给其他机器实现任务分发
15、regular_expression: 正则表达式示例,涉及匹配规则及re模块的使用,分组、分割、编译
16、hashlib_demo:使用内置库示例,涉及MD5、SHA1等使用
17、contextlib_demo:上下文管理示例,涉及with...as...,@contextmanager,@closing装饰器等内容
18、xml_parser:xml解析示例,涉及SAX、ContentHandler等
19、html_parser:html解析示例,涉及HTMLParser等
20、urllib_demo:http操作请求示例,涉及GET/POST,以及模拟浏览器请求
21、tcpip_demo:tcp/udp网络编程示例,涉及socket
22、db_demo:database使用示例,涉及SQLite和MySQL
23、SQLAlchemy_demo:orm框架使用示例,涉及SQLAlchemy和MySQL
24、WSGI_demo:wsgi框架开发web app示例
25、web_demo:flask框架开发web app示例
26、MVC_demo:template开发web app示例,MVC设计,分离html
27、conroutine_demo:coroutine实现生产者-消费者模型示例
28、asyncio_demo:asyncio库使用示例,涉及coroutine配合yield from实现异步io等多任务并发执行

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.