A collection of IPython magic commands and other utilities.
- A line magic to automatically select the local CUDA device(s) with the most free memory.
![image](https://private-user-images.githubusercontent.com/1595907/290037125-7634b369-1c68-4e69-a2fd-fc938c7a2261.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTM0NjQ3NjEsIm5iZiI6MTcxMzQ2NDQ2MSwicGF0aCI6Ii8xNTk1OTA3LzI5MDAzNzEyNS03NjM0YjM2OS0xYzY4LTRlNjktYTJmZC1mYzkzOGM3YTIyNjEucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDQxOCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA0MThUMTgyMTAxWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MDQzNGFmY2NkNDJkOWMyMTg5NDE4NTdmMWQyMmM0MjU2NmZiOTI0OGE1MDliOThjYmVjZTVlOTVjYjc2ODUzOCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.NJuEAvBlymOWgW5rpUzkFXZm4w2UeBKWG8xzPB0y3Ow)
- A cell magic to automatically capture
plt.plot(); plt.show()
calls and display them as an animation once the cell has finished executing.
First make sure Python is installed, then run:
pip install ipytoolbox
Then you can use it in IPython or Jupyter Notebooks by
%load_ext ipytoolbox
First clone the repo and set it as working directory. Then install the package in development mode (preferably within its own virtual environment):
pip install -e ".[tests]"
If you have direnv
installed, you can run direnv allow
to automatically create and activate a Python virtual environment when you enter the directory.
pytest
pre-commit run --all-files
Or pre-commit install
to run automatically on git commit
.
gh release create