2015年编程链接清除:Python版

I have a Coding bookmarks folder which is stuffed full of loads of interesting articles that I’ve never shared with anyone because they don’t really fit into any of my posts. So, taking an idea from The Old New Thing, I’m going to run a few ‘Link Clearance’ posts. This is the Python-focused one (there will be more soon, including a general programming one).

我有一个Coding书签文件夹,里面充满了很多有趣的文章,但我从未与任何人分享过,因为它们确实不适合我的任何帖子。 因此,从The Old New Thing中获取一个想法,我将运行一些“链接清除”文章。 这是一个以Python为重点的程序(将会很快推出,包括通用的编程程序)。

(Yes, I know it is now the middle February 2016, but things got delayed a bit! Most of these links are from 2015 – with a few more recent ones added too)

(是的,我知道现在是2016年2月中旬,但是事情有点延迟了!这些链接大多数是2015年的-还添加了一些最近的链接)

General Python:

通用Python:

Scientific Python

科学Python

  • Python for Computational Science and Engineering: Book-length introduction to scientific Python programming, including basic Python, plus numpy, matplotlib, SymPy and more.
  • Bayesian Methods for Hackers: An introduction to Bayesian methods from a programming-perspective – also book-length and definitely worth a read.
  • Think Bayes: If you didn’t like the previous book relying on the PyMC module then you might prefer this one – it teaches similar concepts but with pure Python (with a bit of numpy later on). It gave me a far better understanding of probability in general – not just Bayesian thinking.
  • Kalman and Bayesian filters in Python: Yup, yet another book – but I promise this is the last one. It covers some of what has been covered in the two previous books, but goes into a lot of depth about Kalman filters, in a very easy-to-understand way.
  • 100 numpy exercises: This link is actually far more interesting than it sounds – it’s amazing what can be done in numpy in very few lines of code. I’d recommend starting at the top and seeing how many of the exercises you can complete…and then looking at the answers which will probably teach you a lot!
  • PSA: Consider using NumPy if you need to parse a large binary data file with a fairly simple format: This was very useful to me once, and I had no idea about it before I read this article – again, numpy is great!
  • Pandas and Python: Top 10: A great introduction to useful pandas features, I often use this as a reference for functions that confuse me slightly (like map, apply and applymap
  • Python GDAL/OGR Cookbook!: Some good ‘cookbook’-style examples of using the Python interface to GDAL/OGR (for reading/writing geographic data). Particularly useful as the main GDAL docs are focused on the C++ interface
  • Fitting models using R-style formulas:Have you ever wished for R-style formulas for fitting models in Python? Well, look no further – it can be done easily using a combination of statsmodels and patsy
  • Probability distributions in SciPy: A great brief summary of probability distributions included in scipy, and how to use the various methods available on them
  • Overview of Python Visualization: Visualisation options for Python were a lot less confusing when the only option was matplotlib! This should help you navigate the range of options now available
  • What is your Jupyter workflow like?: As with many Reddit discussions, there is some gold buried amongst the less-useful comments. I definitely learnt some new ways of working.
  • Getting the Best Performance out of NumPy: A good guide to increasing the performance of your numpy code.

Python packages

Python包

These are all packages that didn’t quite fit in to my Top 5 Python Packages of 2015 post, but are still great

这些都不是我2015年发布的5个最佳Python软件包中的所有软件包,但仍然很棒

  • pypath-magic: A handy command-line tool and IPython magic to allow you to easily change your PYTHONPATH – very useful!
  • MoviePy: Lovely simple interface to make animations/videos in Python – using whatever libraries/functions you want to create the actual images
  • SWAPY: A simple GUI to allow you to interactively generate pywinauto scripts to automate functions on Windows. Even better is that you can then edit the resulting Python code if you want – far nicer than switching to something like AutoHotKey
  • Glue: A great Python-based GUI for exploring data relationships, principally based on ‘linked displays’. All functionality is available through the Python API too – and the documentation is great.
  • Gloo: I really loved the ProjectTemplate library for R, but somehow never quite got as comfortable with this port of the library to Python. I really should try again – as the idea of a standardised structure for all analysis projects is very appealing.
  • pudb: Interactive, curses-style debugger, even accessible remotely and through IPython. I must remember to use this more!/li>
  • pony: An interesting new Object-Relational Model, a potential competitor to SQLAlchemy. I like its pythonic-nature
  • pyserial: Simple and easy-to-use library for serial communications in Python. I’ve used this for connecting to scientific instruments as well as for home automation.
  • xmltodict: This makes working with XML feel like you are working with JSON, by parsing XML data to a dict. You wouldn’t want to use it on enormous XML files, but for quick scripts it’s great!
  • uncertainties: A very easy-to-use package that lets you do calculations with uncertain numbers (eg. 3 +/- 0.3) – even in numpy arrays
  • pathlib: Do you hate os.path.join as much as I do? How does dir / output_folder / filename seem instead? A great pythonic path-handling package, which is a part of the standard library since Python 3.4. This package allows you to get the same functionality in previous versions.
  • geocoder: Very easy-to-use geocoding module
  • fuzzywuzzy: Simple but comprehensive fuzzy string matching library
  • blessings: The easiest way to introduce colour, font styles and positioning to your terminal programs
  • PrettyPandas: Handy API for making nicely-formatted Pandas tables
  • pandas-profiling: I think this is slightly misleadingly named: it doesn’t do profiling in a ‘speed’ sense, but in a ‘summary’ sense. Basically it’ll produce a lovely HTML summary of your Pandas DataFrame, with a huge amount of detail
  • PyDataset Do you envy R programmers with their handy access to various nice test datasets as data(cars) and so on? Well, this does the same for Python – with an even larger range of data
  • pyq Allows you to search Python code using jQuery-like selectors, such as class:extends(#IntegerField) for all classes that extend the IntegerField class. Fascinating, and I can see all sorts of interesting uses for this…if only I had the time!
  • pypath-magic:方便的命令行工具和IPython魔术,可让您轻松更改PYTHONPATH-非常有用!
  • MoviePy:可爱的简单界面,可以使用Python创建动画/视频-使用您想要创建实际图像的任何库/函数
  • SWAPY:一个简单的GUI,可让您交互生成pywinauto脚本以自动化Windows上的功能。 更好的是,您可以根据需要编辑生成的Python代码-比切换到类似AutoHotKey的方法好得多
  • Glue:一个很棒的基于Python的GUI,用于探索数据关系,主要基于“链接的显示”。 所有功能也都可以通过Python API获得,并且文档很棒。
  • Gloo:我真的很喜欢R的ProjectTemplate库,但是从某种程度上说,我对库的此端口从来没有像现在这样满意。 我真的应该再试一次-因为所有分析项目的标准化结构的想法非常吸引人。
  • pudb:交互式的诅咒式调试器,甚至可以通过IPython远程访问。 我必须记得更多使用它!/ li>
  • 小马:一个有趣的新对象关系模型,它是SQLAlchemy的潜在竞争对手。 我喜欢它的pythonic-nature
  • pyserial:简单易用的Python串行通信库。 我已经使用它来连接科学仪器以及家庭自动化。
  • xmltodict:通过将XML数据解析为字典,可以像使用JSON一样使用XML。 您不想在庞大的XML文件上使用它,但是对于快速脚本来说,它很棒!
  • 不确定性:一个非常易于使用的软件包,即使在numpy数组中,也可以使用不确定的数字(例如3 +/- 0.3)进行计算
  • pathlib:您和我一样讨厌os.path.join吗? dir / output_folder / filename 看起来如何? 一个很棒的pythonic路径处理包,它是自Python 3.4以来标准库的一部分。 此软件包可让您获得以前版本中的相同功能。
  • 地理编码器:非常易于使用的地理编码模块
  • Fuzzywuzzy:简单但全面的模糊字符串匹配库
  • 祝福:向终端程序介绍颜色,字体样式和位置的最简单方法
  • PrettyPandas:方便的API,用于制作格式良好的Pandas表
  • pandas-profiling:我认为这有点误导:它不是从“速度”的意义上进行概要分析,而是从“摘要”的意义上进行概要分析。 基本上,它将为您的Pandas DataFrame生成漂亮HTML摘要,其中包含大量详细信息
  • PyDataset您是否羡慕R程序员方便地访问各种漂亮的测试数据集(例如数据(汽车)等)? 嗯,这对于Python来说是一样的–数据范围更大
  • pyq允许您使用类似于jQuery的选择器搜索Python代码,例如class:extends(#IntegerField),用于扩展IntegerField类的所有类。 令人着迷,如果有时间的话,我可以看到各种各样有趣的用途……

Conda

康达

I use the Anaconda scientific Python distribution to get a standard, easily-configurable Python set up on all of my machines. I’m not going to give full details for each of these links, as they are fairly self-explanatory – but definitely very useful for those using Anaconda.

我使用Anaconda科学的Python发行版在我的所有机器上安装了标准的,易于配置的Python。 我不会为每个链接提供完整的细节,因为它们是不言自明的-但对于使用Anaconda的用户来说绝对有用。

Code Architecture

代码架构

The most difficult part of programming is designing and structuring your code: the actual ‘getting the computer to do what you want’ bit is often relatively easy. This becomes particularly difficult with larger projects. The links below are all interesting discussions of software architecture with a Python focus. I find the 500 Lines or Less posts to be particularly interesting: they all implement challenging programs in relatively short pieces of code. They’ll all be released in book form eventually – and I’m definitely going to buy a copy!

编程中最困难的部分是设计和构建代码:实际的“让计算机执行所需的操作”通常相对容易。 对于较大的项目,这尤其困难。 下面的链接都是针对Python的软件体系结构的有趣讨论。 我发现500行以内的帖子特别有趣:它们都用相对较短的代码来实现具有挑战性的程序。 它们最终都将以书本形式发布-我肯定会买一本!

翻译自: https://www.pybloggers.com/2016/03/programming-link-clearance-2015-python-edition/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值