You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Instantly share code, notes, and snippets.
💭
☕ + 💻
Matthew Feickert
matthewfeickert
💭
☕ + 💻
Postdoc in high energy physics and data science at University of Wisconsin-Madison working on LHC physics with the ATLAS experiment at CERN and IRIS-HEP.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Testing Python Docstrings with doctest and pydocstyle
Testing Python Docstrings with doctest and pydocstyle
Setup
Like any good project, we'll create a virtual environment for this example. You can use your virtual environment tool of choice, but I'm just going to show with Python's venv (and some help from venv-activate)
Kyle notified people over email and Twitter that Valentin Hirschi had gotten MadGraph to export matrix element codes for Feynman diagrams into a form that can be used by differentiable machine learning libraries (e.g., TensorFlow and PyTorch).
The project is called MG5aMC_PythonMEs.
This is a short walkthrough of doing the simplest possible thing: just running the code that MG5aMC_PythonMEs generates.
As I don't have much experience with MadGraph5_aMC@NLO and its installation and use instructions are quite bad I threw together a Docker image that at leasts somewhat works. This walkthrough will use that.
To be clear, this is never how you would actually do anything with a Docker image.
This is just throwing things against the wall at the moment.
A quickly thrown together Dockerfile to get Python 3.8 and Jupyter together
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
As you can see from requirements.txt I've added some fun Python libraries, that are available in the Binder instance so you can use them in this sandbox environment.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters