跳转至

371-380

Issue #371 Python Pointers, Concurrency, PyPI 2FA, 3.8 News, and More June 4, 2019

Cite

Pointers in Python: What’s the Point?
Get a clearer understanding of Python’s object model and learn why pointers don’t really exist in Python. You’ll also cover ways to simulate pointers in Python without the memory-management nightmare. REAL PYTHON

https://www.tutorialspoint.com/cprogramming/c_pointers.htm这篇中介绍了C语言中的指针,指针就是一个变量,里面存储的是一个地址,可以指向内存中的一个位置 Python中的不可变对象 img_49.png 文章讲的非常好,详细地说明了Python中变量的引用和C中指针的区别,还给出了一些非常漂亮的例子,以int为例,说明了C中变量是可变的,Python是不可变的 img_50.png 一些其他的解释 img_51.png 就是说由于int和str是不可变类型,所以你a=1,b=1的时候应该搞出来俩东西,id是不相等的,但是这么做显然会浪费空间,所以在CPython中对于一些常用的int和str都进行了内置。好处就是Python程序猿永远不用去考虑指针这个破玩意 文章的结论是可以在Python中模拟指针,但是意义不大,你要是真想在Python中用指针你就用ctypes去调用C程序

Cite

Python’s Caduceus Syndrome
“Which of the two should the ecosystem tackle as a priority? Should they clean up all backwards compatibility first? (that would be PEP 594, ‘removing dead batteries from the standard library’) Should they focus on moving everyone over to the new features?” VICKI BOYKIS

打不开呀小兄弟,挂了VPN也打不开

大家的反馈是PyPy要比CPython更快,生产环境用起来也不错。但是由于很多C拓展是依赖于 CPython的,所以如果你严重依赖C拓展的话就还是用CPython吧

Cite

Object-Oriented Programming in Python vs Java
Learn about the practical differences in Python vs Java for object-oriented programming. By the end, you’ll be able to apply your knowledge to Python, understand how to reinterpret your understanding of Java objects to Python, and use objects in a Pythonic way. REAL PYTHON

Python和Java中OOP的一些例子的比较

Cite

both: Python 2 + 3 Compatibility Layer
BAKKERTHEHACKER.GITHUB.IO

花里胡哨

Issue #372 Python's Rise in Popularity, CPython 3.8.0b1, Python Packaging, and More June 11, 2019

Cite

Python Predicted to Overtake C and Java in Next 4 Years
“Python’s ascent continues among software developers, bolstered by its usability compared with Java and C.” ZDNET.COM

人生苦短,我用Python

Cite

Current State of Python Packaging in 2019
“In this post, I will try to explain the intricate details of Python packaging. I spent the best part of my evenings in the past two months to gather as much information as possible about the problem, the current solutions, what is legacy and what is not.” Related discussion on Hacker News STEFANO BORINI

感觉像是Poetry的安利帖 img_52.png

img_53.png

Cite

How to Implement a Stack Data Structure in Python
In this tutorial, you’ll learn how to implement a stack in Python. You’ll see how to recognize when a stack is a good choice for data structures, how to decide which implementation is best for a program, and what extra considerations to make about stacks in a threading or multiprocessing environment. REAL PYTHON

打不开

Issue #373 Publishing Python Packages, Making CPython Leaner, PSF Election Results, and More June 18, 2019

Cite

Toward a “Kernel Python”
“We need a newer, leaner, unburdened ‘kernel’ Python. We need to dump the whole standard library out on the floor, adding back only the smallest bits that we need, so that we can tell what is truly necessary and what’s just nice to have.”

打不开

Cite

Loop Better: A Deeper Look at Iteration in Python
“Python’s for loops don’t work the way for loops do in other languages. In this article we’re going to dive into Python’s for loops to take a look at how they work under the hood and why they work the way they do.” TREY HUNNER

Python中的迭代器

Issue #374 Lambda Functions, Progress Bars, Python GUI Apps, and More June 25, 2019

