planetwater

ground- water, geo- statistics, environmental- engineering, earth- science

Archive for the ‘python’ tag

Adventskalender

without comments

Can you have too many Advent Calendars? — I don’t think so!

Here is a wonderful python related one!

Screenshot 2020 12 03 at 16 07 28

PS: I already needed help from wtfpython

PPS: A colleague recommended this… interesting…

def (a, b=None):
    if b is None or a / b < 0:
        return a
    return a / b

Written by Claus

December 3rd, 2020 at 4:07 pm

Posted in Uncategorized

Tagged with

without comments

How to Filter a List in Python; also: how to compare two results of %timeit

Written by Claus

May 16th, 2018 at 9:02 pm

Posted in Uncategorized

Tagged with

Python on OSX with “Scientific” Flavour

without comments

This post is for everybody who uses python on Mac OS 10.6 together with some “scientific” goodness such as numpy, scipy, matplotlib.

I installed MacPorts today, and it’s all there.

No problem whatsoever.

I tried individual packages with easy_install before, I tried Fink before. Both options were painful. MacPorts is reasonably well up to date, and works just fine, so far, knock on wood.

Written by Claus

March 16th, 2010 at 3:42 pm

Posted in

Tagged with