摘要: 有时候需要在同一台机器上安装多个版本的python 常见的解决方式如下: 一、 1. 下载python2.7和python3.7,然后在C盘下新建一个Python文件夹, python2.7安装到 C:\Python\Python27 python3.7安装到 C:\Python\Python37 阅读全文
posted @ 2018-08-07 19:37 eeechoo 阅读(112) 评论(0) 推荐(0) 编辑
摘要: 1. linux 基本命令 1.1. ps -aux | grep process-name | grep -v grep ps -ef 1.2. shutdown、reboot、logout等命令1.3. file and directory相关命令 cp、mv、rm find、locate 查找 阅读全文
posted @ 2018-07-21 11:07 eeechoo 阅读(101) 评论(0) 推荐(0) 编辑
摘要: 1. ORM框架 从使用的角度 user1 = User(...) user.save() 这些角度去理解ORM框架 因为ORM框架本身就是为了方便用户去使用的工具, ORM的框架设计需要从用户使用的角度去设计 ORM框架 2. coroweb框架 aiohttp已经是一个框架了 aiohttp的路 阅读全文
posted @ 2018-05-27 10:52 eeechoo 阅读(506) 评论(0) 推荐(0) 编辑
摘要: 第5章 1.First-Class function 这里的first-class 的意思是 一个函数可以作为对象,在另一个函数中返回 metaclass programming中 也有 first-class class的概念,也就是说 类 可以作为对象, 在另外一个类中 创建,返回 2. 函数参 阅读全文
posted @ 2018-05-09 12:06 eeechoo 阅读(159) 评论(0) 推荐(0) 编辑
摘要: fluent python control flow 这几章学习笔记: 第14章 1. Iterable 包含一个__iter__方法,该方法返回一个iterator iterator 包含一个__next__方法和一个__iter__方法,__iter__方法返回自己 所以: 任何iterator 阅读全文
posted @ 2018-05-08 18:50 eeechoo 阅读(459) 评论(0) 推荐(0) 编辑
摘要: 阅读了fluent python的metaprogramming这一大章节,下面对阅读后产生的感想做一下总结。 首先是关于对象 属性 访问的4个protocol 按照理解可以划分为 __getattribute__ 和 __getattr__ __setattr__ __delattr__ 这样划分 阅读全文
posted @ 2018-05-04 15:47 eeechoo 阅读(174) 评论(0) 推荐(0) 编辑
摘要: 在 fluent python的第6章, 函数作为first-class,所以这两种模式使用起来更加简单了! 先mark 以后写 什么是 First-class function? 知乎上有讲 应该和语言的设计有关系: https://www.zhihu.com/question/27460623/ 阅读全文
posted @ 2018-01-25 12:29 eeechoo 阅读(164) 评论(0) 推荐(0) 编辑
摘要: David Beazley 对 Python中的 生成器(generator)和协程(coroutine)有着深入的理解,并在PyCon会议上做个三个关于这方面的演讲,所以称为三部曲(trilogy)。 目前只完整的读过第二篇 ,以后有机会做个总结。先写着提醒自己 阅读全文
posted @ 2018-01-14 13:44 eeechoo 阅读(97) 评论(0) 推荐(0) 编辑
摘要: 1. 问题描述 LeetCode第226题,题目名称为二叉树翻转 triv·i·a : details, considerations, or pieces of information of little importance or value. 翻译为细节,无用的细节 2. 思考 2.1 这类传 阅读全文
posted @ 2018-01-14 13:06 eeechoo 阅读(351) 评论(0) 推荐(0) 编辑
摘要: https://www.cnblogs.com/vamei/archive/2012/12/11/2772448.html 对 attribute property > @property @***.setter dynamic attributes > __getattr__ method att 阅读全文
posted @ 2018-01-09 20:56 eeechoo 阅读(226) 评论(0) 推荐(0) 编辑