蠎加载 118

原文: Import Python Weekly Newsletter - Issue No 118 欢迎, 来 PyChina/weekly 共同翻译/增订/推荐 周刊 蠎消息 ;-) 该读 ~ 文章, Blog, 教程… 和 Python 一起来玩 猴子补丁 monkey patching Monkey patching is about replacing attributes of a Python thing with other attributes. Let’s use the word “thing” very loosely and have some fun. (是也乎: …. unless you really want to. ;-) 讲真, 能作, 和应该作,完全不同, 老老实实平平淡淡干干净净的写代码是最好的了… ) 通过 Zipkin 在 Python 应用中引入分布式跟踪 monitoring, distributed Distributed tracing is the idea of tracing a network request as it travels through your services, as it would be in a microservices based architecture. The primary reason you may want to do is to troubleshoot or monitor the latency of a request as it travels through the different services. (是也乎: 主要面向微服务…跨进程/主机/机房… ) 如何在 Python 中使用 Numpy 描述符统计 numpy, statistics The descriptive statistics we are going to calculate are the central tendency (in this case only the mean), standard deviation, percentiles (25 and 75), min, and max. 介绍 Pandas 进行数据分析 - 101 pandas pandas is a software library written for the Python programming language for data manipulation and analysis. (是也乎: 讲真 Pandas 真的很好用, 前提是数据清洗的要好… ) Google Cloud 上的 GPU 上跑 Jupyter notebooks docker, jupyter In a previous post, I listed out the steps to run Jupyter notebooks on GPU instances on GCP Compute Engine. It turns out, there is a much easier and more flexible way. Using Docker containers. (是也乎: GUP 在 GCP 中已经成为一个实体对象可以创建了, 然后 CUDA 的协助下, Jupyter 就能跑了… ) 说,这是什么? TensorFlow TensorFlow In this article, we will walk through an intermediate-level tutorial on how to train an image caption generator on the Flickr30k data set using an adaptation of Google’s Show and Tell model. We use the TensorFlow framework to construct, train, and test our model because it’s relatively easy to use and has a growing online community. (是也乎: 其实, 一切都被部署在云端了, 具体怎么来的,谁也不知道, 反正 google 知道, 大家用的越多, 他们就识别的越快… 然后, 再也没有公司能赢的了 google 了. ) Python 中用 感知散列 进行重复图像检测 image processing Jetsetter has hundreds of thousands of high-resolution travel photos, and we’re adding lots more every day. The problem is, these come from a variety of sources and are uploaded in a semi-automated way, so there are often duplicates or almost-identical photos that sneak in. And we don’t want our photo search page filled with dupes. (是也乎: 所谓 dHASH, 将 –> 劣化为 来加速对比 ) 用 Python 管理 corn 任务 cron Luigi: 一个 ExternalProgramTask 示例 – 将 JSON 转换为 CSV luigi I’ve been playing around with the Python library Luigi which is used to build pipelines of batch jobs and I struggled to find an example of an ExternalProgramTask so this is my attempt at filling that void. 如何用 Selenium 嗯哼 Python - 完整教程 Selenium (是也乎: Windows 中的 Eclipse+PyDev 的依赖…弃疗… ) Tutorial: Using MTurk together with AWS Lambda aws 用 MicroPython 和 NodeMCU 构建 IoT 启动电源 IOT 在 Python 中从 bytes 到 strings 然后再回来 core-python (是也乎: 反正这段公案是可以长长久久说下去的… ) 理解 Python3 中的类和实例变量 core-python (是也乎: 反正都不一样了… ) 音频应用程序音频信号处理(Python,NumPy,SciPy,Matplotlib等) Audio About this course: In this course you will learn about audio signal processing methodologies that are specific for music and of use in real applications. We focus on the spectral processing techniques of relevance for the description and transformation of sounds, developing the basic theoretical and practical knowledge with which to analyze, synthesize, transform and describe audio signals in the context of music applications. (是也乎: 又一大课程 ) PyData Tel Aviv Meetup: 闪电演讲 - Pandas tips & tricks pandas, video Pandas tips and tricks video (是也乎: 特拉维夫 聚会,当然的有 Youtube 自动生成的字幕, 足够快速嗯哼… 全程单手 Jupyter 演示下来, 没有幻灯.. ) 好物 ~ 包/模块/库/片段… ...

2017-03-31 · 3 min · 1434 words · ZoomQuiet

蠎加载 116

