蠎加载 183

原文: Import Python Weekly Newsletter - Issue No 183 欢迎, 来 PyChina/weekly 共同翻译/增订/推荐 周刊 蠎消息 ;-) 该读 ~ 文章, Blog, 教程… 和 Python 搞并行编程 parallel programming Welcome to a short course that will teach you how to write Python scripts that can take advantage of the processing power of multicore processors and large compute clusters. While this course is based on Python, the core ideas of functional programming and parallel functional programming are applicable to a wide range of languages. To follow this course you should already have a good basic understanding of Python, e.g. loops, functions, containers and classes. This course will rely on you understanding the material presented in my Beginning Python and Intermediate Python courses. This is a short course that will give you a taste of functional programming and how it can be used to write efficient parallel code. Please work through the course at your own pace. Python is best learned by using it, so please copy out and play with the examples provided, and also have a go at the exercises. (是也乎: 课程, 讲述并行计算原则, 只是选择用 Python 来作为课程案例… ) 管道在 Python functional programming I just found an article about pipes in Python on lobste.rs and was reminded that I was toying with the exact same thing recently. Using a lot of functional languages (mainly Haskell, Clojure, Elixir) and also a fair bit of bash, I am very used to streaming data through chains of functions using pipe-like constructs. Python does make this quite difficult and encourages a more imperative approach with intermediate variables (是也乎: 推荐珠三角技术沙龙的赖勇浩折腾过的模块, 可以直接从形式上 pipe 起来 ) 用 Python 构建退休储蓄模型 pandas It’s easy to find investment advice. It’s a little less easy to find good investment advice, but still pretty easy. We are awash in advice on saving for retirement, with hundreds of books and hundreds of thousands of articles written on the subject. It is studied relentlessly, and the general consensus is that it’s best to start early, make regular contributions, stick it all in low-fee index funds, and ignore it. I’m not going to dispute that, but I do want to better understand why it works so well. As programmers we don’t have to simply take these studies at their word. The data is readily available, and we can explore retirement savings strategies ourselves by writing models in code. Let’s take a look at how to build up a model in Python to see how much we can save over the course of a career. (是也乎: 无论什么模型也无法抵抗国家一纸红头文件的… ) mypyc - Dropbox 正在开发一个新的编译器 Cython mypyc will compile type-annotated Python code to an optimized C. The first goal is to compile mypy with it to make it faster, so I hope that the project will be completed. Essentially, mypyc will be similar to Cython, but mypyc is a subset of Python, not a superset. Interfacing with C libraries can be easily achieved with cffi. Being a strict subset of Python means that mypyc code will execute just fine in PyPy. They can even apply some optimizations to it eventually, as it has a strict and static type system. (是也乎: 自从老爹去了 Dropbox, 他们就经常嗯哼出全部的编译器来, 应该是好事儿? 不过, 都依赖重要的 py3 的类型声明特性 ) Vanilla python 聊天服务器 http, toy application, webserver In the process of trying to build a vanilla python HTTP server, I realized that I don’t know much about it’s inner workings. So while I was stuck learning about sockets, TCP handshakes and protocols, I decided to tackle something that was a little more within my reach thus was born this humble little project. A simple python chat server meant to be used by terminal clients through netcat. (是也乎: 继 香草JS 后, Python 框架也有香草味儿的了… ) 如何在 Python 中从头开始构建自己的神经网络 deep learning A beginner’s guide to understanding the inner workings of Deep Learning. . 用 Prophet 预测 Amazon 销售额 forecasting Prophet is an open-source Python package for time-series forecasting, originally developed by Facebook’s Data Science team to predict usage on different parts of Facebook. Prophet’s forte is forecasting highly seasonal data with long-term, non-stationary trends, punctuated with occasional spikes on specific dates. (是也乎: Prophet: 基于时间序列进行预测的软件 ) Airflow, 元数据工程和世界上最大的民主数据平台 airflow In this post, we will talk about how one of Airflow’s principles, of being ‘Dynamic’, offers configuration-as-code as a powerful construct to automate workflow generation. We’ll also talk about how that helped us use Airflow to power DISHA, a national data platform where Indian MPs and MLAs monitor the progress of 42 national level schemes. In the end, we will discuss briefly some of our reflections from the project on today’s public data technology. Leveraging Docker Images to deploy your Django backend on Openshift devops, openshift Openshift with Docker Images is the ultimate tool you need for automated deployment. 好物 ~ 包/模块/库/片段… ...

2018-08-30 · 4 min · 1607 words · ZoomQuiet

蠎加载 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