蠎加载 182

原文: Import Python Weekly Newsletter - Issue No 182 欢迎, 来 PyChina/weekly 共同翻译/增订/推荐 周刊 蠎消息 ;-) 该读 ~ 文章, Blog, 教程… PEP 505 – None-aware operators PEP Several modern programming languages have so-called “null-coalescing” or “null- aware” operators, including C# , Dart, Perl, Swift, and PHP (starting in version 7). These operators provide syntactic sugar for common patterns involving null references. (是也乎: 越来越多的语法糖,在老爹离开后开始嗯哼…不怕牙痛嘛? (a ?? 2 b ?? 3) == a ?? (2 (b ?? 3)) (c() ?? c() ?? True) == True (True ?? ex()) == True (c ?? ex)() == c() ) 应该用哪些 Python 静态分析工具? static analysis In this review, we’ll be taking a look at our favorite options and explain which ones to use. Python 和 Pandas 匿名化数据的简单方法 pandas Recently, I was given a dataset that contained sensitive information about customers and that should not under any circumstance be made public. The dataset resided on one of our servers which I deem to be a reasonably secure location. I wanted to copy the data to my local drive, in order to work with the data more comfortably and at the same time not having to fear that the data is less save. So, I wrote a little script that changes the data, while still preserving some key information. I will detail all the steps that I have taken, and highlight some handy tricks along the way. AWS Lambda + Serverless Framework + Python— 第1部分:循序渐进“Hello World” aws lamda I am creating a series of blog posts to help you develop, deploy and run (mostly) Python applications on AWS Lambda using Serverless Framwork. SIP Telephony 在 Python - pdf 文件 SIP Implementer’s Guide to Scalable and Robust Internet Telephony with Session Initiation Protocol in ClientServer and Peer-to-Peer modes in Python 2018 年顶级编程语言 - IEEE Spectrum ranking Python extends its lead, and Assembly enters the Top Ten 线性压缩在 python: PCA vs 无监督的特征选择 data science We illustrate the application of two linear compression algorithms in python: Principal component analysis (PCA) and least-squares feature selection. Both can be used to compress a passed array, and they both work by stripping out redundant columns from the array. The two differ in that PCA operates in a particular rotated frame, while the feature selection solution operates directly on the original columns. As we illustrate below, PCA always gives a stronger compression. However, the feature selection solution is often comparably strong, and its output has the benefit of being relatively easy to interpret — a virtue that is important for many applications. OpenCV 数人头 image processing In this tutorial you will learn how to build a “people counter” with OpenCV and Python. Using OpenCV, we’ll count the number of people who are heading “in” or “out” of a department store in real-time. (是也乎: ) Salmon Run:用 Python dedupe library 嗯哼重复关键字 topic modeling I have been experimenting with keyword extraction techniques against the NIPS Papers dataset, consisting of titles, abstracts and full text of all papers from the Neural Information Processing Systems (NIPS) conference from 1987-2017, and contributed by Ben Hamner. The collection has 7239 papers written by 9785 authors. The reason I preferred this dataset to others such as Reuters or Medline is because it is smaller, and I can be both programmer and domain expert, and because I might learn interesting things while combing through the text of the papers looking for patterns to exploit. 市长来自哪 : 用 Python 和 SPARQL 查询维基数据 - 参数化思想 datascience, sparkql In this article, we will be going through building queries for Wikidata with Python and SPARQL by taking a look where mayors in Europe are born. 好物 ~ 包/模块/库/片段… ...

2018-08-28 · 3 min · 1347 words · ZoomQuiet

蠎加载 181

原文: Import Python Weekly Newsletter - Issue No 181 欢迎, 来 PyChina/weekly 共同翻译/增订/推荐 周刊 蠎消息 ;-) 该读 ~ 文章, Blog, 教程… 在现代基础设施上持续交付 - Kubernetes 中跑 GoCD kubernetes, GoCD Model Docker-based build workflows more effectively with our GoCD Kubernetes integration. Run GoCD natively on Kubernetes, define your build workflow and let GoCD provision and scale build infrastructure on the fly. grumpy-runtime 发布 ...

2018-07-30 · 4 min · 1981 words · ZoomQuiet

蠎加载 180

原文: Import Python Weekly Newsletter - Issue No 180 欢迎, 来 PyChina/weekly 共同翻译/增订/推荐 周刊 蠎消息 ;-) 该读 ~ 文章, Blog, 教程… Transfer of power - Guido van Rossum BDFL Now that PEP 572 is done, I don’t ever want to have to fight so hard for a PEP and find that so many people despise my decisions. I would like to remove myself entirely from the decision process. I’ll still be there for a while as an ordinary core dev, and I’ll still be available to mentor people – possibly more available. But I’m basically giving myself a permanent vacation from being BDFL, and you all will be on your own. (是也乎: [python-committers] Transfer of power Guido van Rossum guido at python.org Thu Jul 12 10:57:35 EDT 2018 Previous message (by thread): [python-committers] A different way to focus discussions Next message (by thread): [python-committers] Transfer of power Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] Now that PEP 572 is done, I don’t ever want to have to fight so hard for a PEP and find that so many people despise my decisions. I would like to remove myself entirely from the decision process. I’ll still be there for a while as an ordinary core dev, and I’ll still be available to mentor people – possibly more available. But I’m basically giving myself a permanent vacation from being BDFL, and you all will be on your own. After all that’s eventually going to happen regardless – there’s still that bus lurking around the corner, and I’m not getting younger… (I’ll spare you the list of medical issues.) I am not going to appoint a successor. So what are you all going to do? Create a democracy? Anarchy? A dictatorship? A federation? I’m not worried about the day to day decisions in the issue tracker or on GitHub. Very rarely I get asked for an opinion, and usually it’s not actually important. So this can just be dealt with as it has always been. The decisions that most matter are probably ...

