Category Archives: software engineering

Property Based Testing in Python

Ooh, that looks cool. You could possibly use composite strategies for testing dataframes.


From: Joe A. Wagner
Sent: Thursday, February 25, 2016 11:03 AM
To: Abraham D. Flaxman
Subject: property based testing

Hi Abie,

Have you seen hypothesis? It looks really useful. I’ve been meaning to incorporate it into my code, but I’m having a hard time defining properties of data frames (which is usually the input of most of my functions).

Comments Off on Property Based Testing in Python

Filed under software engineering

People of ACM interview with Margaret Burnett

a software inspection process called GenderMag. You can try it for yourself. The process is freely available, and major technology companies are looking at the possibility of adopting it.

Comments Off on People of ACM interview with Margaret Burnett

Filed under software engineering

Stunning Python Visuals

Found this from Software Carpentry:

Led me here:

All amazing!

Comments Off on Stunning Python Visuals

Filed under software engineering

Deep Learning Frameworks

I was nearly convinced that Google’s TensorFlow would take over the world, but now I’ll need to also consider MXNet:

Comments Off on Deep Learning Frameworks

Filed under machine learning, software engineering

dfply package

Potentially of interest, although I’ve done enough d3js to think that .select .head is fine notation:

dfply Version: 0.2.4

GitHub – kieferk from November 28, 2016
“The dfply package makes it possible to do R’s dplyr-style data manipulation with pipes in python on pandas DataFrames.”

from dfply import *

diamonds >> select(X.carat, X.cut) >> head(3)

   carat      cut
0   0.23    Ideal
1   0.21  Premium
2   0.23     Good

Comments Off on dfply package

Filed under software engineering

py.test recipes for slowness

Useful material on how to deal with slow tests in py.test, a bit buried in the docs:

From, to get a list of the slowest 10 test durations:

pytest --durations=10

From, to skip slow tests unless they are requested:

# content of

import pytest
def pytest_addoption(parser):
    parser.addoption("--runslow", action="store_true",
        help="run slow tests")

# content of
import pytest

slow = pytest.mark.skipif(
    not pytest.config.getoption("--runslow"),
    reason="need --runslow option to run"

def test_func_fast():

def test_func_slow():

Very convenient to know.

Comments Off on py.test recipes for slowness

Filed under software engineering

Why are loops called loops?

One thing the SWC training got me thinking about is the word “loop” as in “for loop”. It is something so familiar to me that I never tried to figure out why it is called a loop. I think it must come from computational flow diagrams. Incidentally, I read a book full of vintage flow diagrams recently, as part of my efforts to get up to speed on microsimulation: [Art of Simulation]


Comments Off on Why are loops called loops?

Filed under software engineering