Tag python

Python parallelism cheat sheet (part 2)

This blog post is the second in a series I am writing, covering methods of simple parallelism. The following posts cover more convenient ...

Python parallelism cheat sheet

I often get asked "how can I parallelise my Python code?". I've come up with this simple cheat sheet to explain it. I will only explain the ...

Numpy functions may not do what you think

Numpy has the ability to mask arrays and ignore their values for certain computations, called "masked arrays". They contain a .mask ...

Python database transactions

pymysql Defaults to autocommit=False connection = pymysql.connect(user='user', db='test') cursor = connection.cursor() ...

Separate IPython profiles for interactive use

I used to have two simple shell aliases for IPython: alias ipy=ipython alias pylab='ipython --pylab' These were separated for a couple of ...

Interpolation in Python

For interpolation in python, scipy includes the interpolateackage containing (amongst other things) interp1d for simple interpolation. The ...

IPython version 2.0

So IPython has updated to version 2.0. The full changelog can be found here and to summarise the key points: interactive widgets for the ...

Testing PyMC3

I was trying to play with PyMC3 and as per usual with code under heavy development the tutorials were out of date, and the code wouldn't ...

Null objects for the win

So I've been watching a lot of OO refactoring screencasts and reading posts and I'm able to say I've implemented some of the advice I've ...

Function fitting with lmfit

Scipy contains functions for fitting equations with Python, in its scipy.optimize module. The two main ones I've used in the past are ...


Page 1 / 2