2018-07-15 · 5 min · 2246 words · ZoomQuiet

蠎加载 179

原文: Import Python Weekly Newsletter - Issue No 179 欢迎, 来 PyChina/weekly 共同翻译/增订/推荐 周刊 蠎消息 ;-) 该读 ~ 文章, Blog, 教程… Python 3.8 已明确7项新嗯哼 PEP, 3.8 Python 3.7 benefitted from both new functionality and optimizations. From what we know so far about 3.8, it’s going to be a similar story. This time, most of the new functionality is targeted at C extension and module development. Based on the existing, Python Enhancement Proposals, or “PEPs” that have been submitted for 3.8 we have a good grasp on what features are likely to be included. I’ve put together a PEP-Explorer UI here for 3.8. (是也乎: 总之, 为了吸引大家进入 py3 世界, PEP 的嗯哼也加速了 ) 第 #168 集: 10种 Python 安全漏洞以及如何插入它们 podcast Do you write Python software that uses the network, opens files, or accepts user input? Of course you do! That’s what almost all software does. But these actions can let bad actors exploit mistakes and oversights we’ve made to compromise our systems. Python is safer than some languages, but there are plenty of issues to be careful about. That’s why Anthon Shaw and Anthony Langsworth are joining me to discuss Python security. (是也乎: 用 Python 开发软件的常见嗯哼… 其实吧, 嘦不是运行在 windows 环境中的都很好解决 ) 比较 Python,R 和 Scala 的顶级数据科学库 infographics (是也乎: 其实吧, 这种比例早已没什么必要了 ) 使用 LINQ 扩展 python 列表以实现干净快速编码 project A list-like type with fun functionality. Extents the builtin list with .NET’s Language Intagrated Queries (Linq) and more. Write clean code with powerful syntax. Forget about messy loops, conditions and list comprehensions. (是也乎: 传说 LINQ 是项非常嗯哼的技术…然后… ) 马尔可夫链文本生成器的优雅 Python 代码 - Eli Bendersky’s website markov chain While preparing the post on minimal char-based RNNs, I coded a simple Markov chain text generator to serve as a comparison for the quality of the RNN model. That code turned out to be consice and quite elegant (IMHO!), so it seemsed like I should write a few words about it. It’s so short I’m just going to paste it here in its entirety, but this link should have it in a Python file with some extra debugging information for tinkering, along with a sample input file. 用 Python 在 AWS Lambda 为星际争霸II构建 Amazon Alexa Skill aws, lamda The rising adoption of Amazon’s Alexa and Google Assistant brings a lot of amazing possibilities for developers. I’m going to show you the basic concepts of building voice user interfaces and how to build a simple Alexa skill. And since there’s plenty of “hello world” Alexa tutorials on the internet, we’re going to build something more interesting. Something that you can literally play with. (是也乎: AWS lamda 虽然是开创性的微服务形态,但还没有成为标准 ) Meet Daniel Imberman and Seth Edwards: Apache Airflow and the Kubernetes Executor pybay This post is part of a series introducing the speakers at the PyBay2018 conference in San Francisco this August. It’s a great chance to learn and connect with an engaged and diverse community of Python developers. We hope you’ll join us! 扩展和定制 django-allauth django In the previous tutorial, we learned about setting up and configuring some basic settings of django-allauth. If you have not yet read it, I recommend you read it here. You can proceed if you have completed the basic setup and configuration. This article deals with customizing django-allauth signup forms, intervening in registration flow to add custom process and validations. Social logins and their customizations discussed in the next article. (是也乎: Django 早已成功进入复杂到一眼看不出问题的境界了 ) DBSCAN 聚类教程 clustering algorithm DBSCAN is a popular clustering algorithm which is fundamentally very different from k-means. (是也乎: 叕一则流行分类算法教程 ) Python 中的基本统计: 描述性统计 statistics 对 Celery 任务进行单元测试 celery, TDD While you might get away with not writing unit tests for very simple Rest API endpoints, doing the same for celery tasks is recipe for frustration (and disaster). Celery tasks are asynchronous by design and therefore a lot harder to get a grip on using a “development driven development” approach. Test Driven Development (TDD) might not have taken us to the promised land we had hoped for, but when it comes to celery tasks, it most definitely is essential to a sane, effective and efficient development process - and having that peace of mind when releasing your code into production. (是也乎: 对分布式嗯哼的测试一直是个大问题… ) 计算文件 project A little command-line interface (CLI) utility written in Python to help you count files, grouped by extension, in a directory. By default, it will count files recursively in current working directory and all of its subdirectories, and will display a table showing the frequency for each file extension (e.g.: .txt, .py, .html, .css) and the total number of files found. (是也乎: 文件统计小工具… ) 好物 ~ 包/模块/库/片段… ...

2018-07-10 · 4 min · 1707 words · ZoomQuiet