Cite

How to Use Python Lambda Functions
In this step-by-step tutorial, you’ll learn about Python lambda functions. You’ll see how they compare with regular functions and how you can use them in accordance with best practices.

Python中的Lambda表达式 https://dbader.org/blog/meaning-of-underscores-in-python中介绍了Python的_的几种用法

Cite

How to Easily Use a Progress Bar in Python
A survey of Python progress bar libraries like Progress, ProgressBar2, TQDM, Click, and Clint that allow you to add animated progress bars to your command-line apps.

几种好用的Python进度条,用过tqdm

Cite

Generating Random Data in Python
In this course, you’ll cover several options for generating random data in Python, and then build up to a comparison of each in terms of its level of security, versatility, purpose, and speed.

收费的没看

Cite

Building Standalone Python Applications With PyOxidizer
“PyOxidizer’s marquee feature is that it can produce a single file executable containing a fully-featured Python interpreter, its extensions, standard library, and your application’s modules and resources.”

分发Python代码,貌似还没有完成

最喜欢的Python语法糖 !!! Guido: I stole Python’s elif from the C Preprocessor
1

之前有用过,布局很简单,赞

妈的下一代http client说404就404了?

Issue #375 CPython Release Cycle, Functional Programming With Python, Python Robots, and More July 2, 2019

Cite

How to Use Redis With Python
In this step-by-step tutorial, you’ll cover how to use both Redis and its Python client library. You’ll learn a bite-sized slice of Redis itself and master the redis-py client library.

Python使用Redis的例子

5个新手常犯的错误

第三方拓展

读文件,然后给提供了一个切片操作

Issue #376 CPython 3.7.4 Launched, Only 5 People Maintain "Pip", and More July 9, 2019

Cite

Only 5 People Maintain pip
Related discussion on Hacker News.

五个人就可以了….很多项目都是只有一个维护者…

Cite

What’s the Average Python Developer Salary in the US?
What makes Python popular? What is the average Python developer salary in the US? And how many Python programmers are there in the world?

img_56.png 里面还有各种的数据表格,关于一些薪资的情况

Cite

Python Type Hints Overview
Why type hints were added to Python and how they can help you write more maintainable code and make Python programming more enjoyable.

没啥用,废话太多

感觉有点难用,Vue的Python绑定

Issue #377 Python Recommendation Engines, the GIL in 3.8 & 3.9, Celery, and More July 16, 2019

Cite

Has the Python GIL Been Slain?
Thoughts on upcoming features in Python 3.8 and 3.9, like sub-interpreters, that will make writing high-performance concurrent programs that are CPU-bound more convenient.

尝试使用Multiple Interpreters来解决GIL的问题

Cite

The Python Celery Cookbook: Small Tool, Big Possibilities
“Everyone in the Python community has heard about Celery at least once, and maybe even already worked with it. Basically, it’s a handy tool that helps run postponed or dedicated code in a separate process or even on a separate computer or server. This saves time and effort on many levels.”

Celery入门指南

Cite

Which Is Faster in Converting a List to a Set in Python 3: set() or {*}
Perhaps surprisingly, there is a performance difference between the two. Read Michael’s article to find out why using a {*} set literal is faster.

404 Page Not Found

Cite

Video Classification With Keras and Deep Learning
In this tutorial, you will learn how to perform video classification using Keras, Python, and Deep Learning.

Python+Keras来视频动作分类

Issue #378 Python 2 Support in Pip, Logging, Effective Python Dev Environments, and More July 23, 2019

Cite

Create a Flask Application With Google Login
In this step-by-step tutorial, you’ll create a Flask application that lets users sign in using their Google login. You’ll learn about OAuth 2 and OpenID Connect and also find out how to implement some code to handle user session management.

接入谷歌登陆

Cite

Exploring Best Practices for Upcoming Python 3.8 Features
“As a Python 3.8 learning exercise, I’m using the walrus operator, / notation, and f= at every opportunity and then evaluating the result for clarity.”

