Ooh, that looks cool. You could possibly use composite strategies https://hypothesis.readthedocs.org/en/master/data.html#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
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).
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.
I was nearly convinced that Google’s TensorFlow would take over the world, but now I’ll need to also consider MXNet: http://mxnet.io/
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)
0 0.23 Ideal
1 0.21 Premium
2 0.23 Good
Useful material on how to deal with slow tests in py.test, a bit buried in the docs:
From http://doc.pytest.org/en/latest/usage.html, to get a list of the slowest 10 test durations:
From http://doc.pytest.org/en/latest/example/simple.html, to skip slow tests unless they are requested:
# content of conftest.py
help="run slow tests")
# content of test_module.py
slow = pytest.mark.skipif(
reason="need --runslow option to run"
Very convenient to know.
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]
From the sklearn docs: “We call our estimator instance `clf`, as it is a classifier.” http://scikit-learn.org/stable/tutorial/basic/tutorial.html#learning-and-predicting
Video recommendation: Stop Writing Classes