蠎加载 185
原文: Import Python Weekly Newsletter - Issue No 185 欢迎, 来 PyChina/weekly 共同翻译/增订/推荐 周刊 蠎消息 ;-) 最近官方更新的不规律, 俺也不好按时自造… 该读 ~ 文章, Blog, 教程… ...
原文: Import Python Weekly Newsletter - Issue No 185 欢迎, 来 PyChina/weekly 共同翻译/增订/推荐 周刊 蠎消息 ;-) 最近官方更新的不规律, 俺也不好按时自造… 该读 ~ 文章, Blog, 教程… ...
原文: Import Python Weekly Newsletter - Issue No 184 欢迎, 来 PyChina/weekly 共同翻译/增订/推荐 周刊 蠎消息 ;-) 该读 ~ 文章, Blog, 教程… 探索 Python AST 生态 - YouTube video, AST This session will introduce attendees to Python’s rich ecosystem of abstract syntax tree tooling and libraries, with an emphasis on practical applications in static analysis and metaprogramming. Attendees should be fully comfortable with Python syntax and semantics, but familiarity with the ast module itself will not be necessary. (是也乎: Hummm… 可惜越来越 C+++++ 化的 Python 语法,已经气走了老爹, 原先简洁的 AST 也难以嵌入到自制 DSL 中了哈? ) 给 python 程序猿的 React react In this article I will present what I learned about React from a Python developer point of view. (是也乎: 那什么, 可惜了 Ring 项目, 如果洪教授坚持到今天, 可能就没 React 什么事儿了吧.. ) 对 op-ed 作者的语言学分析 stats, linguistics David Robinson did a nice writeup of using his R package to analyze who wrote the “I Am Part of the Resistance Inside the Trump Administration” op-ed in NYTimes. His approach was with TF-IDF of the words. I wanted to try this with different text statsistics of the linguistic features instead, since I’m guessing word usage will not give the author away. And in Python of course. (是也乎: 拼音类语言因为有天然的单词切分机制, 所以, 各种语言分析模块很充足, 中文光是分词, 就完杀现有伪 AI , 导致语音识别品质一直没实质嗯哼. 或是, 类似 ImageNet 的中文词性语料库, 能开发出来, 也是个坚实的开始哪… 可惜,汉语被和谐大神在高速演化中, 各种文字/词的含义几乎不可能稳定半年以上,没什么好策略来嗯哼 ) ...
原文: 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. 好物 ~ 包/模块/库/片段… ...
原文: 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. 好物 ~ 包/模块/库/片段… ...