没打开…但是看着挺不错的

Cite

Making Python Classes More Modular Using Mixins
“In this article I want to discuss mixins: what they are, how they work, and when they’re useful. Hopefully after reading this brief article you will be ready to experiment with this pattern yourself in your own projects.”

继承Plot父类,其他的都是“特性”,每个特性最好只实现一个功能,摆脱了多重继承的问题

Cite

Writing Sustainable Python Scripts
A standalone Python script can come with a discoverable interface a documentation and some tests to keep it useful a year later.

怎么写出可维护的代码,没啥用

Cite

Let’s Build a Simple Interpreter: Recognizing Procedure Calls
Part 16 in Ruslan’s amazing tutorial series on building a scripting language interpreter using Python, from scratch.

好像是重新撸一个Python解释器的博客,感觉有点意思,拎出来好好看

Issue #379 Python 3.8 Beta Cycle, PyLint vs Flake8, Understanding Tracebacks, and More July 30, 2019

Cite

What’s Coming in Python 3.8
“The Python 3.8 beta cycle is already underway, with Python 3.8.0b1 released on June 4, followed by the second beta on July 4. That means that Python 3.8 is feature complete at this point, which makes it a good time to see what will be part of it when the final release is made.”

Python3.8中的新功能

Cite

Understanding the Python Traceback
Learn how to read and understand the information you can get from a Python traceback. You’ll walk through several examples of tracebacks and see how to handle some of the most common types of exceptions in Python.

Python异常栈

Cite

Django vs Flask in 2019: Which Framework to Choose
In this article, you’ll take a look at the best use cases for Django and Flask along with what makes them unique, from an educational and development standpoint.

想用那个就用哪个

没人维护了

Cite

4 Attempts at Packaging Python as an Executable
Interesting recap of the author’s experience creating a single-file executable of a Python application using four different tools: Cython, Nuitka, PyOxidizer, and PyInstaller.

几种制作可执行Python运行程序的方法。有PyInstaller,其他的好像是要重新编译Python,没有仔细研究

Cite

Efficiently Generating Python Hash Collisions
“While this research demonstrates a fundamental break in the Python 3.2 (or below) hash algorithm, Python fixed this issue 7 years ago. It’s time to upgrade.”

有效的生成Hash碰撞的方法。这种碰撞可以明显地降低Python的dict的性能,同时可以利用这种碰撞来进行攻击

如何分析并提速你的Python 最高层的分析策略就是看一段程序的运行时间。可以使用timeit来测试,可以指定函数运行的次数来观察运行时间。 timeit.Timer(lambda: my_func()).timeit(number=100) 第二种是对每一行代码查看运行时间 第三种是对内存进行分析。

Issue #380 Django Security, PEP 589 (Typed Dicts), Python Memory Management, and More Aug. 6, 2019

Cite

First Steps With PySpark and Big Data Processing
Take your first steps with Spark, PySpark, and Big Data processing concepts using intermediate Python concepts.

Spark和PySpark的入门介绍,还是很入门的

Cite

Memory Management in Python
This article describes memory management in CPython 3.6 and how it uses a pool allocator called PyMalloc to speed-up memory operations and reduce fragmentation.

python36的内存管理,python是个动态语言,所有的都是对象,一些对象里面还能放其他的对象,比如list,set啥的,这些都需要额外的内存开销,为了应对这种特殊的情况,python使用了一种特殊的内存操作,称作PyMalloc

Pep 589

Cite

Exploring Mathematics With Matplotlib and Python
“Data Visualization can be a great tool for mathematical exploration and experimentation. In this article, I show you an example using Matplotlib and Python.”

多画图

Cite

All-in-One Visual Testing and Review Platform
Visually test your web app, component library, or static site across browsers and responsive widths to catch UI bugs and ship with complete confidence. Get started for free →

可视化测试平台

决策树的入门教程

数据可视化

看起来效果不错,但是目前还不完善

python写个markdown

评论