![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python
文章平均质量分 80
Dirtyworker
这个作者很懒,什么都没留下…
展开
-
IPython与Jupyter内核
目录1. IPython介绍2. 更换jupyter notebook内核2.1 查看jupyter内核列表: `jupyter kernel list`2.2 为jupyter添加kernel(内核): `python -m ipykernel install --name kernelname`2.2.1 例一:为jupyter添加Python3.9的内核(3.9为默认版本)2.2.2 例二:为jupyter添加Python3.7的内核(3.7非默认版本)2.3 删除jupyter的某个kernel(原创 2021-05-17 16:54:15 · 726 阅读 · 1 评论 -
Python Anonymous/Lambda Function
Python Anonymous/Lambda Function1. What are lambda function in Python?2. How to use lambda Function in Python?2.1 Syntax of Lambda Function in Python2.2 Example of Lambda Funuction in Python3. Use of Lambda Function in Python3.1 Example with filter()3.2 E原创 2021-01-16 17:40:39 · 204 阅读 · 1 评论 -
Python Global, Local and Nonlocal variables
Python Global, Local and Nonlocal variables1. Global variables1.1 Definition1.2 Example of Usage1.3 global keyword(global关键字)2. Local variables2.1 Definition2.2 Global variable and Local variable with the same name3. Unlocal variables3.1 Definition3.2 Exam原创 2021-01-14 15:25:24 · 170 阅读 · 0 评论 -
Mac中管理不同的python版本
目录1. brew安装旧版本python2. brew在不同版本python之间切换(pip也随之切换)3. jupyter内核中的Python1. How to know which version of python is running in Jupyter notebook?2. 更换jupyter中使用的python的版本1. brew安装旧版本python# 查看 brew 可安装的所有python版本>>> brew search python@xxx# 安装 py原创 2021-01-10 00:38:34 · 422 阅读 · 0 评论 -
Decorator in Python
目录Python中的描述符Prerequisites for learning decoratorsEverything is objectPython ClousuresNonlocal variable in nested functionNonlocal variablesDefining a Closure FunctionWhen do we have closures?When to use closures?Getting back to DecoratorsDecorating Functi原创 2021-01-06 15:04:16 · 184 阅读 · 0 评论 -
python描述符
DefinitionDescriptor is how python’s property type implemented.A descriptor simply implements _get_, _set_, _delete_, and then is added to another class in it’s definition._get_(self, instance, owner):access the attribute. It return value of attribute原创 2021-01-05 23:28:08 · 84 阅读 · 0 评论 -
python线程
多线程和多进程是每个计算机爱好者必须掌握的知识。在我接触编程的时候,几乎没有见过多线程/进程开发的demo,这导致我在很长一段时间都掌握得模模糊糊。在本篇博客中,我们将用几个例子简单介绍多线程,并用几个图片加深大家对进程的理解。原创 2020-12-31 00:57:01 · 115 阅读 · 0 评论