Created
July 9, 2022 18:22
-
-
Save BrennanBarker/defd860cecde7ef64f50c60b7295f062 to your computer and use it in GitHub Desktop.
Progress bar updates for pyodide
This file contains hidden or 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
| // <progress id="progress"></progress> | |
| async function go() { | |
| await pyodide.runPythonAsync(`r = np.random.randn(10000000); 'hi'`) | |
| document.querySelector('#progress').value=30 | |
| await pyodide.runPythonAsync(`r = np.random.randn(10000000); 'hi'`) | |
| document.querySelector('#progress').value=60 | |
| await pyodide.runPythonAsync(`r = np.random.randn(10000000); 'hi'`) | |
| document.querySelector('#progress').value=90 | |
| return 5 | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment