蠎加载 137

原文: Import Python Weekly Newsletter - Issue No 137 欢迎, 来 PyChina/weekly 共同翻译/增订/推荐 周刊 蠎消息 ;-) 该读 ~ 文章, Blog, 教程… Python 怪癖 core-python Favorite #pythonoddity tweets by @treyhunner (是也乎: 叕一组高端黑技巧…其实,知道了, 也别用哪… ) Python 的 AI research - podcast podcast Today you’ll meet Alex Lavin, a Python developer and research scientist at Vicarious where they are trying to develop artificial general intelligence for robots. Python 装饰器正确的打开方式: 编程语言的4位观众 - Code Without Rules decorators If you’re a Python programmer, the following post will show you why decorators exist, and how to compensate for their limitations. Python 的机器学习搭车客指南 machine learning Featuring implementation code, instructional videos, and more Amazon S3 文件系统 Python 版 aws, s3 I’d like to announce an new Python module to make working with Amazon S3 files a whole lot easier. (是也乎: 叕一个 S3 的封装, 不过, 有人能嗯哼得过官方的任性嘛?! ) 在 Django 清晰的架构 django This post will try to explain our approach to apply Clean Architecture on a Django Restful API. It is useful to be familiarized with Django framework as well as with Uncle Bob’s Clean Architecture before keep reading. (是也乎: 好吧 –> Clean Architecture 是个专有功能… ) 两周用对 Pandas 技术 pandas 50行 Python 代码来预测股票 stock trading In this blog post we’re going to build a stock price predication graph using scimitar-learn in just 50 lines of Python. (是也乎: scimitar-learn 都封装好了 ) DjangoTip-> 玩转 Querysets django PSF 新闻 PSF The Ethical Maintainer: Community Service Award Recipient Glyph Lefkowitz. 从 Scratch 支持 Spotify 的 Sublime 插件 sublime plugin Part 1 - Series Introduction & Environment Setup. Pycon Australia 2017 Videos pycon 好物 ~ 包/模块/库/片段… ...

2017-08-12 · 3 min · 1387 words · ZoomQuiet

蠎加载 136

原文: Import Python Weekly Newsletter - Issue No 136 欢迎, 来 PyChina/weekly 共同翻译/增订/推荐 周刊 蠎消息 ;-) 该读 ~ 文章, Blog, 教程… 对 Python object 反向工程 python object I faced an interesting challenge at work the other day. I felt like sharing because it might save a few hours for others, or reveal some insights about the Python internals. Python 正则表达式 regular expression In this video series, we will be tackling Python Regular Expressions. The first few videos we will go over the basics, and then tackle some intermediate problems using Python Regular Expressions. (是也乎: 叕一个正则表达式的嗯哼…可见好东西永远掌握在少数人心中… ) 使用进程池加速您的Python数据处理脚本 process pool (是也乎: 问题在,数据处理首先得是可以切片并发的哪… ) 基于 机器学习 用 Python 开发牌照识别系统 machine learning In this tutorial, I’ll be taking you through the basics of developing a vehicle license plate recognition system using the concepts of machine learning with Python. (是也乎: 用的是 scikit-image ) Python init.py & modular Imports core-python, code snippets (是也乎: 又常用又破烦的事儿… ) Logging in Python logging logging beyond 101 (是也乎: ( ̄▽ ̄) 这是没个头儿的… ) 用 Sightengine 发觉名人 machine learning We will see in this article how to detect if an image contains celebrities with Sightengine. Sam 清洁 Citadel (GoT) 以10小时,用 Python video processing Curator’s Note - I am a big Game of Thrones fan so had to share this. As a fan of Game of Thrones, I couldn’t wait for it to return for a 7th season. Watching the season premier, I greatly enjoyed that iconic scene of Sam doing his chores at the Citadel. I enjoyed it so much that I wanted to see more of it… much more of it. In this post we’ll take the short video compilation of Sam cleaning the Citadel, we will split it to multiple sub clips and create a video of Sam cleaning the Citadel using a random mix of those sub clips. sinuous-violin - Numpy and SciPy numpy, scipy The aim of this short notebook is to show how to use NumPy and SciPy to play with spectral audio signal analysis (and synthesis). (是也乎: ipynb 可以播放音乐了 ) Pandas 分组和 Agg 函数解释 pandas Every once in a while it is useful to take a step back and look at pandas’ functions and see if there is a new or better way to do things. I was recently working on a problem and noticed that pandas had a Grouper function that I had never used before. I looked into how it can be used and it turns out it is useful for the type of summary analysis I tend to do on a frequent basis. Yosai 和 Darin Gordon – Episode 120 – Podcast podcast For any program that is used by more than one person you need a way to control identity and permissions. There are myriad solutions to that problem, but most of them are tied to a specific framework. Yosai is a flexible, general purpose framework for managing role-based access to your applications that has been decoupled from the underlying platform. This week the author of Yosai, Darin Gordon, joins us to talk about why he started it, his experience porting it from Java, and where he hopes to take it in the future. (是也乎: 介绍通用 ACL 框架 Yosai ) 使用 Cython 来保护 Python 代码库 cpython Recently, I worked on a Python project that required the whole codebase to be protected using Cython. Although protecting Python sources from reverse engineering seems like a futile task at first, cythonizing all the code leads to a reasonable amount of security (the binary is very difficult to disassemble, but it’s still possible to e.g. monkey patch parts of the program). This security comes with a price though - the primary use case for Cython is writing compiled extensions that can easily interface with Python code. Therefore, the support for non-trivial module/package structures is rather limited and we have to do some extra work to achieve the desired results. (是也乎: 同时还能立即获得速度的提升, 问题在迁移的成本… ) 控制 Python 异步蠕变 asyncio The complication arises when invoking awaitable functions. Doing so requires an async defined code block or coroutine. A non-issue except that if your caller has to be async, then you can’t call it either unless its caller is async. Which then forces its caller into an async block as well, and so on. This is “async creep”. (是也乎: 雪崩在异步场景中的兄弟… ) 神密的 Dynamic Programming algorithms Maybe you’ve heard about it in preparing for coding interviews. Maybe you’ve struggled through it in an algorithms course. Maybe you’re trying to learn how to code on your own, and were told somewhere along the way that it’s important to understand dynamic programming. Using dynamic programming (DP) to write algorithms is as essential as it is feared. 优化 Pandas 代码速度的初学指南 pandas 写个 a map-reduce 任务来嗯哼数百万个小文件 mrjob, mapreduce 使用 TensorFlow 检测伪钞 tensorflow Today, let’s use TensorFlow to build an artificial neural network that detects fake banknotes. Hacking 相似搜索,用 python project What would you do if you wanted to know which files are the most similar to a particular text-based file? For example to find a particular configuration file which has changed its filename and its contents. 好物 ~ 包/模块/库/片段… ...