原文: Import Python Weekly Newsletter - Issue No 116 欢迎, 来 PyChina/weekly 共同翻译/增订/推荐 周刊 蠎消息 ;-) 该读 ~ 文章, Blog, 教程… 如何从内存中恢复丢失的 python 源代码? core-python I used “git checkout –” on the wrong file and managed to delete the code I had just written… but it was still running in a process in a docker container. Here’s how I got it back, using https://pypi.python.org/pypi/pyrasite/ and https://pypi.python.org/pypi/uncompyle6 (是也乎: 可怜的人… ) PEP 308 以及为毛俺依然恨 Python core-python I’m not a Python guy, but it seems that every job I’ve had has slowly pushed me into doing more and more Python until I end up doing nothing but Python all day. And I hate doing Python all day. (是也乎: 简单的说怼数学计算时,被 Py 的任性怒了… ) python 的怪代码 code snippets Code snippets that makes you wonder what’s happening? (是也乎: 所谓活久见… ) MetPy:驯服天气与Python - 剧集100 podcast What’s the weather tomorrow? That’s the question that meteorologists are always trying to get better at answering. This week the developers of MetPy discuss how their project is used in that quest and the challenges that are inherent in atmospheric and weather research. It is a fascinating look at dealing with uncertainty and using messy, multidimensional data to model a massively complex system. Django 周刊 30 newsletter If you use Django framework and want to keep updated with what’s happening in the Django world, check out django weekly 有效的 Python 学习姿势 video When learning a programming language, how do you know whether the effort you’re putting in is working or whether you’re wasting your time?. We’ll be chatting with Michael Herman and Evan Moore about techniques you can use to be more effective during your Python learning adventures. (是也乎: 关键就是得有一套靠谱的不依赖其他人的明确自己作的是否对的指标 ) 从 past 引入 bytes_literals Intel 的 Python 发行版提供数学能力的大提升 intel The still-in-beta Python distribution uses Math Kernel Library to speed up processing on Intel hardware. (是也乎: Intel 这么博爱… ) 客户数据驱动灯光秀 IOT Fast_Multi_Style_Transfer-tf Implementation of Google Brain’s A Learned Representation For Artistic Style in Tensorflow. You can mix various type of style images using just One Model and it’s still Fast. (是也乎: TF 中艺术风格的嗯哼 ) 诊断并修复 Python 中的内存嗯哼 debugging, memory leaks One thing we’ve learned from building complex software for the cloud is that a language is only as good as its debugging and profiling tools. Logic errors, CPU spikes, and memory leaks are inevitable, but a good debugger, CPU profiler, and memory profiler can make finding these errors significantly easier and faster. (是也乎: CPU 中的问题追踪,马上也将过渡到 TPU 的了… ) Python 中拟合高斯过程模型 numpy, stats k 最近邻 machine learning 使用Python和Django Rest Framework创建生产就绪的API - 第3部分 django (是也乎: 上期说的 google 的 fire 也是相似的嗯哼 ) 干掉你的Python代码与装饰 decorators 如何使用Python编写Collectd插件? collectd, monitoring deployments Collectd is a system statistics collection daemon. It gathers a lot of information about the system it’s running on, and passes it on to a software that can process and visualize that information, e.g. Grafana. Collectd already brings along a lot of built-in plugins to gather information about the system load, the network traffic, available entropy, various sensors, etc. But sometimes there’s a value that you want to log which is not covered by an existing plugin. (是也乎: SCM 一直是 Python 的擅长领域… ) 好物 ~ 包/模块/库/片段… ...

2017-03-17 · 3 min · 1106 words · ZoomQuiet

蠎加载 117

原文: Import Python Weekly Newsletter - Issue No 117 欢迎, 来 PyChina/weekly 共同翻译/增订/推荐 周刊 蠎消息 ;-) 该读 ~ 文章, Blog, 教程… Python 的 Memoization 以及 Decorators core-python With memoization, we can “memoize” (remember, store) the result of problems that we’ve dealt with before, and return a stored result instead of repeating calculations. (是也乎: 对计算的缓存.. ) 用 Apache Airflow 开始折腾工作流 airflow Apache Airflow is an open-source tool for orchestrating complex computational workflows and data processing pipelines. If you find yourself running cron task which execute ever longer scripts, or keeping a calendar of big data processing batch jobs then Airflow can probably help you. This article provides an introductory tutorial for people who want to get started writing pipelines with Airflow. 数据科学基本统计: Python 案例集, 第一部分 statistics In this post, we’ll take a step back to cover essential statistics that every data scientist should know. PyMedium PyMedium is an unofficial Medium API written in python flask. It provides developers to access to user, post list and detail information from Medium website. This is a read-only API to access public information from Medium, you can customize this API to fit your requirements and deploy on your own server. (是也乎: 又一个非法接口嗯哼出来了 ) TensorFlow 可视化: Summary 和 TensorBoard tensorflow This article is going to discuss some basic methods and functions in tensorflow used to visualize and monitor the training process. I believe visualization is top priority for the research. Because the deep learning itself is a “black box”. So, if the visualization could help us analyze why the final result is successful or failed. 用 Python, pandas 和线性回归模型 预测住房价格 pandas Pandas & Seaborn - 优雅地处理和可视化数据指南 pandas 折腾 Machine Learning Algorithms machine learning 破解虚拟内存 virtual memory 用 Apache Kafka 和 Python 构建分布式流系统 kafka (是也乎: ) 使用 HTML5 和 Flask 拖放文件 flask 如何使用 IBM Watson 的 语音-文本 功能来转录我们的课程 watson In this step by step guide we’ll show you how to transcribe an audio file using IBM Watson speech-to-text API and a little bit of Python. 如何生成 文本总结 - 介绍深度学习 machine learning, video I’ll show you how you can turn an article into a one-sentence summary in Python with the Keras machine learning library. We’ll go over word embeddings, encoder-decoder architecture, and the role of attention in learning theory. Python 用 Circle CI 进行持续集成 CI 如何在 ModelForm 中动态过滤 ModelChoice 的查询集? django Python 3.6.1 已发布 core-python 几分钟内在 GCP 构建无服务器 Python 应用 google cloud, cloud functions Google’s answer to aws lambda. Django Admin: 昂贵的 COUNT(*) 查询 admin If you have maintained a website with a huge amount of data, you probably already know that Django Admin can become very slow when the database table gets so large. If you log the SQL queries (either using Django logging or using Django Debug Toolbar), you would notice a very expensive SQL query, something like this. 好物 ~ 包/模块/库/片段… ...

2017-03-17 · 2 min · 944 words · ZoomQuiet

蠎加载 115

原文: Import Python Weekly Newsletter - Issue No 115 欢迎, 来 PyChina/weekly 共同翻译/增订/推荐 周刊 蠎消息 ;-) 该读 ~ 文章, Blog, 教程… Worthy Read Fire 介绍 - 能自动生成 CLI 的嗯哼 - By Google CLI Today we are pleased to announce the open-sourcing of Python Fire. Python Fire generates command line interfaces (CLIs) from any Python code. Simply call the Fire function in any Python program to automatically turn that program into a CLI. The library is available from pypi via pip install fire, and the source is available on GitHub. (是也乎: 文档在 google/python-fire: Python Fire is a library for automatically generating command line interfaces (CLIs) from absolutely any Python object. 已经快 5000 星了… ) 用 Python 3.6 类型提示编写更好软件 type annotations Type annotations are a precious tool (especially if used in combination with an advanced IDE like PyCharm) that allow us to: write clear and implicitly documented code, prevent us from invoking methods with wrong data types (ok, actually we can do whatever at runtime since Python is a dynamic language and type hints as the name suggests is just that: an hint) and get useful code suggestions and autocompletion. (是也乎: 简单的说, 追加各种 C++ 式的特性, 就是为了将 IDE 卖的更好… ) 简单机器学习模型5行 Python 代码 machine learning We will test a simple Linear Regression Model by passing it training data and expecting correct output for a new input. 用 Facebook 的 Prophet Library 预测网站流量 machine learning, forecasting I was very interested to see that Facebook recently open sourced a python and R library called prophet which seeks to automate the forecasting process in a more sophisticated but easily tune-able model. In this article, I’ll introduce prophet and show how to use it to predict the volume of traffic in the next year for Practical Business Python. To make this a little more interesting, I will post the prediction through the end of March so we can take a look at how accurate the forecast is. (是也乎: Py+R 的一个实用库,或是说 PaaS ) Generator 清理 generators What happens if you close the generator instead of throwing an exception? (是也乎: 生成器关闭后… ) 俺的经验: 基于长运行时 芹菜 发布的微服务 celery While Celery is well-maintained, it’s not easy to find examples of advanced patterns of real-world usage. Also it’s often been difficult to find solutions to issues that we’ve come across. So I want to share some of our experiences. (是也乎: 又一个重病芹菜依赖症团队的嗯哼… ) 知识 Bootstrapping mindmap A little offtopic but enjoyed reading it. Do check https://github.com/nikitavoloboev/research/ Python 中使用 ctypes 导入:解决溢出问题 ctypes 在Jupyter可重复的数据分析 jupyter 使用Python构建微服务 第一部分 microservices Nowadays it is a common practice to work in smaller applications, sharing the responsibility among many different services. I believe it is critical to have some standard tools between the teams working solving those problems. Note here is the link to Part II https://medium.com/@ssola/building-microservices-with-python-part-2-9f951199094a 用 Python 寻找免费食物 scraping Postmates regularly does promotions where they offer free food and waive the delivery fee for certain restaurants. I recently realized that I could make this simpler by creating something that would track the Postmates website and notify me of deals. 用 Python 解析维基百科全数据 XML 转储 xml, parsing Note - My college project 11 years back did the same thing using C++. Today if I were to attempt the same problem I might look at using mapreduce / spark. (是也乎: 作者用 C++ 作过, 现在用 py 来… ) Python Datetime 获取月范围 datetime HackerRank 二元搜索: 冰淇淋店 algorithms 好物 ~ 包/模块/库/片段… ...

2017-03-14 · 3 min · 1107 words · ZoomQuiet