Visual Studio Code has the ability to debug mixed Python with C++ extensions. In this blog post, I give an example of how to get it working. I’m going to do the example from scratch in five steps: Make virtual environment. Chances are that, if you’re doing this kind of thing, you’ll be wanting to use a virtual environment too. Write code. My toy example … Continue reading Example debugging mixed Python C++ in VS Code
Update Jan 2020: E.M. Bray suggests a more elegant solution in the comments, see: https://ask.sagemath.org/question/7867/importing-sage-files/?answer=48947#post-id-48947. — Let’s say that I have created a bunch of Sage code — Sage functions etc. — that I wish to reuse by importing into various Sage scripts. In straight Python, one would put these functions into their own separate file and import them using the usual from foo import … Continue reading Import self-made Sage modules and functions into Sage script?
I’ve recently been working on a qualitative modelling project where I am trying to uncover “truths” about the response of species in an ecosystem to control of invasive species. Long story short, I’ve been looking into various boolean minimisation techniques. I’ve been playing with Python EDA, a Python library that I think provides a front-end to the Robert Brayton and Richard Rudell espresso heuristic logic … Continue reading “ValueError: expected a DNF expression” when trying espresso_exprs example from pyeda docs
I’ve finished up a draft module for Webworld (Drossel et al. 2001, J. Theor. Biol.) in Python that’s available for download: webworld.py It’s also available bundled with what you’ll need for an example run: webworld.tar.gz. Continue reading Webworld for Python