Dan Foreman-Mackey https://dfm.io/ Recent content on Dan Foreman-Mackey Hugo -- gohugo.io en-us © 2014-{year} Dan Foreman-Mackey Thu, 18 Mar 2021 00:00:00 +0000 What if I want to reuse my Python functions? https://dfm.io/posts/simple-python-module/ Thu, 18 Mar 2021 00:00:00 +0000 https://dfm.io/posts/simple-python-module/ This post is an introduction to packaging Python code aimed at scientists (although the advice is probably more general) who want to be able to reuse Python functions that they have written as part of a common Jupyter notebook-based development workflow. It is not meant as a complete discussion of Python packaging for scientific software. Some day I’d love to write more about that (because I have so many thoughts and opinions), but in the meantime I’ll direct you to other resources like the excellent OpenAstronomy Python packaging guide, if you want more details. Extending JAX with custom C++ and CUDA code https://dfm.io/posts/extending-jax/ Mon, 11 Jan 2021 00:00:00 +0000 https://dfm.io/posts/extending-jax/ The primary version of this post can be found on GitHub: dfm/extending-jax This repository is meant as a tutorial demonstrating the infrastructure required to provide custom ops in JAX when you have an existing implementation in C++ and, optionally, CUDA. I originally wanted to write this as a blog post, but there’s enough boilerplate code that I ended up deciding that it made more sense to just share it as a repo with the tutorial in the README, so here we are! PyMC3 + TensorFlow https://dfm.io/posts/pymc-tensorflow/ Thu, 02 Aug 2018 00:00:00 +0000 https://dfm.io/posts/pymc-tensorflow/ the most ambitious crossover event in history Continuous integration of academic papers https://dfm.io/posts/travis-latex/ Wed, 12 Jul 2017 00:00:00 +0000 https://dfm.io/posts/travis-latex/ keeping an up-to-date build of your TeX source using GitHub and Travis Using external C++ functions with PyStan & radial velocity exoplanets https://dfm.io/posts/stan-c++/ Thu, 04 May 2017 00:00:00 +0000 https://dfm.io/posts/stan-c++/ The key feature that was missing from PyStan The Hack Day at AAS 225 https://dfm.io/posts/aas-hack-day/ Sun, 18 Jan 2015 00:00:00 +0000 https://dfm.io/posts/aas-hack-day/ The wrap-up post from the hack day at the 225th AAS meeting Python modules in C https://dfm.io/posts/python-c-extensions/ Fri, 03 Aug 2012 00:00:00 +0000 https://dfm.io/posts/python-c-extensions/ How to roll your own Python modules in C About https://dfm.io/about/ Mon, 01 Jan 0001 00:00:00 +0000 https://dfm.io/about/ Hi, I’m Dan Foreman-Mackey I’m a Research Engineer at Anthropic in New York City, working on AI Interpretability. Previously, I worked on JAX at Google DeepMind, and before that I was an astrophysicist who developed open source scientific software. Code I write a lot of code for work and in my spare time. All my projects live in public repositories on GitHub. Here are some of my most popular research codes: