Skip to content

Repository containing sample Jupyter notebooks for Microsoft Rexl (Research EXpression Language)

License

Notifications You must be signed in to change notification settings

microsoft/Rexl-sample-notebooks

Repository files navigation

Rexl Sample Notebooks

This repository holds sample Jupyter notebooks and associated data for the Rexl project.

Contents

Releases

We will publish releases of the Rexl sample notebooks (and data) here in GitHub. A release consists of a .zip file containing the notebooks and data. To use:

  • Ensure that a release of the RexlKernel has been properly installed, as described in the Rexl README.
  • Download the RexlSampleNotebooks.zip file.
  • Extract the contents of the .zip to a folder.
  • Open a command line shell and cd into the extracted folder.
  • Run jupyter lab.
  • In Jupyter Lab, you should see directories named notebooks and data, containing the sample notebooks and data. You should also see an icon for creating a new Rexl notebook.

Samples

The samples directory contains the directories

Notebooks

The notebooks directory contains Jupyter notebook files. To run the notebooks, ensure that Jupyter is properly installed and that the Rexl kernel is built and registered.

The Jupyter notebook files include:

  • NFL.ipynb: demonstrates some tabular data manipulation using NFL game data.
  • Comma.ipynb: discusses the implicit lambda pattern and why Rexl doesn't need an analog of Excel's SUMPRODUCT function.
  • ImageAsTensor.ipynb: Illustrates representing images as tensors and performing some basic transformation.
  • ImageClassification.ipynb: Illustrates using some ONNX models from Rexl to classify images.
  • ProteinFolding.ipynb: Illustrates a protein folding optimization problem formulated as a Rexl module. Solves using three integrated MIP solvers, Gurobi (requires license), HiGHS, and GLPK.
  • EssentialMedicines.ipynb: Uses Rexl module functionality to formulate an essential medicines optimization problem. Rexl dispatches to the Gurobi solver (requires license from Gurobi) to perfom the optimization.
  • HoneycombPuzzleSat.ipynb: Illustrates using the SAT (boolean satisfiability) solver to find solutions to a tricky geometric puzzle.
  • SudokuSat.ipynb: Uses the Rexl SAT solver to solve Sudoku puzzles.
  • SudokuMip.ipynb and SudokuMipEq.ipynb: These use Rexl module functionality and MIP solver integration to solve Sudoku puzzles.

Data

The data directory contains data files of various forms used in the sample notebooks. Some of the files are Rexl scripts that define one or more global symbols. Other files may be binary data files (such as parquet or rbin files) or images (jpg, png) or just about anything.

The data files include:

Note: when adding a new kind of data file that should use LFS (large file storage), ensure that the .gitattributes file has an entry for the extension.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

Trademarks

This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.

About

Repository containing sample Jupyter notebooks for Microsoft Rexl (Research EXpression Language)

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published