2017-08-04 · 4 min · 1982 words · ZoomQuiet

蠎加载 135

原文: Import Python Weekly Newsletter - Issue No 135 欢迎, 来 PyChina/weekly 共同翻译/增订/推荐 周刊 蠎消息 ;-) 该读 ~ 文章, Blog, 教程… Python 中测试重构实际一例 refactoring This post contains a step-by-step example of a refactoring session guided by tests. When dealing with untested or legacy code refactoring is dangerous and tests can help us do it the right way, minimizing the amount of bugs we introduce, and possibly completely avoiding them. Refactoring is not easy. It requires a double effort to understand code that others wrote, or that we wrote in the past, and moving around parts of it, simplifying it, in one word improving it, is by no means something for the faint-hearted. Like programming, refactoring has its rules and best practices, but it can be described as a mixture of technique, intuition, experience, risk. 波士顿地铁用 Python 的性能分析 (Pandas, Numpy, MatplotLib 以及 Seaborn) data science Boston’s Massachusetts Bay Transit Authority (MBTA) operates the 4th busiest subway system in the U.S. The MBTA recently began publishing substantial amount of subway data through its public APIs. I performed five analysis. 高效管理 Python 与 Docker 的项目依赖关系 docker, dependency management There are many ways to handle Python app dependencies with Docker. Here is an overview of the most common ones – with a twist. 通过 Sklearn 实现监督学习算法 - 线性回归 supervised learning In this blog, we will see how we can implement Supervised Learning Algorithm. Linear Regression using SkLearn Library in Python. SkLearn or scikit-learn is one of the most widely used tools for Machine Learning and Data Analysis. It does all the computation allowing you to focus on increasing the efficiency and not on the calculation part of the Algorithm. TeachCraft minecraft Learn to program Python within a multiplayer world we all know and love, Minecraft! (是也乎: ) Quart flask, project Quart is a Python asyncio web microframework with the same API as Flask. Quart should provide a very minimal step to use Asyncio in a Flask app. (是也乎: 叕一个针对 Py3 特性的微型 web 框架 from quart import Quart app = Quart(name) @app.route(’/’) async def hello(): return ‘hello’ app.run() 忒象 Bottle 了… ) Github 贡献简历生成器 offtopic This project give you the ability to generate your Resume from your Github contributions. 关于 Python 的 Matplotlib 简介 matpoltlib Matplotlib is a Python 2D plotting library which produces publication quality figures in a variety of hardcopy formats and interactive environments across platforms. Matplotlib can be used in Python scripts and the jupyter notebook, web application servers, and four graphical user interface toolkits. 使用 Sklearn 的 Count / Hash / TDiF 矢量化器分类文档 machine learning, classification The Sklearn library provides several powerful tools that can be used to extract features from text. In this article, I will show you how easy it can be to classify documents based on their content using Sklearn. Cython 0.26 有咩新咯? cpython PyData 西雅图 2017 视频已经上传 pydata conference 采访 HTTP 提示的 Chang-Hung Liang open source An exploration of the people behind the projects. Each post is an exclusive interview with a member of the open source community. 如何使用转移学习创建图像分类引擎 image processing, tensorflow In this post, we are documenting how we used Google’s TensorFlow to build this image recognition engine. 在组织中分发私有 Python 包的简单方法 dependency management, packages, distribution (是也乎: –> wheelhouse ) 机器学习 NLP:使用scikit-learning,python和NLTK的文本分类 text classification 风格化 Bokeh Visualizations graph Bokeh is a Python interactive visualization library that targets modern web browsers for presentation. Its goal is to provide elegant, concise construction of novel graphics in the style of D3.js, and to extend this capability with high-performance interactivity over very large or streaming datasets. Bokeh can help anyone who would like to quickly and easily create interactive plots, dashboards, and data applications.. Bokeh’s styling is very nice by default. However, extending Bokeh with your own custom styles can add an impressive level of polish to your visualizations. 好物 ~ 包/模块/库/片段… ...

2017-07-28 · 3 min · 1122 words · ZoomQuiet

蠎加载 134

原文: Import Python Weekly Newsletter - Issue No 133 欢迎, 来 PyChina/weekly 共同翻译/增订/推荐 周刊 蠎消息 ;-) 该读 ~ 文章, Blog, 教程… 首则 Python Notebook - 学习 Pandas pandas A step-by-step guide to analyzing data with Python and the Jupyter Notebook. This textbook will guide you through an investigation of money in politics using data from the California Civic Data Coalition. The course will teach you how to use pandas to read, filter, join, group, aggregate and rank structured data. (是也乎: 值得体验, 一开始不是环境配置的都是骗纸… ) 在Python中重新进行单元测试和模拟 testing, mocking This post covers some higher-level software engineering principles demonstrated in my experience with Python testing over the past year and half. In particular, I want to revisit the idea of patching mock objects in unit tests. 数据科学: Python vs Pandas vs Numpy 的性能 - 机器学习实验 benchmark Speed and time is a key factor for any Data Scientist. In business, you do not usually work with toy datasets having thousands of samples. It is more likely that your datasets will contain millions or hundreds of millions samples. Customer orders, web logs, billing events, stock prices – datasets now are huge. (是也乎: 虽然 Numpy 以及 Pandas 都是 python 写的, 但是,作两样的事儿, 效率就是不同的哪… ) 通用 Jinja: 疯狂的想法 Python-ready 前端 jinja, frontend development Python 3 vs Python 2: 这次真咯不一样了 Python 3 A difficult decision for any Python team is whether to move from Python 2 and into Python 3. Although this is not a new decision for Python development teams, 2017 brings with it several important differences that make this decision crucial for proper forward planning. It feels like this is the year that we’re really seeing the move to Python 3. It has been a long road, but Python 3 may finally have the upper hand. Python 中的解析: 可用的所有工具和库 parsing conda-merge project, reader submission Tool for merging Conda (Anaconda) environment files into one file. This is used to merge your application environment file with any other environment file you might need (e.g. unit-tests, debugging, jupyter notebooks) and create a consistent environment without breaking dependencies from the previous environment files. (是也乎: 刚需哪! ) faker-schema project, reader submission Generate fake data using joke2k’s faker and your own schema. (是也乎: 虚拟数据的模式化生成 ) Dockerizing Django, uWSGI 以及 Postgres 的生产路径 django, docker Let’s dockerize a serious Django application. Curator’s note - Love the humour in the article. 创建自己的 Cryptocurrency - 用 Python cryptocurrency I’ve been itching to build my own cryptocurrency… and I shall give it an unoriginal name - Cranky Coin. After giving it a lot of thought, I decided to use Python. GIL thread concurrency is sufficient. Mining might suffer, but can be replaced with a C mining module. Most importantly, code will be easier to read for open source contributors and will be heavily unit tested. Using frozen pip dependencies, virtualenv, and vagrant or docker, we can fire this up fairly easily under any operating system. (是也乎: 又一种 Coin 的加密算法 ) 创建 Jupyter 笔记本小部件 jupyter This post will provide a step-by-step tutorial for creating and running a Jupyter widget. 让我们建立最小的块链 blockchain In Less Than 50 Lines of Python. Python3 asyncio - 从同步代码调用异步代码 asyncio (是也乎: golang 的最大思想贡献: 用同步代码形式,运行异步效果 ) 好物 ~ 包/模块/库/片段… ...

2017-07-21 · 3 min · 1060 words · ZoomQuiet