Skip to content

LNS notebook in Marimo#68

Open
greenLeopard wants to merge 2 commits intod-krupke:mainfrom
greenLeopard:main
Open

LNS notebook in Marimo#68
greenLeopard wants to merge 2 commits intod-krupke:mainfrom
greenLeopard:main

Conversation

@greenLeopard
Copy link
Copy Markdown
Contributor

As an exercise, I converted the LNS Knapsack notebook from Jupyter to Marimo. You can also run the lns knapsack as a command line utility - because Marimo let's you integrate typer apps into your notebook.

Requires two new packages: typer and marimo

To view/edit/run the marimo notebook, (after installing the typer and marimo dependencies in your environment)
go to the command line and run:

> marimo edit examples/lns_marimo.py

To get the help text for the CLI version of the LNS Knapsack (for general help):

> python examples/lns_marimo.py --help

OR for specific help on the lnsk args:

> python examples/lns_marimo.py lnks --help

And to run an instance at the command line with 10,000 items in your knapsack:

> python examples/lns_marimo.py lnsk 10000

(There is no need to approve and merge this PR, I'm just sharing it in case you want to see Marimo.)

Out of interest, I converted the LNS Knapsack notebook from Jupyter to Marimo.
You can also run the lns knapsack as a command line utility - because Marimo let's you integrate typer apps into your notebook.
Requires two new packages: `typer` and `marimo`
LNS Knapsack notebook in MARIMO
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant